A space game written in Python.
It's currently a very simple arcade space shooter. But it does have BULLETS THAT ARE GUNS THAT SHOOT MORE BULLETS. Beat that eh.
In order to run "Space game," you will need the following packages installed:
- Python 2.7
- pygame
- pymunk
- scipy / numpy
- pyYAML
The easiest way to install the libraries is pip3 install pygame pymunk scipy pyyaml
.
"Space game" is a Python program. You run it with Python:
./run.py
or
python2 run.py
w: Move forwards
s: Move backwards
a: Move left
d: Move right
e: Rotate anticlockwise
q: Rotate clockwise
t: Zoom in
g: Zoom out
f8: Save
f9: Load
f11: Show keys
pause: Pause / unpause
escape: Quit
`: Simulate one frame then pause
Mouse 1: Shoot
Mouse wheel: Zoom in / out
You can run with profiling enabled like so:
./run.py --profile
which will spit out a file called 'profile_results' in the current working directory. You can view the results with
./bin/print_profile_results
You can run the tests like so:
./bin/run_tests
or like so (or equivalent:)
python2 -m unittest discover -p "*_test.py"
We'll see. Perhaps it will become a fun game. It's also an exercise in architecting a simple game reasonably cleanly. It's a work in progress.