Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revisionBoth sides next revision
groworld_multiplayer_prototype [2009-03-12 14:59] davegriffithsgroworld_multiplayer_prototype [2009-03-12 18:10] davegriffiths
Line 18: Line 18:
  
 ^ Message ^ Data ^ Send when ^ Action on receive ^ ^ Message ^ Data ^ Send when ^ Action on receive ^
-| /register | None | Joining game | Broadcast your plant back with /plant |+| /join-game | None | Joining game | Broadcast your plant back with /plant |
 | /plant | Plant ID, postion, colour and structure | When starting game, your plant changes or /register recieved | If it's the first time you've seen this plant id, add plant to world, otherwise update plant | | /plant | Plant ID, postion, colour and structure | When starting game, your plant changes or /register recieved | If it's the first time you've seen this plant id, add plant to world, otherwise update plant |
 | /spray | Plant ID, pollen type | Pollen release button pressed | Add pollen from plant into atmosphere | | /spray | Plant ID, pollen type | Pollen release button pressed | Add pollen from plant into atmosphere |
-| /unregister | Plant ID | Leaving game | Remove plant from world |+| /leave-game | Plant ID | Leaving game | Remove plant from world |
  
 +When joining a game, you need to create a unique id for your plant. With no central server, this currently works in the following ad-hoc manner:
 +
 +  - Broadcast /join-game
 +  - Wait for 2 seconds, deal with all incoming /plant messages
 +  - Count the number of plants, give yourself an id based on that
 +  - Broadcast your new plant back with /plant
 +
 +===Structure information===
 +
 +Currently an sexpr as this is what the pluggable plants system uses rather than l-systems. I need to have a think about this...
 +
 +Each component looks like this:
 +<code>(texture-id list-of-children)</code>
 +
 +A real example:
 +<code>((1-1 ((3-1 ((1-1 ((1-1 ((11 ()))))) (2-1 ((2-1 ((11 ()) (11 ()))) (1-1 ((11 ()))))) (2-1 ((2-1 ((11 ()) (11 ()))) (1-1 ((11 ()))))))))))</code>
 +
 +The numbers refer to the texture naming convention for [[pluggable plants]].
  • groworld_multiplayer_prototype.txt
  • Last modified: 2009-05-12 13:20
  • by 81.188.78.24