Naghni is a simple side-scrolling arcade game written in Python and PyGame. You are a round creature whose purpose is to fill empty holes with matter, thus closing them. It matters greatly to your round friends that you do a job well-done, because if you don’t, they’re all going to die!
If you want to save the naghnies (for that is the name of the people), you should not hesitate to play Naghni. You will be their Saviour, their Hope, their Light in the darkest of times.
Installing
Naghni depends on PyGame 1.8.1+ for graphics and sound. To install PyGame, do one of these things:
* For Debian etc.: type apt-get install python-pygame
* For Fedora etc.: type yum install pygame
* Get it at http://pygame.org/download.shtml
Optional extras
If present, Naghni will also use these Python modules:
setproctitle
Web address: http://pypi.python.org/pypi/setproctitle/
sudo easy_install setproctitle
termcolor
Web address: http://pypi.python.org/pypi/termcolor
sudo easy_install termcolor
Way #1
Get newest version of Naghni at http://metanohi.org/projects/naghni/
Extract the downloaded file and run this in a terminal:
sudo python setup.py install
Way #2
Just run this (requires that you have python-setuptools installed):
sudo easy_install naghni
Running
When Naghni has been installed, you can run it from the command-line like this:
naghni [options]
naghni has several options. Run naghni --help to see a list of them. Most of them can also be changed in-game.
Playing
All special aspects of Naghni will be explained in-game. Do not worry.
For developers
Naghni uses Git for branches. To get the latest branch, get it from gitorious.org like this:
git clone git://gitorious.org/naghni/naghni.git
Naghni is written in Python and should be relatively easy to integrate into other programs.
Designing levels
To define the look of levels, Naghni uses a special naghni-level-defining text file format. As any geometric figures in Naghni are automatically generated at random, you need only worry about the lines and the holes, as well as a few additional minor, easy, things. The format is quite simple, and it looks like this:
name is LEVELNAME
gravity is GRAVITY
begin at POSITION
level is next
OBJECT ARGS
...
LEVELNAME is a text string.
GRAVITY can be expressed as a number. The higher the number, the stronger the force of gravity. In Naghni, gravity alwals forces you down, never in any other direction. That would just be confusing.
POSITION consists of two numbers separated with a comma, e.g. 0,0. All positions are virtual --- 0,0 does not necessarily mean 0,0 in the game window. Also, y-coordinates increase when you go up. So, in effect, 0,100 is above 0,-50.
There are several OBJECTs. There's the hole, a line, a Bézier curve, and so on. Each object have different arguments. Here's a list:
hole POSITION SIZE(number) DENSITY(number 0.0 -- 1.0)
`- creates a hole, sucking away your matter
line POSITION_start POSITION_end
`- creates a simple line, i.e. something you can roll on
bezier POSITION_start POSITION_end POSITION_middle
`- creates a quadratic Bézier curve
In a future release, more features may be added. Nevertheless, this should be enough. In another future release, an actual graphical designer may appear, though that's not ecxactly high priority right now.
Requirements:
· Python
· pygame