Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revisionBoth sides next revision | ||
groworld_multiplayer_prototype [2009-03-12 17:00] – davegriffiths | groworld_multiplayer_prototype [2009-03-12 18:10] – davegriffiths | ||
---|---|---|---|
Line 22: | Line 22: | ||
| /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 | | ||
| /leave-game | 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=== | ===Structure information=== |