Laserchess

By Andre Sihera

Originally published in EUG #69

After 16 years sitting in a disk box, I found this game as I was rummaging through my old Electron programming disks over Christmas 2005. I never was much of an arcade programmer, even though I was heavily into real-time programming and writing highly optimised and performant code at the time. However, I liked my board games and I happened to find this previously unreleased game that I had completely forgotten about.

Laserchess was originally a submission in a programming competition and won $10,000 for its inventor, Mr. Mike Duppong, in 1987 when it was published in Compute magazine. I saw both the Atari ST and Apple II GS versions at schoolfriends' houses in 1989 and knocked up this version in 1990. I intended to submit it to Superior Software for consideration and even wrote a letter to Mr. Hanson himself (dated 28 March 1990, using Acornsoft View of course) explaining my development. However, for some reason, I never sent it. I don't remember exactly why I gave up, but I do remember thinking at the time that 2-player board games were not as saleable as "player vs. computer" board games (e.g. Acornsoft Chess) and, because I hadn't written an AI engine for the player to go up against, I was probably thinking at the time it would not be a particularly sellable game.

The game was written in 100% assembly language, although it took two attempts to get to a working game. The first attempt failed due to lack of memory on compilation. It was developed using my own macro assembler and sprite editor on an Electron with &1D00 ADFS. However, as the source code compiled at &1D00 this left little space for the source itself. So, after re-writing my macro assembler to use multi-file assembly, I managed to remove the limit on the source-code size. From there, the second version of the game was completed in just six days.

I think some of the design decisions were quite interesting. For example, on an Electron you might notice that rotating a piece anti-clockwise is slower than rotating it clockwise. To save me writing an anti-clockwise Mode 2 rotation function I decided it was easier to rotate clockwise three times to achieve the same effect. Similarly, there is only one copy of each of the 8 basic pieces kept in memory at any one time; piece duplication, rotation, and colour-swapping all being done in real-time to reduce the game's memory footprint. Also, I decided to program a Monochrome video option that changed all the colours to maximise visibility on a green or amber monitor, a first I think even at that late stage in the BBC/Electron software scene. Amusingly, a very silly bug survived all these years where the menu screen always says "Press RETURN to start a new game", even when you're in the middle of a game and RETURN is used to return to the game, not abort it. Well, hopefully that was the only bug that got away!

Anyway, the game is release quality and is completely playable. Enjoy!

Objective

The objective of the game is to capture the other player's King (the diamond) either directly with another piece or by shooting it with your laser. You have eight types of piece in total including your King, your Laser, an assortment of pieces that have various (light-coloured) mirrored faces, and a Hypercube which has the ability to bend time and space and transport any piece to another part of the board.

Setup and Additional Keys

Before loading or saving a game, filing system preration can be performed by selecting "3" ('*' Command) at the main menu and issuing a '*' command (e.g. "*DIR"). Tape users can issue a *CAT command to locate the appropriate tape position. However, due to an oversight it is not possible to exit any Tape-based '*' command via Escape as the Escape key is disabled at that time, only via BREAK (this should not be a problem for emulation users although it will be a problem if you decide to create a real Tape Image of the game to play on a real machine).

For those using a monochrome monitor, a high-contrast mode can be selected by pressing "4" (VDU Colours) at the main menu.

By default, the Red player starts the game. This can be changed by pressing "7" (Start Player) at the main menu.

Piece manipulation keys are fully explained by pressing "6" (View Keys) at the main menu.

Pressing Escape at any time during game play returns you to the main menu.

The current game can be aborted at any time by pressing "8" (Abort Game) at the main menu. Pressing RETURN will then start a new game.

The Laser Piece

Each player has a laser, which can fire a single laser beam each time. The laser beam is reflected by any mirror that it hits. The exception is the Prism piece which, if hit head on at the apex, splits a single laser beam into two separate beams, with each beam travelling independently of the other. The laser beam can cross itself or even overlap itself, retracing a previous path. It may also re-enter the laser that fired it, destroying that laser.

It is possible for a laser to be reflected indefinitely given the right mirror configuration. To prevent an infinite length laser beam situation from arising, a laser beam will fade away after a fixed distance travelled.

The Hypercube Piece

The Hypercube (the hollow square piece) has the ability to bend time and space and transport any piece to a random unoccupied part of the board. This applies to both your pieces and your opponent's. Also, as the hypercube bends time and space, it cannot be shot with a laser. Instead, the Hypercube tampers with any approaching laser such that the laser appears to pass straight through the Hypercube unhindered as if the Hypercube weren't physically present.

The Board

The board contains a single white square in the centre. The laser cannot pass through the centre white square so beware firing your laser into it.

Whenever a piece moves over the centre square, that piece is transported to a random unoccupied part of the board, similar to the function of the Hypercube. As a result, no piece may pass over the centre square. A piece may only move onto the centre square. The centre square's hyperspace facility may only be used once in per turn.

Piece Control

Each player's turn consists of making two separate "moves". Every movement of a piece from one square to a neighbouring square costs one move. Also, firing your laser and using the Hypercube both cost one move. Finally, rotating a piece by any amount costs one move.

Your Laser and Hypercube may only be used once per turn, although both may be used once within the same turn.

A cursor (the light-coloured square frame) is used to indicate which piece is to be actioned (e.g. rotated). At the beginning of a new turn, the cursor is always placed at the centre white square. Pressing Space selects the piece surrounded by the cursor and pressing Space again deselects that piece and confirms any move(s). Once a piece has been selected, the cursor will start flashing. In this phase the computer will permit moves to be tested before they are confirmed. At all times the number of remaining moves in a turn is displayed to the left of the board. When all moves in a turn have been used the turn ends and the computer transfers game control to the other player.

Capturing and destroying Pieces

Taking or destroying pieces is the only way to gain ground on your opponent, removing your opponent's King's protection and also removing potentially hazardous mirrors used for destroying your own pieces. Taking or destroying a piece permanently removes it from the board.

Only certain pieces are allowed to capture other pieces and the computer indicates this by a piece's ability to move on top of another piece during piece selection. However, whilst you can move on top of some pieces in order to take them, you are not allowed to move off a piece (during piece selection) in any direction except the direction you came from, effectively blocking your ability to "jump" over a piece. Therefore, to move from one side of a piece to the other whilst moving through it you have to take the piece you are attempting to move through. This includes your own pieces as well as your opponent's.

To shoot your opponent's pieces you have the option of reflecting your laser's beam onto your opponent's pieces using mirrors. Some pieces have mirrors and these are indicated by the thin, light-coloured faces on each piece. If a piece is hit by the laser on a side on which there is no mirror then that piece will be destroyed. The only exception to this is the Hypercube which cannot be shot.

Summary information about each piece's ability to take, be taken, and be shot, is available at any time by pressing "5" (General Info) at the main menu. In the table, the "Tak" column indicates if a piece has the ability to take another piece, the "Rot" column indicates whether a piece can be rotated or not, and the "Lzr" column indicates whether a piece can be shot or not by a laser (providing that a non-mirrored face is hit). Note that whilst not all pieces can take another piece, all pieces can themselves be taken by another piece moving directly on top of them.

Good luck!