Show development-guide.txt syntax highlighted
Gameworld objects
-----------------
!!!!!!!!!!!!!!
1 float = 5 cm
!!!!!!!!!!!!!!
Each object is divided into three classes: Entity, Model and Spatial.
* Entity holds interaction logic, ie. player actions directly calls 'action'
method on the Entity object. If developing class extends DefaultEntity, it
effectively inherits the ability to create actions as public void nonparameter
methods, where method name marks one action. For example, Lamp entity extends
DefaultEntity, and it has few actions: Turn on and Turn off. Those actions are
translated by DefaultEntity action implementation to public void methods named
turn_on and turn_off, so Lamp entity has two methods:
public void turn_on() {...};
and
public void turn_off() {...};
which holds the exact behaviour code when player invokes Turn on and Turn off
action onto the Lamp object.
* Model holds any state logic and possible developer knowledge about an object.
For example, in Atm example, Atm asks its Model for accounts, account state, pin
check and other. In Computer example, ComputerModel holds information about CPU speed,
free memory and other. Model represents somewhat complicated property holder.
* Spatials are JMonkey Spatials (TODO use Nodes) which holds any state or behaviour
specific to JMonkey space, ie. local translation in the sector, in the world and similar.
Also, the Spatial is 3D object drawn in the world.
When desired behaviour is already implemented in some class (ie. the throwing action)
simply mixin desired class into the target class (wiki mixin).
Editor
------
Editing steps:
1. draw floorplan
2. set cameras
3. furniture
See more files for this project here