Part of the groworld game project

An initial version of the groworld game in order to have something to focus on and develop ideas further. The main priority is to demonstrate some of the techniques we want to explore in the simplest possible form.

  • Network communication protocols/transport
  • Multiplayer gameplay
  • Basic plant communication (via pollen)
  • Exchange of simple properties/behaviours
  • Plant ownership/point of view

Using pluggable plants

Pollen is passed from the red player/plant to the purple one, causing the flower on the purple plant to change colour.

an initial sketch of required messages & responses

player persistence comments
connection / session init.
connect → possible to connect with, or without a user id
registration / new user
register → assumes some type of persistent store of players & plants
← user id
← plant description
existing user
user id →
← plant description “self”
← other plants & their locations
pollen (fr 'hayfever' prototype)
pollen → ← pollen (plant identifier / user id) a player can send and/or receive 'pollen' messages at anytime

seed/soil demo

  • nutrients - nutrient type, centrepoint and radius. updated on arrival, change or depletion (leaving)
  • other roots - a line segment to render
  • level of detail
  • own roots - send a new shoot, startpoint

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 'owns'.

Message Data Send when Action on receive Notes
/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
/flower Plant ID, Flower ID, Colour Sucking pollen has changed a flower colour Update colour for this plant/flower
/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 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:

  1. Broadcast /join-game
  2. Wait for 2 seconds, deal with all incoming /plant messages
  3. Count the number of plants, give yourself an id based on that
  4. 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:

(texture-id list-of-children)

A real example:

((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 ()))))))))))

The numbers refer to the texture naming convention for pluggable plants.

  • groworld_multiplayer_prototype.txt
  • Last modified: 2009-05-12 13:20
  • by