This page (revision-4) was last changed on 03-Feb-2023 15:21 by Gromit 

This page was created on 21-Nov-2011 11:12 by Gromit

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note
4 03-Feb-2023 15:21 11 KB Gromit to previous
3 21-Nov-2011 11:22 11 KB Gromit to previous | to last
2 21-Nov-2011 11:17 9 KB Gromit to previous | to last
1 21-Nov-2011 11:12 163 bytes Gromit to last

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 27 added 2 lines
!PLAYING KILLER CHESS
Simply place the cursor over any piece you want to move and press the joystick button. Now move the cursor over a square that would be a legal move for that piece and press the button again. If the move is illegal, the computer will tell you so -with a rather unpleasant sound- and let you try again. Otherwise the piece will be placed at the new square. If you accidentally pick up a piece and don't want to move it, just replace the cursor over the piece you selected and press the button again. The piece will be dropped.
At line 30 added 16 lines
To capture an enemy, simply make a legal move on top of it. The offending piece will be removed from play. You can capture a piece your opponent is "holding". The piece isn't actually moved until it is set down again.
To win, just land one of your characters on top of the opponent's King. To return to the title screen press [[START] or wait about 10 seconds.
Killer Chess does not have castling or en passant moves, which are allowed under advanced chess rules but would be too confusing here.
!ABOUT THE PROGRAM
The biggest programming problem in Killer Chess was detecting illegal chess moves. My solution is quite simple and can be applied to any chess program. The method is even fast enough to be used with BASIC.
Here's what I did: When a piece is selected, its old position is recorded. Each new position chosen by a player is also recorded. The old position is then subtracted from the new position and stored in a "delta" value, one delta for X and one for Y Delta means how much something changes. So if the new X position is 5 more than the previous one, the Delta X would be five. If the new Y position is 1 less than the old, Delta Y would be -1.
I then used IF statements to determine if the piece was allowed to move to that spot. For instance, a pawn is only allowed to move forward, so I checked to make sure that Delta X is equal to nothing but 1. If the old position was equal to its starting position, I allowed it to move an extra space-because Pawns can move two spaces on their first move.
If the Pawn's new position is on top of an opponent's piece, I allowed for a Delta Y movement of either 1 or -1. Combined with the Delta X, that would result in diagonal movement. Simple, really. It just took a bit of planning to work out the values for the special conditions of each chess piece.
----
''Greg "Maddog" Knauss of Rancho Palos Verdes, California is an indefatigable ACTION! language programmer''