Main.SideBar (edit) |
Main /
DesignBosons code is based on the document-view design. The "document" is traditionally called the "gameengine" in games. The center of the gameengine is the "Boson" class. It does the player management and controls the network. Furthermore the "Boson" class reacts to the playerinput.
It contains the "BosonCanvas" class, which is probably the most important class, as it contains the items (units and shots) of the game, does the collision detection and the actual game flow.
A UML diagram of the gameengine can be found here (made on 2005/08/30, keep in mind that UML diagrams tend to get out of date quickly!):
An IO can be added/removed on runtime. On the other side is the view of the application. It consists of the main window which contains
(I tend to use the word "View" for the whole thing and "gameview" only for the part that displays the actual game) The "gameview" is a widget that displays the game - the canvas (or map) ("canvas renderer"), the commandframe, the minimap, ... The View also controls the gameengine, that is it is responsible for creating the gameengine and for sending input to it (e.g. by converting mouse clicks to unit moves). All GUI and and UI takes place in the View. Therefore it is under heavy development most of the time and at least currently there is no UML diagram available. |