Atlas: Flexible Protocol

by Aloril

This is my current personal opinion how Atlas should look like. Nothing is decided yet.

Scenario: GeekLizard jumps from oak.

How both simple AI client and 3D client can understand this?

This is possible by using inherited operations and types.

Operation "jump" is derived from operation "move". Thus AI client knows it has moved closer and 3D client can show jumping animation.

"Oak" is derived from "tree". AI client may not know anything about oaks but knows what tree is. 3D client can show "oak graphics" instead of generic "tree graphics".

GeekLizard: 3D client will show "GeekLizard graphics". AI client looks at parent types: GeekLizard is derived from "lizard" type and thus it might be dangerous. It's derived from "human" type too and maybe it can talk.

In Atlas: (A=Character, M=GeekLizard)

Server->A (M appears in tree and jumps): <atlas> <msg> <to><id href="A"/></to> <op><id href="appear"/> <!-- derived from sight --> <ent> <id href="M"/> <loc><id href="tree1"/><coords>0,0,3.0</coords></loc> </ent> </op> </msg> <msg> <to><id href="A"/><to> <op><id href="sight"/> <msg> <op><id href="jump"/> <ent> <id href="M"/> <loc><id href="grass1"/><coords>0.5,3.0,0.0</coords></loc> </ent> </op> </msg> </op> </msg> </atlas>

A->Server (asks about tree, M and jumping): <atlas> <msg> <from><id href="A"/><from> <op><id href="look"/> <id href="tree1"/> </op> </msg> <msg> <from><id href="A"/><from> <op><id href="look"/> <id href="M"/> </op> </msg> <msg> <from><id href="A"/><from> <op><id href="get"/> <id href="jump"/> </op> </msg> </atlas>

Server->A (info about tree, M and jump): <atlas> <msg> <to><id href="A"/></to> <op><id href="sight"/> <ent> <id href="tree1"/> <type><id href="oak"/></type> <loc><id href="grass1"/><coords>1,3</coords></loc> <attr name="description"><string>Normal oak tree</string></attr> <attr name="height"><float>5.6</float></attr> </ent> </op> </msg> <msg> <to><id href="A"/></to> <op><id href="sight"/> <ent> <id href="M"/> <type><id href="geeklizard"/></type> <loc><id href="grass1"/><coords>0.6,3.0,0.0</coords></loc> <attr name="description"><string>Unix geeklizard: grand geeklizard</string></attr> <attr name="velocity"><list type="float">3,0</list></attr> </ent> </op> </msg> <msg> <op><id href="info"/> <ent> <id href="jump"/> <type><id href="move"/></type> <attr name="description"><string>Movement that includes short 'flight'</string></attr> </ent> </op> </msg> </atlas>

A->Server (ask about oak and geeklizard types) <atlas> <msg> <from><id href="A"/><from> <op><id href="get"/> <id href="oak"/> </op> </msg> <msg> <from><id href="A"/><from> <op><id href="get"/> <id href="geeklizard"/> </op> </msg> </atlas>

Server->A (info about oak and geeklizard): <atlas> <msg> <op><id href="info"/> <ent> <id href="oak"/> <type><id href="tree"/></type> <attr name="mediaid"><id href=""/></attr> <attr name="description"><string>Might be good hiding place for geeklizards</string></attr> </ent> </op> </msg> <msg> <op><id href="info"/> <ent> <id href="geeklizard"/> <type><id href="lizard"/><id href="human"/></type> <attr name="mediaid"> <id href=""/></attr> <attr name="description"><string>Geeklizard can cast dangerous rant spells that puts victims to eternal sleep</string></attr> </ent> </op> </msg> </atlas>