Overview

zrpn - Zombies Robots Pirates Ninjas

https://bitbucket.org/thesheep/zrpn

run_game.py

The pygame sprint team 2012.

How to play.

Zombies, Robots, Pirates and Ninjas have gotten together to rain Match Five destruction on the universe.

You must join together with other players over "the internet" to rain destruction on them.

MOUSE: click on things, turn them to blood. KEYBOARD: no JOYSTICK: no

Need to get 5 in a row, and then that does all of them in one click.

Each time you click you lose a point... unless you get a row or column.

Install

You will need python, and pygame installed first.

Install the pyenet library first.
cd dependencies/pyenet python setup.py install
Then run the game.
python run_game.py
To run the server.
cd zrpn python server.py

Dependencies

The dependencies are in the dependencies/ directory.

The pyenet is a C library, so you need to install it first.
cd dependencies/pyenet python setup.py install

You need pygame installed yeah?

These are included with the game... no need to download.

Development notes

Below are some development notes. About what all the files are, and where they are.

Networking notes.

Each player will see the same game board.

server

To initialise.
  • sends all sprites from a Animations.num (id, position, sprite_kind)
  • send Animations from the number.
On each game tick.
  • gets (x, y) on game board from connected clients.
  • sends back "Animations" (num, x, y, kind_of_animation)

clients

All clients connect on one server.

To initialise.

  • get all sprites from server. (id, position, sprite_kind)

On each game tick.

  • send through clicks as X,Y in reference to the game board.

  • get back "Animations" from server.
    • (num, x, y, kind_of_animation)

scoring

Lose points when remove a piece. Gain points when you create a connection. Get list of people to apply points to. (the client just before)

SCORE packet, (score_num, high_score)

creating a source distribution

python setup.py sdist

uploading to pypi

pypi.python.org is the python package index. It's where lots of python packages of software go.

python setup.py register python setup.py sdist upload

creating Mac OSX app

python setup.py py2app

creating windows executable

python setup.py py2exe

icon.png

This is used for the pygame subset for android game runner.

Fill this image in with your game icon.

run_game.pyw

Windows users can click on a .pyw file and it will run without the console.

scripts

This directory contains the script to run your game.

After installing via source or pypi zrpn should be on the path.

skelutil.py

zrpn/skelutil.py

Some utility functions to be used like this: >>> data_dir('sounds', 'play.ogg') 'zrpn/data/sounds/play.ogg'

It will give you the path to the file you requested, but will work cross platform. Since your files could be in different places on different platforms.