Marauroa Chat Tutorial/Server: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
imported>Hendrik Brummermann splitted Marauroa Tutorial |
imported>Hendrik Brummermann m header and footer |
||
| Line 1: | Line 1: | ||
{{Navigation for Marauroa Top|Using}} |
|||
{{Navigation for Marauroa Users}} |
|||
{{Marauroa Tutorial}} |
|||
== Server == |
|||
== Code == |
|||
In order to create a Marauroa-based game server you must provide at least implementation of the marauroa.server.game.rp.IRPRuleProcessor interface and a class for zone management, i.e. marauroa.server.game.rp.RPWorld descendant. You can use the marauroa.server.game.rp.RPWorld itself, but it doesn't provide you with any RPZones, while you will almost certainly need at least one. |
In order to create a Marauroa-based game server you must provide at least implementation of the marauroa.server.game.rp.IRPRuleProcessor interface and a class for zone management, i.e. marauroa.server.game.rp.RPWorld descendant. You can use the marauroa.server.game.rp.RPWorld itself, but it doesn't provide you with any RPZones, while you will almost certainly need at least one. |
||
| Line 167: | Line 170: | ||
Functions for creating account and character should find out whether to create a new account/character or not. In our case we just always do it (not for duplicates of course). Result of this actions is instantly written to the database. Note that client can provide a template for the avatar object (an RPObject associated with the character). It is up to you how to use it while constructing the actual avatar object. We take what client provides, add a "nick" property (the same as character name) and use the resulting one as an avatar object. |
Functions for creating account and character should find out whether to create a new account/character or not. In our case we just always do it (not for duplicates of course). Result of this actions is instantly written to the database. Note that client can provide a template for the avatar object (an RPObject associated with the character). It is up to you how to use it while constructing the actual avatar object. We take what client provides, add a "nick" property (the same as character name) and use the resulting one as an avatar object. |
||
== Deployment == |
|||
So, we have two files, World.java and Rule.java, which contain the classes mentioned above. |
So, we have two files, World.java and Rule.java, which contain the classes mentioned above. |
||
| Line 206: | Line 209: | ||
Of course, make sure that all the jars are in the current directory. Marauroa framework will parse server.ini file, find and load your classes World and Rule. |
Of course, make sure that all the jars are in the current directory. Marauroa framework will parse server.ini file, find and load your classes World and Rule. |
||
== Next Steps == |
|||
In the next section of this tutorial, we will write the '''[[Marauroa Tutorial/Text Client|client]]''' which will connect to our server. |
|||
[[Category:Marauroa]] |
|||
{{#breadcrumbs: [[Marauroa]] | [[Navigation for Marauroa Users|Using]] | [[Marauroa Tutorial|Tutorial]] | [[Marauroa Tutorial/Server|Server]]}} |
|||