This is a two-player Internet based Java version of the ever popular board game called Stratego.
Despite the fact that I'm a poor looser I've always liked the game.
But I haven't been able to find a computer based version of the game.
At least not one that is free of charge.
Besides all versions I've found were created solely for Windows.
Anyhow why bother with trying to find it when I can make it my self..:)
I first started out with programming the game 2002/2003, but in lack of time (and motivation)
the project was soon put on ice.
In December 2004 I felt that it was time to finish off what I started.
So here we are with my own version of the game.
Most of the features are covered, but there are still some optional things to be done.
Also I've got a long list of nice-to-have features that I'm planning to implement...in the future.
General Features
The game is intended as a two-player game so there is no computer opponent.
The players play againts each other over the Internet.
Basically the procedure is as follows (player A and B):
A) and B) Start the application
A) Sets up a game by choosing "new game" from the menu
B) Connects to A's game server using A's host/ip-address
A) and B) Both players place their pieces, once that's done the game is on
Though by starting the application twice you can connect locally and play against your self.
This might not be too exciting but it allows you to get a feel for how the game works.
If you're really smart you can probably get your brain-halves to compete against each other...;)
Setting preferences
The preferences are set from the menu file/preferences.
Currently the following preferences can be set:
- server port - This is the port to which the game shall listen to for incoming connections [default 6969]
Configuring opponents
The opponents configuration can be found in the menu game/manage opponents.
This is where you add you opponents.
Basically you supply information to where the game connect to.
The following fields are available:
- name - Any name for the opponent
- host - the host name/ip-address to the opponent
- port - the port on the remote host to connect to [default 6969]
- proxy - set the proxy host/port if this is required for your network
- description - any text
Starting a game
In order to get a game running one of the players (called player1) must start a game server.
By choosing the menu game/new game the game will start a port listener on the configured server port (default 6969).
The player who started the game will always be player one (red).
Now the other player (called player2) can connect to the game.
First player2 must configure the game so that it knows to find player1's game server.
This is done from the opponent configuration.
Once the opponent has been configured player2 can choose the opponent from the menu game/connect to.
By default the game is configured with a localhost opponent.
This means that you can start two instances of the game and start the game server on one instance and
let the other instance connect to the opponent called "localhost".
It will let you get a feeling for how the game works.
Placing the pieces
As soon as two players have connected the setup phase starts.
Now both players must place their pieces on the board.
This is done by clicking on a piece and then clicking on any highlighted square on the board.
Pieces can be removed from the board by double-clicking on them.
As in the real board game both players immediately see where the opponents places the piece.
Any time during the setup phase you have the option to save you current setup to file.
This is done by clicking on the second button from the left.
Not all pieces need to be placed in order to be able to save the setup.
Consequently you can also load a setup by clicking on the first button from the left.
Loading a setup will discard the current piece setup.
When all pieces are in place the button to the right in the bottom of the left panel will be enabled.
By pressing this the player confirms the piece setup.
When both players have confimed their setup the game starts.
Playing the game
Each player takes turn to move a piece, starting with player1.
To move a piece first click on it and the click on any highlighted square.
If no squares are highlighted the piece cannot be moved.
When one piece moves into the same square as an opponent piece the battle is resolved and the
loosing piece is removed. If the attacker was the winner it is moved into the square.
Both players will be shown what pieces where involved in the battle.
When the flag has been found the game is over.....
History
Version 1.0
Version 1.1
- The game is automatically ended if one/both of the players cannot move
Version 1.2
- Save/restore initial piece setup - save your favorite piece setups
Create your own killer setups and save them to file.
The piece setups can then be loaded next time for faster game setup.
Not all pieces need to be placed in order to save the setup to file.
Features to come
As with most of my projects I have a load of features that would want to implement.
Unfortunately there never seems to be enough of time.
- Pieces cannot be moved back and forth between the same 2 squares in 3 consecutive turns.
- chat functionality - wouldn't it be fun to be able to annoy your opponent with stupid comments?
- Log panel that shows all old moves, i.e. from/to coords and battle resolution
- Implement functionality to recover a lost connection
- save/restore game - save a game and restart it later
- themes - Various plug-in themes for the board/pieces, e.g. Star Wars, Lemmings
Technically this feature is almost implemented but I'm just to lazy/incompetent with drawing/paint programs
to be able to create good looking theme.
I simply don't have the time/energy to scavenge the Internet for suitable images.
None so far.