Intro | How does OG Atlas compares to IG Atlas? |
Connection and disconnection | Initializing and closing connection |
Browsing server | What games there are? |
Creating player account and login | How player is authorized to play |
Creating character and using it | Player and non player characters: characters controlled outside server |
Server differentiates messages meant to meta world from messages meant to actual game from id: messages from player id or if id is not specified are meant to meta world. Messages from character id are for actual game world.
Example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <!DOCTYPE atlas protocol "atlas.dtd"> <atlas version="0.2">In future there will be additional tags for setting binary and/or compression flags.
When you disconnect, send closing atlas tag.
Example:
</atlas>
<op> <id>get</id> </op>In the answer server tells what it contains:
<ent> <id>game.worldforge.org:</id> <contains> <id>settings</id> <id>games</id> <id>players</id> </contains> </ent>Then request info about games (you can go directly to this step too):
<op> <id>get</id> <id>games</id> </op>Server tells what games it contains:
<ent> <id>games</id> <contains> <id>Medieval fantasy game</id> <id>Warcraft clone</id> </contains> </ent>Further request might require that you are logged in. Especially getting list of players likely requires account with 'admin' privileges. Creating characters too likely requires player account.
Creating account (this is likely to change somewhat, one modification might be to require mail address where password is then sent):
<op no="2"> <id>create</id> <ent> <attr name="name">JoeBlatz</attr> <attr name="passwd">Rqv67.%</attr> </ent> </op>In response server sends 'info' or 'error' operation back (with includes player account id (might be same as account name). refno -attribute helps you to spot right answer.
If you already have account then you log in using it:
<op> <id>login</id> <ent> <id>JoeBlatz</id> <attr name="password">Rqv67.%</attr> </ent> </op>
Creating character:
<op no="3"> <from>JoeBlatz</id> <id>create</id> <ent> <type>evoker</type> <attr name="name">Evoker the magnificent</attr> <attr name="INT">15</attr> </ent> </op>Server sends back character entity with id and additional attributes like location, etc... or error message telling what is wrong (like too big value for some attribute). Server might assign other values for attributes than client has specified. refno -attribute helps you to spot right answer.
If you have already created character then you just continue playing where you left. In both cases it might be goo idea to use look operation without arguments as starting point:
<op> <from>character_id_23<from> <id>look</id> </op>