To configure the client, edit this config file. His documentation can be found here.
To configure the server, edit this config file. His documentation can be found here.
- In particular, the following constants are convention, fixed in the specification:
- LX_CST=11 – dimension of the board for x (horizontal),
- LY_CST=11 – dimension of the board for y (vertical),
- NB_PLAYER=3 – number of client for the game,
- pv_Init=3 – initial number of PV for a player (have to be the same both in client and server),
- force_default=4 – distance of explosion for a bomb (only fixed for the server),
- NB_BOMB_MAX_ALLOW=1 – max number of bomb allowed to be possessed by one player at any moment,
- PORT_INIT=12882 – default port for the client and the server.
- a spot is free (i.e. a player can move there) if there is no wall (destructible or not), and if there is no bomb. It is better because that allows players to block each other with their bomb (and, of course, to be blocked by their own bomb).
- that mean a spot is free even if a player is already in it.
- when the explosion of a bomb reach an other bomb, it should trigger the explosion of the new one (that allows chain reaction, and it’s more funny).
- a bomb should hurt a player regardless of who initially plant it.
- the server is the oracle for the game : from the point of view of the client, each order coming from the server is to take au pied de la lettre, i.e. as pure truth (that means, no verification of incoming order is required, even in a good client).
The constants are sorted by modules. Some tool functions are also defined here, mainly for textual mod (TUI).
Number of player for the game.
Dimension of the board, over the x axis (horizontal)
Dimension of the board, over the y axis (vertical)
Have to be the same for all player
To erase the current screen.
Clear the screen if [PRINT_CLEAR_EACH_TIME], then print [e].
Turn off the support of ANSI Colors. Can be used other somewhere else, or on other modules, AFTER importing ANSIColors module !
Turn on the support of ANSI Colors. Can be used other somewhere else, or on other modules, AFTER importing ANSIColors module !
Distance of explosion.
In seconds. For the server only.
Power of explosion.
No player owner the empty default bomb.
Number of tic with one tic() application.
They have to not be modified by some exterior stuffs
They have to not be modified by some exterior stuffs
Signal returned by the destroy method over a state, if it hurts a player
Signal returned by the destroy method over a state, if it hits a bomb
To know if an explosion is stoped by a destructible wall when it is destroyed.
Max Length of the board over X axis
Max Length of the board over Y axis
Nb Max of player over the board
Warning
Delete it : useless.
The default pseudo is your UNIX login, appended with the PID of the current process. This is mainly to force the introduction of differents pseudos for testing.
The default color
FIXME find a way to receive it from the server.
No bomb on the board initially
Default position for x
Default position for y
The type of i or j in Player.Player.move was not an integer
i in Player.Player.move was not a valid integer
j in Player.Player.move was not a valid integer
The default pseudos
For the bots.
The default colors
For the server : choose where it is hosted. (simple values, used by server AND client for Bomberman)
The port of the listening connection for the server.
Default value, for testing
To know what message have to be printed or not (better is True)
To know what message have to be printed or not (better is False)
1 to print messages
0, or 1 or 2. 0 is cool (players are initially put in the corner).
Max number of bombs allowed to be droped by one player. Ok that works (can be changed).
Starting position, returned as a couple of a list of [nb] integer. Usefull to make the map : there is currently 3 different types of starting values :
- type = 0:
On the corner, and on the diagonal, near to the corner.
- type = 1:
Near to the center.
- type = 2:
Again nearer to the center.
The map is supposed to be just of size 11x11.
8 pseudos and different colors for initializing the datas only. The server have to wait for real connections to be able
to know the real colors and pseudos of the players.
For ParseMessageIn and ParseMessageOut About pickling : to save and restart variables.
If true, use a pickling file to save current game state for the server
For storing all incoming connections in BombermanServer.py.
If true, use somes tools with a database of all known clients. And print a warning when a new client is detected.
Warning
This is still experimental and quite limited.
Not yet implemented.
Try to know if music will be used.
Try to know if sound effects. will be used.
Try to know if a graphical window will be used.
Try to know if notifications (with notify-send) will be used.
Number of loop each seconds.
To use the window in Full screen.
Warning
By now, fullscreen mod is not supported.
When the game is done, a final music is played during this period of time.
Time for the bombs ?
with probability PROBA_UMUR, a spot is undestructible.
with probability PROBA_BONUS, a spot contains a bonus. Unused right now.
If true, send messages to client when a new player is connecting or disconnecting.
An other experimental functionnality : use differents frames for displaying the player. That means: one picture for all directions (up, down, left and right). By now, it works, but all player look the same (so it less pretty to use it)
To be very verbous with all outputed messages (i.e. send to the network), produced with ParseMessageOut
To be very verbous with all parsed messages, produced with ParseMessageIn