Skip to content

mortuosplango/beenoir

Repository files navigation

BeeNoir is a livecoding game heavily inspired by alJazari[1]
BeeNoir in action: http://www.youtube.com/watch?v=ZSPvY0cC8mk

Dependencies:
 - python   v2.6 or newer   http://www.python.org/
 - pyglet   v1.4 or newer   http://pyglet.org/
 - pyOSC                    https://trac.v2.nl/wiki/pyOSC
 - SuperCollider            http://supercollider.sf.net/

How to use it:
 1) start SuperCollider or something else listening on port 57120
 2) start the game:
    ./run
    or
    ./runFullscreen
    or
    ./run80 (HTTP Server listens on port 80 & Fullscreen)

There are a lot of configuration options in common.py.

If you have trouble getting pyglet to run on Mac 10.6 you might try:
defaults write com.apple.versioner.python Prefer-32-Bit -bool yes

You can receive messages with OSC in e. g. SuperCollider:
    port: 57120

There are two types of OSC messages. General messages notify the 
OSC receiver about general changes in the game, game messages about
changes/actions of each player. Floats are normalized; between 0 and 1.

General messages:
 - /beenoir/start (the game was started)
    1) play field width (int)
    2) play field height (int)
 - /beenoir/stop (the game quit properly)

Player messages:
 - /beenoir/newplayer
 - /beenoir/move
 - /beenoir/jump
 - /beenoir/teleport
 - /beenoir/action (musical action)
 - /beenoir/playerdeleted
 - /beenoir/changetempo

Message format für player messages: 
     1) player_id (int)
     2) x-position (normalized) (float)
     3) y-position (normalized) (float) 
     4) tile-value (normalized) (float)
     5) length of the event in seconds (float)

The length of the event is actually the tick-rate per seconds
and depends on the tempo. Tempo can be infered from length of event.

To control a player go to http://127.0.0.1:8000/

For debugging purposes, you can also change the code of a player
by clicking on the code in the game - it will cycle through the 
possibilities forward (left-click), backward (right-click) 
or reset it to 'wait' (middle-click).

[1] http://pawfal.org/index.php?page=AlJazari