RolePlayingDesign: Difference between revisions
Content deleted Content added
No edit summary |
No edit summary |
||
Line 30:
RPManager provides a simple interface to the GameManager for using it:
* addRPAction <br>
* getRPObject <br>
* onInit Player
* onExit Player<br>
* transferContent<br>
The main outline of RPManager could be:
Line 41:
{
Procced through every action in this turn
{
rpRuleProcessor executes action
}
Build Perception
Line 52 ⟶ 55:
RPScheduler is the class that handles actions to be queued for each player. All the complexity of Action management should be handled here.
All the actions code MUST be here.<br>
By implementing RPRuleProcessor you personalize Marauroa to be the kind of game you want to code. But keep in mind that you are ''limited'' to a realtime like game.
=Actions and Objects=
The whole Marauroa system is managed by two main entities, RPAction and RPObject and several helper classes like Attributes, RPSlot and RPClass
==Actions==▼
To express the willing of a client to do something it must send the server a MessageC2SAction message.▼
An action is composed of several attributes, an attributed is similar to a variable that has a name and contains a value.▼
There are optional and mandatory attributes. If a mandatory attribute is not found, the message is skipped by the RPServerManager.▼
Mandatory Actions Attributes are action_id and type.▼
The action_id is used to identify the action when a resulting response comes in a perception▼
Optional Actions Attributes: (Read "Actions Explained" for more details.)▼
==Objects==
Line 113 ⟶ 105:
Once the object is stored inside the avatar or another object, the only way of accessing it is through the object that contains our stored object.
▲==Actions==
▲To express the willing of a client to do something it must send the server a MessageC2SAction message.
▲An action is composed of several attributes, an attributed is similar to a variable that has a name and contains a value.
▲There are optional and mandatory attributes. If a mandatory attribute is not found, the message is skipped by the RPServerManager.
▲Mandatory Actions Attributes are action_id and type.
▲The action_id is used to identify the action when a resulting response comes in a perception
▲Optional Actions Attributes: (Read "Actions Explained" for more details.)
| |||