Design

From WinBolo

Revision as of 14:15, 1 December 2008 by John (Talk | contribs)
Jump to: navigation, search

The design is as follows

Overview

WinBolo client design overview
WinBolo client design overview

WinBolo code is split in two sections, a back end and a front end.

The back end contains simulation and game logic. It is designed to be 100% ANSI C compliant and to work on multiple platforms. - Currently is it not 100% complient mainly due to C++ style // comments. The front end contains any platform specific code.

The diagram on the right shows an overview of the design. The front end provides the GUI to the users and runs the game. It accesses the backend.

The interface to the backend is via two files:

  • backend.h - Provides access to starting, stopping and updating the simulation
  • network.h - Provides access to the networking functions.

The backend calls back front end functions.

  • frontend.h - Drawing the screen, playing sounds etc
  • netclient.h - TCP/IP communication, sending and receiving packets.


TODO Server

One of the coding principles was to limit the amount of magic numbers present in the code. As such all string constants and numeric values are #define's located in relevant header files. This makes it easier to experiment in changing the values or moving them out to a separate mod file (possibly network downloadable!)

Files

For more information on each part of the code see the pages below. These map the folders in the winbolo/src directory.

Personal tools