Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision | ||
groworld_multiplayer_prototype [2009-03-13 17:25] – davegriffiths | groworld_multiplayer_prototype [2009-03-16 16:18] – 81.188.78.24 | ||
---|---|---|---|
Line 18: | Line 18: | ||
====Network protocol==== | ====Network protocol==== | ||
+ | |||
+ | ===generic version=== | ||
+ | an initial sketch of required messages & responses | ||
+ | |||
+ | | *player* | *persistence* | *comments*| | ||
+ | | connection / session init. ||| | ||
+ | | connect -> | | could connect with, or without a user id | | ||
+ | | registration / new user ||| | ||
+ | | register -> | | assumes some type of persistent store of players & plants | | ||
+ | | | <- user id | | | ||
+ | | | <- plant description | | | ||
+ | | exisiting user ||| | ||
+ | | user id -> | | | | ||
+ | | | <- plant description | " | ||
+ | | | <- other plants & their locations | | | ||
+ | | pollen (fr ' | ||
+ | | pollen -> | <- pollen (plant identifier / user id) | a player can send and/or receive ' | ||
===OSC version=== | ===OSC version=== | ||
Line 23: | Line 40: | ||
The osc version works in a peer to peer manner in that there is no central server, and clients need to pass information around to each other. This has only been tested with 2 clients... Each client has a notion of the plant it ' | The osc version works in a peer to peer manner in that there is no central server, and clients need to pass information around to each other. This has only been tested with 2 clients... Each client has a notion of the plant it ' | ||
- | ^ Message ^ Data ^ Send when ^ Action on receive ^ | + | ^ Message ^ Data ^ Send when ^ Action on receive |
- | | /join-game | None | Joining game | Broadcast your plant back with /plant | | + | | /join-game | None | Joining game | Broadcast your plant back with / |
- | | /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 | | |
- | | /flower | Plant ID, Flower ID, Colour | Sucking pollen has changed a flower colour | Update colour for this plant/ | + | | /flower | Plant ID, Flower ID, Colour | Sucking pollen has changed a flower colour | Update colour for this 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 |
- | | /leave-game | Plant ID | Leaving game | Remove plant from world | | + | | /leave-game | Plant ID | Leaving game | Remove plant from world | Not implemented yet | |
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: | 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: |