Senet - an ancient Egyptian board game

Share your games and programs with the community.

Senet - an ancient Egyptian board game

Postby DelphiMarkus » Sun Jul 27, 2014 5:42 pm

Hi!

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. :D

So, I'm presenting Senet on the Gamebuino:
Senet_r8_ingame.gif
single player mode ingame
Senet_r8_ingame.gif (4.71 KiB) Viewed 10417 times


After winning the match:
Senet_r8_07.png
game over screen after winning
Senet_r8_07.png (1.17 KiB) Viewed 10674 times


I finally got a better title screen:
Senet_r16_01.png
title screen
Senet_r16_01.png (1.52 KiB) Viewed 10417 times



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 ;) )
Last edited by DelphiMarkus on Mon Aug 11, 2014 3:31 pm, edited 4 times in total.
User avatar
DelphiMarkus
 
Posts: 20
Joined: Sun May 04, 2014 7:59 pm

Re: Senet - an ancient Egyptian board game

Postby CoolNinja2 » Sun Jul 27, 2014 6:43 pm

Great game! Think I may have a new addiction! I'm still excited for multiplayer support, but I'm content with CPU for now!
CoolNinja2
 
Posts: 4
Joined: Sun Jul 27, 2014 6:39 pm

Re: Senet - an ancient Egyptian board game

Postby finalzero » Mon Jul 28, 2014 2:11 pm

Hello there,
I would like you to explain to me the value of parts of your game!
Is that a piece can absorbed?
when does the game end?
thank you to you;
it's great what you did, congratulations to you :)

ps :
I served as a translator on the internet, I do not know if it will be readable because in the French language I made ​​a lot of mistakes ...
finalzero
 
Posts: 51
Joined: Fri Jul 18, 2014 12:12 pm
Location: France Montpellier

Re: Senet - an ancient Egyptian board game

Postby erico » Mon Jul 28, 2014 3:44 pm

This is a neat game!
A friend of mine just got the board game as a gift for his son...what a coincidence. ;)
User avatar
erico
 
Posts: 671
Joined: Thu Mar 27, 2014 9:29 pm
Location: Brazil

Re: Senet - an ancient Egyptian board game

Postby 94k » Mon Jul 28, 2014 4:30 pm

I'm sorry if that's a stupid question, but how do I compile your source? I cloned the repo but arduino wants a scetchfile in it's own directory and there's no Makefile.
User avatar
94k
 
Posts: 44
Joined: Sun Jul 27, 2014 9:41 pm
Location: Germany

Re: Senet - an ancient Egyptian board game

Postby rodot » Mon Jul 28, 2014 4:34 pm

I guess you simply open senet.ino in the Arduino IDE and compile it? Of course you have to set up the Gamebuino library first.
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Senet - an ancient Egyptian board game

Postby 94k » Mon Jul 28, 2014 4:41 pm

That's exactly the problem, the arduino IDE complains about the missing sketch directory. I could move it but I'm pretty sure it would break dependencies.
Attachments
2014-07-28-184034_371x118_scrot.png
2014-07-28-184034_371x118_scrot.png (6.31 KiB) Viewed 10585 times
User avatar
94k
 
Posts: 44
Joined: Sun Jul 27, 2014 9:41 pm
Location: Germany

Re: Senet - an ancient Egyptian board game

Postby rodot » Mon Jul 28, 2014 5:27 pm

Oh, that's not a problem, rename the containing folder to "Senet" ;)
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Re: Senet - an ancient Egyptian board game

Postby 94k » Mon Jul 28, 2014 5:31 pm

I did, but there's other files beside it, and I'm pretty sure that Senet.ino uses them, so putting Senet.ino in a folder alone most likely won't work either.
User avatar
94k
 
Posts: 44
Joined: Sun Jul 27, 2014 9:41 pm
Location: Germany

Re: Senet - an ancient Egyptian board game

Postby rodot » Mon Jul 28, 2014 5:35 pm

I didn't tell you to put senet.ino in a subfolder, but to rename the folder containing all the files to "Senet". Does that work then?
User avatar
rodot
Site Admin
 
Posts: 1290
Joined: Mon Nov 19, 2012 11:54 pm
Location: France

Next

Return to Games Gallery

Who is online

Users browsing this forum: No registered users and 24 guests