Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Pente Game - Possible?

Merwan Marker
Booring...
Join date: 28 Jan 2004
Posts: 4,706
12-01-2004 18:09
Not sure where this should go...

I'm surprised no one has scripted a Pente game - which seems to me would be easier to develop than Go - smally grid, simpler way to win - 5 stones in a row.

Here's some game info in case anyone is interested.


From http://www.itsyourturn.com/t_helptopic2080.html#helpitem1214] ItsYourTurn.Com

Rules --

Pente is similar to Go-Moku, but you can also capture your opponent's stones. If you place a stone so that your stones flank a row of exactly two of your opponent's stones, then your opponent's two stones are removed from the game board.

You can win by doing either of the following:

Place five or more of your stones in a row. In Pente, six or more in a row also wins, though it does not win in Go-Moku.
Capture ten of your opponent's stones.

You can capture a row of two stones that is vertical, horizontal, or diagonal. You can not capture just one stone or a group of three or more.


---
_____________________
Don't Worry, Be Happy - Meher Baba
Camille Serpentine
Eater of the Dead
Join date: 6 Oct 2003
Posts: 1,236
12-01-2004 18:47
If you make one I'd play! I love Pente!!!!

:D
_____________________
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
12-03-2004 01:27
The hardest part in doing this would be creating the AI for folks who want to play alone. So, here's my "Poor Scripter's Version of Pente." You can build this multiplayer version in under five minutes! Here's how:

1) Make the board and texture it with a grid pattern.. maybe a white tile, then tint that green.

2) Make a small cylinder to represent a stone. Paint it black.

3) Script the stone to change color... if it's white it turns black, if it's black it turns white.
3a) Use the script I'll add below if you need it.

4) Take a copy of the scripted stone.

5) Repeat steps 2-4 with a white stone.

6) Give your friend a copy of either the black or white stone.

To Play:
drag a stone from inventory onto the board... then let your friend place their stone. then repeat by rezzing another as your next move. when you make a line and need to 'flip' the stone, just click it to reverse the color.

CODE
vector currentColor;
vector WHITE = <1,1,1>;
vector BLACK = <0,0,0>;

default {
on_rez(integer start_param) {
currentColor = llGetColor(ALL_SIDES);
}
touch_start(integer total_number) {
if(currentColor == WHITE) {
llSetColor(BLACK, ALL_SIDES);
}
else {
llSetColor(WHITE, ALL_SIDES);
}
}
}
DoteDote Edison
Thinks Too Much
Join date: 6 Jun 2004
Posts: 790
12-03-2004 02:31
Okay, obviously, I got Pente confused with Othello. So, the above instructions will produce "Poor Scripter's Othello."

For Pente, you don't even need the script. Just make the board and stones. Though, I'm sure Merwan originally posted hoping for a single-player version.
Rysidian Rubio
Ruby Red Head
Join date: 14 Jan 2004
Posts: 263
12-03-2004 14:54
It's possible yes. (well of course this is SL :) )
As Dotedote mentioned a singleplayer version would be much harder to script than a multiplayer version.

If anyone reeeeally wanted this I could script it (a multiplayer version). I've made games before, so I can reuse alot of preexisting code. Of course a version that doesn't check to make sure you made a legal move would be very easy, and probably only take a short time to make. A fully automatic version would take quite a while tho.

If LSL had arrays then this would be 1000times easier *sigh*.
Rysidian Rubio
Ruby Red Head
Join date: 14 Jan 2004
Posts: 263
12-03-2004 14:58
From: DoteDote Edison
Okay, obviously, I got Pente confused with Othello. So, the above instructions will produce "Poor Scripter's Othello."

For Pente, you don't even need the script. Just make the board and stones. Though, I'm sure Merwan originally posted hoping for a single-player version.
I've got an othello type Game based on hessagons called "hexxagon" which is 2 player, and fun (& free)! It's in Solang is anyone wants to have a look.
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
12-03-2004 15:09
From: Rysidian Rubio
I've got an othello type Game based on hessagons called "hexxagon" which is 2 player, and fun (& free)! It's in Solang is anyone wants to have a look.


OMG Rysidian! Is it based off of that shareware game of the same name, from back in the day? I loved the sound effects from that. :D
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Rysidian Rubio
Ruby Red Head
Join date: 14 Jan 2004
Posts: 263
12-03-2004 16:11
From: Cross Lament
OMG Rysidian! Is it based off of that shareware game of the same name, from back in the day? I loved the sound effects from that. :D

lol yes it is but it doesn't do all of the sounds, hehehehe. i am planning to revamp it totally soon tho, and it will aswell as some other fixes.
Rysidian Rubio
Ruby Red Head
Join date: 14 Jan 2004
Posts: 263
12-03-2004 16:13
I decided to jump in and make a go/pente board. i'll try to script it to play both games, and maybe some of the other variations aswell.
Rysidian Rubio
Ruby Red Head
Join date: 14 Jan 2004
Posts: 263
12-03-2004 21:22
Done!
Wow I didn't realise how easy this would be. I made a game board that lets you play either GoMoku or Pente, 2 player only.

It doesn't do anything fancy like stop you making illegal moves, but it works to play and keeps score of how many pieces you've captured in Pente.

The entire board is 176 Prims

IM me for a copy. I'll put it on sale for L$100, but anyone who's posted here can have a free copy.
Roberta Dalek
Probably trouble
Join date: 21 Oct 2004
Posts: 1,174
12-03-2004 21:29
I have free copy/mod etc unscripted go boards and stones if anyone wants one.
Artillo Fredericks
Friendly Orange Demon
Join date: 1 Jun 2004
Posts: 1,327
12-03-2004 22:46
Rysidian, I'd love a copy! I used to play Pente with my brother for HOURS! Great fun game!

Arti

PS - could the pieces be color-moddable? We used to play with glass beads of different colors. :P

You rock!!!!
_____________________
"I, for one, am thouroughly entertained by the mass freakout." - Nephilaine Protagonist

--== www.artillodesign.com ==--