| Author |
Message |
Adam R. Wood (Zotmeister)
| | Posted on Thursday, October 26, 2000 - 6:49 pm: | |
I am trying to implement a two-player Chess-like game where if White meets his victory condition (capturing both Black "rooks"), but Black could meet *his* if he had one more move to make, then the game is drawn. This is not the situation with the colors reversed - it is based on the fact that White took the first turn. I do not know if this is even possible to implement under Zillions as it stands, but if it is, I figure the reasonable way to do it would be to simply ensure both players get an equal number of turns and only check for the victory condition after Black's turn... Is there some clever way to define the turn order so as to prevent Zillions from giving the win to White immediately, or is this completely hopeless? |
Roger J Cooper (Rogercooper)
| | Posted on Saturday, October 28, 2000 - 5:38 am: | |
This is similar to a problem I had implementing the chess-like game 'Jeson Mor'. In that game a player wins by occupying the center square for 2 consecutive moves with the same piece. (All pieces moved as knights) I resolved the problem by promoting the piece on the center square to a new piece. The victory condition was to have promoted-knight on a square a knight-move away. You might be able to handle this in the same fashion, depending on the details of your variant. White when achieving the formal victory condition gets a special piece which can then execute the victory in Zillions on the next move. |
Dan Troyka (Dtroyka)
| | Posted on Saturday, October 28, 2000 - 10:52 am: | |
I'm not aware of an easy solution to this problem. If Roger's suggestion doesn't solve it, perhaps you can work around it as follows: In your piece definitions, define the Black Rook and White Rook as separate pieces. In the board definition, create dummy spaces d1 through d5. Now when a Black Rook is captured, cascade it to d1. If d1 is occupied (because White has already captured one Rook), cascade it to d2. Use d3 and d4 similarly for Black. When Black moves, test to see if d2 is occupied (i.e., has White captured both Black Rooks). If d2 is occupied and Black's move does not result in a cascade to d4, cascade a dummy piece onto d5. Now set your win conditions as absolute-configs so that White wins if d2 and d5 are occupied, Black wins if d4 is occupied and d2 is not, and a draw is declared if d2 and d4 are both occupied. I have no idea if this will work. Although there are probably better examples, I used a dummy/cascade workaround in a variant in the game Hyperspace. The cascade commands used in the Chess castling definitions and Shogi prison management may also be helpful. An alternative approach may be to define White's moves so that if a second Black Rook is captured, and white has one remaining Rook, and that Rook is attacked, then the Rook is captured as part of White's turn. This *might* solve the problem, since the win-condition would be met for both players when the move is added. But it would be confusing to the players. I have this same "courtesy move" rule in a game I hope to implement shortly. I think it would be nice if Zillions added a "last move" option that you could set to true to give one or both players a last move after a win condition has been met by an opponent. I would also recommend a goal-priorities option (structured like move-priorities) to deal with the problem of multiple goals being achieved in a single move. |
Derek Nalls (Omegaman)
| | Posted on Wednesday, February 09, 2005 - 9:47 pm: | |
Yes! Exactly what you want can be handled flawlessly by the Zillions program (as is). The best example I know of can be found within the 31 games of my own Symmetrical Chess Collection: http://www.symmetryperfect.com/shots Download it, examine any *.zrf in detail, copy and paste, modify ... until it loads and works correctly for your game. Fundamentally, a balanced W-B-B-W turn-order is used where the game ends only at the completion of the current 4-move cycle in which one or both royal pieces are captured (as a win, loss or draw for white or black). As a matter of course, this can easily be modified into a W-B turn-order where the game ends only at the completion of the current 2-move cycle in which one or both royal pieces are captured. ALL credit for this brilliant, smoke-and-mirrors manipulation of dummy pieces goes to the L. Lynn Smith. Like you, I was stuck cold on the problem. Undoubtedly, you wanted a reply over 4 years ago. I just hope you are you still there- holding the phone in your hand? |
|