| Author |
Message |
Greg Strong (Mageofmaple)
| | Posted on Friday, April 02, 2004 - 1:20 pm: | |
Hi there! I'm building a chess variant, and I would like a piece that, like the Fire Demon in Tenjiku Shogi, "burns" enemies on adjacent squares (but in this case only orthogonally adjacent squares.) Here's how it would work; after the piece moves, enemies on the adjacent squares are burned. Also, if an enemy piece ends it's move adjacent to the Fire Demon, it gets burned immediately (suicide move). P.S. Unlike Tenjiku Shogi, there's no special case needed if two of the fire-demons move to adjacent squares; it can't happen. They are color-bound on dark squares, and only burn the light squares, so no mutual burn condition is possible. Thanks in advance! Greg |
Greg Strong (Mageofmaple)
| | Posted on Friday, April 02, 2004 - 11:19 pm: | |
Actually, from looking at other games, I see how I can burn pieces as soon as the fire demon's move is completed; it's just the second part that I'm not sure about - the suicide move bit. I've had a couple of thoughts ... 1. Modify the movement of every kind of piece to make sure that it's not adjacent to the fire demon at the end of it's turn, and kill itself if it is. I assume that this would add a lot of overhead, though, and is ugly. 2. A work-around of sorts that adds a new move to the fire demon; a non-move that just burns. In this way, if a piece is deposited next to the fire demon, the owner of the FD just needs to select the null-move and the opponent will be burned. This also seems a little cheesy, though. Anyone have any better ideas? Thanks! Greg |
Jeff Mallett (Jeffm)
| | Posted on Friday, April 02, 2004 - 11:48 pm: | |
#1 isn't bad at all. Just make a macro that checks the adjacent squares for a FD, something like: (define check4suicide (if (or (piece? FD ne) (piece? FD e) (piece? FD se) (piece? FD s) (piece? FD sw) (piece? FD w) (piece? FD nw) (piece? FD n)) capture) ) Then put a macro call (check4suicide) before each "add" (or "to" or "cascade" if a move uses those.) I don't think #2 is what you want, because the owner of the FD really wants to burn the opponent AND make a normal move. |
L. Lynn Smith (Interrupt27)
| | Posted on Friday, April 02, 2004 - 11:57 pm: | |
If the burn/suicide is automatic, just have the following simple string just before the add of each piece: (if (or (piece? X n)(piece? X s)(piece? X e)(piece? X w)) capture) You could make it a seperate declaration, such as kill-piece, and thus reduce the amount of coding. The question is: Does the burn effect apply to both enemy and friend. If no, you will also need to test for the allegience of the piece and the code will read thus: (if (or (and (enemy? n)(piece? X n))(and (enemy? s)(piece? X s))(and (enemy? e)(piece? X e))(and (enemy? w)(piece? X w))) capture) These particular forms of coding can slow the game but only if you have a large variety of them. This one should not have any perceptible effect. |
Jeff Mallett (Jeffm)
| | Posted on Saturday, April 03, 2004 - 12:03 am: | |
L. Lynn has got it right. Use a macro though. |
Greg Strong (Mageofmaple)
| | Posted on Saturday, April 03, 2004 - 1:03 pm: | |
Great, that does the trick! The Zillions program is really amazing; I have a large, complicated chess varient with a few special rules, and I was able to get it up-and-running in less than 2 days, including making some cheazy graphics. I have to say, Zillions is really one of the most amazing programs I've ever seen. It's AI is so good, it can kick my butt at my own game right from the get-go! I did notice one thing that I should report. It doesn't value the pieces correctly in all cases... In particular, consider 2 pieces: the Lion (from Chu Shogi, minus any bizarre lion-lion capture restrictions), and the Air Elemental (which is just a 2-space area-mover.) Zillions believes the Air Elemental to be worth more, despite the fact that the Lion is better in every way... it has the added ability to jump over pieces, and perform igui (riffle) captures. The Fire Demon's ability to burn doesn't seem to get adequate respect from the computer either. Could we get some kind of attribute added to pieces that the programmer could use as a "hint" to Zillions that a pieces' valuation should be bumped up or bumped down by a small percentage? This shouldn't be difficult to implement, and would allow diligent game developers to improve the performance of the AI quite a bit where strange pieces are concerned, and IMHO "strange pieces" are much of the fun of Zillions! Thanks again, Greg |
|