Wartbed:Design
From Dark Omen Wiki
(→Model-View-Controller: Moved section to Wartbed:Architecture/MVC) |
(→Strictness of MVC organisation: +Link to Wartbed:Architecture/MVC) |
||
Line 129: | Line 129: | ||
===Strictness of MVC organisation=== | ===Strictness of MVC organisation=== | ||
+ | :''See [[Wartbed:Architecture/MVC|Architecture/Model-View-Controller]]'' | ||
Had all code been locally written WARTBED could maintain ideal separation between the components. However, the Controller will have to react to purely cosmetic (user interface) user input and dispatch appropriate orders to View subsystems (f.i. selecting and outlining a particular unit). The controller will thus need knowledge about and access to View objects. | Had all code been locally written WARTBED could maintain ideal separation between the components. However, the Controller will have to react to purely cosmetic (user interface) user input and dispatch appropriate orders to View subsystems (f.i. selecting and outlining a particular unit). The controller will thus need knowledge about and access to View objects. | ||
Likewise OGREs built-in functions for line-of-sight, geometry collision and object picking will be utilised, which will validate the separation between Model and View. | Likewise OGREs built-in functions for line-of-sight, geometry collision and object picking will be utilised, which will validate the separation between Model and View. | ||
- | We will see how this can be managed. | + | We will see how this can be managed. |
===Coding standard=== | ===Coding standard=== |
Revision as of 21:31, 16 December 2009
Contents |
War And Regimental Tactics Battle Engine Deluxe (WARTBED) High-Level Design Document
This document outlines the large-scale principles and design underlying the WARTBED tactical battles meta-engine.
- The general Architecture document
- The modules interaction architecture document, which describes how modules/games can be played against each other
For in-depth view of specific topics and aspects, see
Overview
At its highest level and end goal WARTBED is a meta-engine for tactical wargaming. More precisely, though, WARTBED is a framework to automate a number of tasks related to this:
- 3D graphic of contemporary standards (implemented through the OGRE middleware)
- Input bindings and input handling (where raw input hardware is accessed through the OIS middleware)
- Flexible camera handling suitable for a wide spectrum of strategy game styles
- A GUI system (currently implemented through the CEGUI middleware)
- Human-readable data file parsing
- Scripting language support (as of yet unimplemented)
- Network support (not yet implemented)
Remaining design decisions
- How game modules (Bright Portents etc) should be implemented:
- First option: As internal parts of WARTBED framework itself.
- Second option: Modules are stand-alone applications using WARTBED as a library modules will use.
- Third option: Modules will be fully implemented in script languages using the WARTBED framework.
"Regimental tactical warfare"
What being a framework for implementing tactical regimental warfare games more specifically means is providing a number of standard formats (and data converter to these formats):
- A unit and regiment ability and statistics set capable of accurately represent most games, periods and battle types.
- A regiment representation system capable of handling several individual units organised into formations (which can consist of other regiments), and formatted movement (manoeuvres) of these.
- Battle arena (battlefield) description
- Campaign definition and flow handling
- Unit and regiment ordering system
- Suitable and flexible AI
Design principles
WARTBED is being designed according to a set of principles and assumptions.
1. | WARTBED is multi-platform and should be natively compilable on at least Win32, Linux and OSX. |
2. | External dependencies are to be kept to a minimum
|
3. | The system is divided into a Model-View-Controller design layout to decouple dependencies.
|
4. | The structural composition is indented to be as simple as possible. This does not mean that is must be simple, only that it shouldn't be over-complicated or over-designed, which is a common source of failure. Too great complexity means unmaintainable code, while too simple code is limiting, restrictive and incapable of representing a complex game. |
5. | WARTBED is written in ANSI C++ without proprietary extensions (f.i. MSVC++ extensions). STL containers are preferred for storage and data management throughout, unless for very specific reasons. |
6. | WARTBED is intended to be data-driven to as far en extent as possible.
|
Dependencies
External and third party dependencies are being avoided. Nonetheless, some aspects of a modern game system are impractical or impossible to produce in-house. For such, open-source, free-licensed (Free or LGPL, but not GLP), well testedm stable and actively maintained solutions are acceptable.
- be fully stand-alone (atomically portable and not introduce additional dependencies)
- be mature and stable
- Be under a liberal, non-viral FOSS licence (f.i. LGPL, MIT)
Purpose | Package | Version | Notes |
3D Graphics: | OGRE 3D | 1.6 ("Shoggoth") | |
Input: | OIS (Open Input System) | 1.7 | |
In-game GUI: | CEGUI | 0.6 | See GUI evaluation and GUI widgets |
General-purpose: | Boost | 1.41 | See multi_index_container |
Libraries considered for WARTBED:
- Currently full-scale physics support isn't needed. The physics required consists of gravity, wind and trajectories, which can be sufficiently simulated in native code (air/liquid pressure variance, medium drag etc is unnecessary, and still there is no reason for ragdoll animation or fprward kinematics). Candidates would be the Newton framework, ODE (Open Dynamics Engine) or Bullet (preferred due to licencing), all have existing OGRE integration modules.
- For memory management nedmalloc is being evaluated. It is used internally in OGRE and is highly speed- and anti-fragmentation efficient under random usage.
- No system has yet been chosen for networking.
- Boost is currently not included in WARTBED. Boost may be included for the ASIO and multi_index_container libraries (the filesystem library seems useful, too).
Strictness of MVC organisation
Had all code been locally written WARTBED could maintain ideal separation between the components. However, the Controller will have to react to purely cosmetic (user interface) user input and dispatch appropriate orders to View subsystems (f.i. selecting and outlining a particular unit). The controller will thus need knowledge about and access to View objects.
Likewise OGREs built-in functions for line-of-sight, geometry collision and object picking will be utilised, which will validate the separation between Model and View.
We will see how this can be managed.
Coding standard
Though not religious on the topic WARTBED is coded according to a set code style which is an adaptation of the Allman style.
Strict client/server game architecture
{placeholder text ...}
WARTBED intended to be strictly client server to the extent that even single player games entail the game being a front-end to a local server.
Pros:
- item
Cons:
- Item
{...placeholder text}
Graphics specification
- Further information: Wartbed:Design/Map_format
- The base measurement unit is 1 meter. All 3D graphics are designed with 1 unit == 1 meter.