Rock-Paper-Scissor as a board game ! Log Out | Topics | Search
Moderators | Register | Edit Profile

Zillions of Games Discussion Forum » Designing Games for Zillions » Rock-Paper-Scissor as a board game ! « Previous Next »

Author Message
PETIT Xavier (R23sakamoto)
New member
Username: R23sakamoto

Post Number: 1
Registered: 8-2011
Posted on Thursday, August 18, 2011 - 7:14 pm:   

Hi.

I'd like to write a zrf.file for a simple game (or so it seemed before I tried) but I'm clueless about a thing or two.

If someone is fluent in zrf programming, maybe he would help...


Here is the game : it's basically about playing Rock-Paper-Scissor as a board game, except that a 4th option has been created : the well.

Paper beats Rock and Well
Rock beats Scissor
Scissor beats Paper
Well beats Rock and Scissor



it's played on a 7x7 board, with fixed positions for each piece.
a1 a2 a6 a7 b1 b2 b6 b7 f1 f2 f6 f7 g1 g2 g6 g7 are killed so the board looks like a cross.

(board-setup
(White (Scissor c6 d7)
(Well b5 f5)
(Paper e6 c7)
(Rock d6 e7)

)
(Black (Scissor d1 e2)
(Well b3 f3)
(Paper e1 c2)
(Rock c1 d2)
)
)


I've drawn the board and pieces. I've got them to move in any legal direction (1 square in any direction, king-like move for every piece). Capture is done as you move.


Here are the rules :

1°) When a piece captures another, you get to play another move for this piece.

add-partial doesn't help much here as the extra move isn't necessarily a capture (it's more usually like the igui move from chu shogi : the piece captures the other piece and go back to its previous position)

2°) Your piece can stack on a friendly piece (or any friendly stack of piece) but you can only move the upper piece.

Needless to say I'm clueless how to solve this problem.
I thought to design a 3D 7x7x8 board (covered piece would go under one level and only come back to the surface when the upper piece leaves, but that is probably too complex and an easier solution should probably be available).

The order in the stack is important and should be saved somewhere + I decided not to create 8! piece types.

Any idea how to do ?

3°) About the win / loss conditions :

anytime a player has 100% pieces that can no longer make a capture (for ex : player 1 owns 1 scissor + 1 Rock and player 2 owns a single Well => player 1 should lose the game).

Is there a simple way to code this ?

Any help on any topic would be appreciated !!!

thanks.
Karl Scherer (Karl)
New member
Username: Karl

Post Number: 393
Registered: 9-2000
Posted on Thursday, February 09, 2012 - 2:33 am:   

I have published quite a few stacking games, such as
Stacks, Stacksa, Stackso, Staxa, Staxo.
I suggest you study them.

Looks to me like you could just copy the technique
used there for your game.
Karl Scherer (Karl)
New member
Username: Karl

Post Number: 394
Registered: 9-2000
Posted on Thursday, February 09, 2012 - 3:45 am:   

to part 1:
create a reminder-piece (on a dummy position z0) when you capture.
When it is the opponent's turn, check for this reminder-piece to force a pass-turn for the opponent (option pass-turn forced).
Now the first player has a second turn because his opponent is forced to pass.
Karl Scherer (Karl)
New member
Username: Karl

Post Number: 395
Registered: 9-2000
Posted on Thursday, February 09, 2012 - 3:51 am:   

to part 3:

I see no other way but to create a routine that counts the own pieces and also counts the opponent's pieces and then compares the various counts.
You might need to use a Neutral (or ?Random) player to execute this routine.
Karl Scherer (Karl)
New member
Username: Karl

Post Number: 396
Registered: 9-2000
Posted on Thursday, February 09, 2012 - 3:55 am:   

to Part 3:

A much simpler way is to keep tokens on dummy positions which represent the pieces left for either player (when a piece is captured, you delete the representing marker on the dummy position).
These positions can be a special grid (recommended).
Then the special win-routine just has to check whether certain counters are on these dummy positions.

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action: