Installing the Game Engine
The game engine is built in python, using the pygame and numpy packages.
Pygame is a 32-bit package. You will need a 32-bit version of python.
Step 1: Install Pygame
Windows
- Install python (version 2.7.x recommended) https://www.python.org/downloads/
- Install pygame (pygame-1.9.1.win32-py2.7.msi should work) from http://www.pygame.org/download.shtml
- Download NumPy 1.9.1 32-bit for Python 2.7 from http://sourceforge.net/projects/numpy/files/NumPy/1.9.1/
Macintosh OSX 10.7 and above
The following instructions work with the default version of python bundled with your Mac:
- Install X11 (XQuartz) from http://xquartz.macosforge.org/landing/
- Install pygame-1.9.2pre-py2.7-macosx10.7.mpkg
- Download NumPy 1.9.1 32-bit for Python 2.7 from http://sourceforge.net/projects/numpy/files/NumPy/1.9.1/
Macintosh OSX above 10.3.9 but below 10.7
- Download the pygame 1.9.1 installation package from http://www.pygame.org/download.shtml that matches the version of python installed on your computer.
- Download NumPy 1.9.1 32-bit for Python 2.7 from http://sourceforge.net/projects/numpy/files/NumPy/1.9.1/
Linux Fedora
- sudo yum install numpy
- sudo yum install pygame pygame-devel
In order to run package-manager downloaded packages, you will need to use the command line /usr/bin/python in the event that you might have multiple versions of python installed.
Linux Mint
- Get python 2.7.6
- sudo apt-get install python-pygame
- sudo apt-get install python numpy
Step 2: Download the game engine
There is a different version of the game engine for every assignment. Codebases for assignments are in T-Square under the "resources" section.
Regardless of assignment, the game engine can be run by finding the appropriate run*.py file and running it with python. For example, the basic version without any AI can be run from the command line with: