Welcome to MPRI Bomberman’s documentation!

Welcome in the main page of the MPRI Bomberman project (for the MPRI 1-21 lesson), a multiplayer Bomberman game.
This project is currently in version 1.2, release public. Last update of this doc was made Wednesday 26/06/2013, at 12h:00m:42s.


The main author is Lilian Besson. For a complete thanks list, see Authors (file AUTHOR).


The report is the main document, available here.
This document is the one gave for the last presentation to the examinators.

See also

This is the main page of the doc for my project, but there is other resources on-line :

  1. This project is also hosted on bitbucket, see here.
  2. The project can also be downloaded with this archive, here projet_reseau.tar.xz.

More details

  • About the game : the server or the client.

  • About the conventions and the constants for the game, details can be found in the doc of the Constants module.

  • About the network protocole, details can be found in the doc of one of the ParseMessageIn , or in the ParseMessageOut modules.

  • About the GUI, details can be found in the doc of one of the AffichPygame module.

    In particular, the header of the doc of this module explain where to find the soundtrack and the pictures for GUI, realised with PyGame.


Neither the soundtrack nor the pictures are released under the GPLv3 license, because they are non-free resources.


This show how the textual mode looks like in the end of game (for the client) :


More examples are shown in other pages.



The project is entirely written in Python, version 2.7.3.
For more details about the Python language, see the official site.

Python 2.7.1 or higher is required.

The project also require the following unusual module(s) :
  • pygame (for GUI): can be found here.
  • scanf (for parsing) : it is distributed with the project. You can also download it from here.


The project have been developped on GNU/Linux (Ubuntu 11.10). It also have been quickly tested on Windows 7 with the Cygwin environment and Python 2.7.


It shall also work on Mac OS X, but not been tested.
Any suggestion or returns is welcome ! Where things can be different between Mac and the others plateform is with the sockets (Linux use BSD sockets, and Mac don’t). In particular, some network error handling can work on Linux but no on Mac.

What is the important part ?

The project is in two parts : a server, and a client, represented as the two following Python scripts :
Those two can be called with the option –help to show how to used them.
All options are explained in this help message.

How to quickly use it

If you simply want to use it, follow those points :

  1. In a first terminal, launch a server (for example from the computer opened on the web, and known as bomberman.crans.org):
$ ./BombermanServer.py –server bomberman.crans.org –port 13882

This launch the server, listening on port 13882. The game will be launched with a board 11x11, waiting for 3 players.

  1. In a second terminal, launch a client and connect it to this server:
$ ./BombermanClient.py –server bomberman.crans.org –port 13882 –pseudo “Luke” –color “blue”

This launch the game, playing with the server previously launched, and with a player called “Luke”, and colored with blue. This game used an interactive window (GUI) if possible, otherwise it will try to launch in text mode (TUI) but the TUI is still experimental.

  1. Find 2 other friends to play with you, tell them the –server and –port argument for their client, and that’s it !
  2. More options :
  • –music, –nomusic : enable, or disable the soundtrack during the game (for the client),
  • –soundeffect, –nosoundeffect : enable, or disable the soundeffect during the game (for the client),
  • –ANSI, –noANSI : idem for the ANSI escape color codes,
  • –noUTF : might also be able to force pure ASCII text mode (it works, but it is uglier than with UTF8 !),
  1. Moreover, the two files ConfigClient and ConfigServer can be edited to keep your favorite parameters from one session to an other.


If you are interesting, an experimental bot is in progress. That mean, a program that play by itself.
By now, it is quite limited, but it works :) Of course, a human player will beat an automatic one very easily, but at least this allow to test everything without switching between 3 windows to play successively one of each players. And as far as I tried, one human player vs 7 bots can’t win ;)


This project is released under the GPLv3 license, for more details, take a look at the LICENSE file. Basically, that allow you to use all or part of the project for you own business.

Static analysis

A static analysis of the code is done when the documentation is generated.
This use pylint, and the precise result can be consulted here. Pylint have evaluate my code : Your code has been rated at 8.79/10 (this mark is automatically inserted when generating the documentation).


In fact, that prove a kind of correction of the code : many differents things are checked by Pylint, so if this score is > 8, it is a very good sign to say that my code works well. Or at least, that the sofwares are not statically too wrongs...

Moreover, this UML diagram is generated with PyReverse (see this page for more details).


This diagram presents the links between all the modules (i.e. the scripts .py) in the project :

The colors have their importance. (Description is coming soon...)

Indices and tables

Table of contents


Examples of run

Textual example

This show how the textual mode looks like during the game with one server (and 3 bots). The server is in the left top corner.

Graphical example

This show how the graphical mode looks like during the game with one server (and 3 bots).

Authors (file AUTHOR)

List of contributors:

Main author : Lilian BESSON (mailto:lilian.besson@normale.fr).

Thanks to:

  • Vincent Le Gallic (mailto:vincent.legallic AT crans DOT org),

    for our work with Sphinx documentation generator.

  • [http://www.softicons.com/icon-tools/icon-converter]

    for the icon-converter tool, allowing many different player pictures in 48x48 pixels.

  • Yann Duplouy (mailto:yann.duplouy AT crans DOT org),

    for a tutorial about ‘’argparse’’ command line parsers auto-generator.

  • Vincent Cohen-Addad and Lucas Hosseini ({vincent.cohenaddad|lucas.hosseini} AT ens-lyon DOT fr),

    for the semantic, the network protocole, and the syntax of network messages.

  • And my little brother, Fabian,

    for his help when choosing the game soundtrack and the picture for the caracters.

Extract of the license

MPRI Bomberman Project (1-21) Copyright (C) 2012-13 Lilian Besson

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/>.

New in version 0.8.

Used sofwares