4 Entry in PyWeek #18 <http://www.pyweek.org/18/>
7 http://pyweek.org/e/naja
24 The game requires pygame and pymunk. Requirements can be installed by
30 pip install -r requirements.txt
32 It was developed using python 2.7 and pygame 1.9.2. Older versions may or may
39 On Windows or Mac OS X, locate the "run_game.pyw" file and double-click it.
41 Othewise open a terminal / console and "cd" to the game directory and run:
49 You are a robot, frantically trying to set the correct bits to gain points,
50 for reasons that are unlikely to ever become clear.
52 Your robot has 8 bits. Four bits control the directions you can move in,
53 3 allow you to unlock various actions, and the last, the Most Significant Bit,
54 makes everything work better.
56 The game has two phases. Movement and Actions.
58 During Movement, you can explore the board and learn about the available
59 tiles. Tiles you can legally move onto are highlighted. It's always possible
60 to stay on your current tile.
62 After moving, select an action from the tile. Most actions require various
63 bits to be set, although all tiles have a default action, although this may
64 be "No effect". After the action, the tile will be replaced with a new tile.
66 Some actions cost you health. When you run out of health, the game is over
69 If you have all three colour bits set, and are on the right tile, you can
70 gain a point, although this unsets all the colour bits. Once you have enough
71 points, you win the game, and there is much rejoicing.
73 (In true 8-bit style, the Konami Code is accepted.)
78 Ensure the JSON is generated from the YAML, for people with out pyyaml::
82 Creating a source distribution with::
86 You may also generate Windows executables and OS X applications::
88 python setup.py py2exe
89 python setup.py py2app
91 Later you might be able to upload files to PyWeek with::
93 python pyweek_upload.py
95 Later you might be able to upload to the Python Package Index with::
97 python setup.py register
98 python setup.py sdist upload