As I got my Gamebuinos on Thursday and I'm done with my exams, I started programming for the Gamebuino. I already had a foundation for my first game as I wrote a game logic for Senet in Pascal and ported it over to C to build a game for the GB. Now I'm pretty much finished with the first game mode and ready to present this game to you.
Senet is an old Egyptian board game played by Pharaohs and other noble people. As the game is very old there are many variations of the rules to play it. I searched some time on the Internet to find some rules I thought were nice. And luckily they were rather easy to implement, too.
The game currently features:
- Single player game against CPU
- hot-seat multi player support (for everyone without a 2nd GB )
- multi player support (still BETA a bit buggy...)
Planned features:
- - none -
The AI is probably not the best one as this was my first attempt a AI. But as the move count is random (but with a special distribution which the AI could use to calculate better moves) I was not yet able to build a better AI. But it's still enjoyable to play against the CPU.
So, I'm presenting Senet on the Gamebuino:
After winning the match:
I finally got a better title screen:
Controls
There is some help in the main menu and some of the controls are explained by another menu entry.
After starting the game it shouldn't be that hard to control and as it's a board game you have enough time to figure out how it works. Your name (when you set one by using "settings.hex") is displayed in the upper left-hand corner. If it's your turn the name will be underlined, otherwise CPU is underlined.
The very first move in a game must move the piece on the highest square. So if you play with 3 pieces per player, the highest square with a piece is square 6. If you try to move a wrong piece "Can't move piece" pops up. If you try to move one of your pieces that cannot be moved in the way you want it to "Invalid move" pops up. You can only move one piece per turn and you have to move it as far as stated in the middle above the board. If there is no possible move forward, the game automatically switches to backward mode (another popup is displayed then) and if even that does not help, the game skips your turn automatically.
You select a piece by moving a blinking cursor around. Select the square the piece you want to move is on and press A to move it.
The cursor is automatically set to the one of your pieces which stands on the lowest square (handy when there is only one piece left). You can cycle through all possible moves by holding DOWN longer than 1/4 second.
Button B does nothing so far...
Rules (see README.md)
- Code: Select all
1.1 Game Setup
**************
When starting the game you can choose how many every player gets (min 3, max 7).
Which piece you will get is shown in the "Game Setup" next to "Your pieces:":
+-+ +-+ +-+ +-+ +-+
| |_| |_| | | |_____| |
|__ __| |___ ___|
| | OR / \
| | / \
| | / \
|___| |_________|
Which one you get is randomly chosen.
The pieces are placed on the board alternating, starting from square 1.
The board looks like this:
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| | | | | | | | | | |
| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| | | | | | | | | | |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| | | | | | O | | | | |
| 20 | 19 | 18 | 17 | 16 | + | 14 | 13 | 12 | 11 |
| | | | | | | | | | | |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
| | | | | | +++ | ~~~ | | | |
| 21 | 22 | 23 | 24 | 25 | OOO | ~~~ | III | II | 30 |
| | | | | | | ~~~ | | | |
+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+
Special names of some squares:
15: House of Rebirth
27: House of Water / Water Trap
1.2 Game Start
**************
The first move in every game MUST move the piece on the highest square. E.g. if
you are playing with 3 pieces per player, the piece on square 6 must be moved
by the first move.
1.3 Game Play
*************
Every turn starts by throwing the paddles (done automatically by the game, see
the blinking rectangle above the board). There a set of four paddles which have
two sides: a black and a white one. Your step count (short: steps) is determine
by the number of white sides you throw. There is a special rule: If you get 4
black sides, you get 6 steps.
If you get 1, 4 or 6 moves, you also get the next turn which means you have to
throw again. You could say that your opponent passes his next turn.
The relation between white sides and steps is shown in this table:
+-------------+------------+-------------+ +-------------+
| white sides | step count | throw again | | probability |
+-------------+------------+-------------+ +-------------+
|(4x black) 0 | 6 | Yes | | 6.25% |
| 1 | 1 | Yes | | 25.00% |
| 2 | 2 | No | | 37.50% |
| 3 | 3 | No | | 25.00% |
| 4 | 4 | Yes | | 6.25% |
+-------------+------------+-------------+ +-------------+
Every turn you must choose one of your pieces you want to move by your steps.
You cannot split your steps between multiple pieces. Usually you are moving your
pieces forward but if it is not possible for any of your pieces to move
forward, you need to move backwards (according to the same rules). If even
that is impossible your turn is skipped.
If you land on one of your opponent's pieces you exchange places this is
called an attack. You cannot attack your own pieces. You need to search for
another move then.
There are some restrictions for your moves:
* Safe squares: Squares 15, 26, 28 and 29 are safe. You cannot attack a piece
standing on one of these squares.
* Defence: Two or more opponent pieces in a row (consecutive) cannot be
attacked. They defend each other.
* Blockade: Three or more pieces in a row cannot be passed they block your way.
But blockades cannot turn around corners (sq. 10-11 / 20-21)
* Trap: There is a trap of water on square 26. If you fall into it your piece
goes back to square 15 (House of Rebirth) or the first free square before
(sq. 14 to 1) as you are not allowed to attack an opponent's piece while
you are dead. ;)
* Exit: You may not move past square 30. A piece on square 30 can be removed at
the START of your turn if all your pieces are out of the first row.
1.4 Goal
********
The goal is to get all your pieces to field 30 and remove them from the board.
The player who is the first to remove all his pieces wins the game.
Download
Binaries: https://bitbucket.org/DelphiMarkus/senet-for-gamebuino/src/default/binary/
Latest source & binary: https://bitbucket.org/DelphiMarkus/senet-for-gamebuino/get/default.zip
BitBucket repository: https://bitbucket.org/DelphiMarkus/senet-for-gamebuino
Cheers,
Maximilian (yes not Markus )