Wartbed:Manual/Models and Actors

From Dark Omen Wiki

(Difference between revisions)
Jump to: navigation, search
(+stub)
(Fleshed out discussion)
Line 1: Line 1:
{{stub}}
{{stub}}
 +
WARTBED is intended to be capable of representing a wide range of tactical wargames. This requires both a strict standardisation and great flexibility. WARTBED provides a framework of standardised and consistent abstractions that modules are implemented in terms of. These classes can be specialised but the essential core mechanics of all real-time tactical games are captured--individuals, units, formations, targeting and orders--as well as enforcing a strict Model-View-Controller architecture.
 +
 +
==Overview==
 +
At the core of a WARTBED simulation are implementations of the <tt>Model</tt> base class: all entities that are part of the game universe are Models. The mvc::Model class is a pure base class, as is its counter-part <tt>View</tt>, which is inherited from by any class that represents a Model for the player, graphically, auditory or in other ways. They are included by this directive:
<div style="margin:2em;"><source lang="cpp">
<div style="margin:2em;"><source lang="cpp">
#include "WARTBED/wb_MVC-Core.h"
#include "WARTBED/wb_MVC-Core.h"
-
#include "WARTBED/wb_Actor.h"
 
</source></div>
</source></div>
 +
Though modules can derive directly from these, most game entities will tend to be of <tt>Actor</tt> or <tt>Prop</tt> types, which are Models extended to be integrated with the <tt>Target</tt>, <tt>Order</tt> and <tt>order::Queue</tt> classes. These are located in this file,
 +
<div style="margin:2em;"><source lang="cpp">
 +
#include "WARTBED/wb_Models.h"
 +
</source></div>
 +
which in turn includes <tt>wb_MVC-Core.h</tt> and <tt>wb_Orders.h</tt>, and in extension also <tt>wb_Target.h</tt>.
==Models, Views and Controllers==
==Models, Views and Controllers==
Line 10: Line 18:
==Models, Actors and Props==
==Models, Actors and Props==
-
An <tt>Actor</tt> is anything in a game that has 'volition' and 'intentionality', that is, that can move independently and can focus on targets. More technically, in the WARBED framework an Actor is a class that fulfills both the <tt>wb::mvc::Model</tt> and <tt>wb::Orderable</tt> interfaces. Both Individuals and Groups (f.i. soldiers and regiments) are Actors even though Groups consist of individuals, and orders given to them will be delegated to these.  
+
An <tt>Actor</tt> is anything in a game that has ''volition'' and ''intentionality'', that is, that can move independently and can focus on targets. More technically, in the WARBED framework an Actor is a class that fulfills both the <tt>wb::mvc::Model</tt> and <tt>wb::Orderable</tt> interfaces. Both Individuals and Groups (f.i. soldiers and regiments) are Actors even though Groups consist of individuals, and orders given to them will be delegated to these.  
-
A <tt>Prop</tt> is any Model that has 'no volition' and 'no intentionality'. F.i. a tree or house, but also the ground, is a Prop.
+
A <tt>Prop</tt> is any Model that has ''no volition'' and ''no intentionality''. F.i. a tree or house, but also the ground, is a Prop. Props are only a modest extension to Model, basically adding only a few data members, but is the base class for Actor, allowing them to be managed separately from "pure" Models.
[[category:Manual]]
[[category:Manual]]

Revision as of 21:39, 21 January 2010


WARTBED is intended to be capable of representing a wide range of tactical wargames. This requires both a strict standardisation and great flexibility. WARTBED provides a framework of standardised and consistent abstractions that modules are implemented in terms of. These classes can be specialised but the essential core mechanics of all real-time tactical games are captured--individuals, units, formations, targeting and orders--as well as enforcing a strict Model-View-Controller architecture.

Overview

At the core of a WARTBED simulation are implementations of the Model base class: all entities that are part of the game universe are Models. The mvc::Model class is a pure base class, as is its counter-part View, which is inherited from by any class that represents a Model for the player, graphically, auditory or in other ways. They are included by this directive:

#include "WARTBED/wb_MVC-Core.h"

Though modules can derive directly from these, most game entities will tend to be of Actor or Prop types, which are Models extended to be integrated with the Target, Order and order::Queue classes. These are located in this file,

#include "WARTBED/wb_Models.h"

which in turn includes wb_MVC-Core.h and wb_Orders.h, and in extension also wb_Target.h.

Models, Views and Controllers

A Model is a class that is part of the universe simulation. If it is made apparent to the player it is through a View object. If it can be interacted with by the player it is through a Controller object.

Models, Actors and Props

An Actor is anything in a game that has volition and intentionality, that is, that can move independently and can focus on targets. More technically, in the WARBED framework an Actor is a class that fulfills both the wb::mvc::Model and wb::Orderable interfaces. Both Individuals and Groups (f.i. soldiers and regiments) are Actors even though Groups consist of individuals, and orders given to them will be delegated to these.

A Prop is any Model that has no volition and no intentionality. F.i. a tree or house, but also the ground, is a Prop. Props are only a modest extension to Model, basically adding only a few data members, but is the base class for Actor, allowing them to be managed separately from "pure" Models.

Personal tools
communication