RolePlayingDesign: Difference between revisions

Content deleted Content added
No edit summary
Added new
Line 17:
* IRPRuleProcessor is the interface that you need to implement in order to personalize the actions to execute.
* RPWorld that is the class that you need to extend to implement the onInit and onFinish in order to personalize what happens when you init the server and what happens when you close the server.
* IRPZone is a interface that you ''could'' implement to achive the highest personalization possible of the engine, I would instead use MarauroaRPZone that implements our great feature Delta^<sup>2</sup>.
 
 
Line 27:
* control AI
 
As you see this is a HUGE classtaks that is complex. So the idea is to split this behavior into smaller subclasses.
 
RPManager provides a simple interface to the GameManager for using it:
* addRPAction
* getRPObject
* addRPObject
* onInit Player
* removeRPObject
* onExit Player
* hasRPObject
* transferContent
 
addRPAction simply queues an action for that player to be executed on the next turn.
 
addRPObject, removeRPObject and hasRPObjectgetRPObject is a interface to manage RPWorld to ease the adquisition of the RPObject when exiting the game.
 
onInit and onExit are callback functions that are used by GameManager to notify that a player has entered the game or that a player has exit the game.
 
transferContent is a callback function too that is called by RPRuleProcessor to stream content to players.
 
The main outline of RPManager could be:
Line 44 ⟶ 49:
{
Procced through every action in this turn
 
Build Perception
Remove timed out players