Source

pyGAP /

Filename Size Date modified Message
game
116 B
872 B
3.5 KB
179 B
479 B

pyGAP: Game Asset Pipeline in Python

pyGAP is a basic framework to help building game assets with different tools.

Prerequisites

Python >= 2.5

Install Linux

easy_install pip
pip install -r requirements

Install Windows (Beginner)

cd path/to/pyGAP
easy_install pip
pip install -r requirements.txt

Setup Python to use MinGW

  • install MinGW with C++ Compiler and MSYS options checked
  • add C:\MinGW\bin to your PATH [1]
  • in this directory, copy mingw-make32.exe and rename it make.exe
  • in PYTHONPATH\Lib\distutils, create a file distutils.cfg and add these lines:
[build]
compiler=mingw32

Assets

In the assets directory, run:

python waf configure build

You can configure waf, it will remember these settings for the next builds. Use --help to see the available options. Here they are:

--m64   align pointers for 64 bits OSes

-b, --big-endian
        force the endianness

-z <module>, --zip=<module>
        specify the compression module to use e.g. lzma, zlib, lzo
        (default: zlib)

-l n, --zip-level=n
        specify the compression level (default: 1)

--padding=n
        specify the file padding (default: 4)

After configuring waf, you can simply call it to build the assets:

python waf

Game

You'll have to build Zlib or XZ (lzma) depending on which compression module you used with your assets.

On Windows, pyGAP will search in ../libs, you should install your libraries in this directory.

+- pygap
|   +- game
|   +- assets
|
+- libs
    +- zlib
    +- xz

On Ubuntu, you should know what to do...

sudo apt-get zlib1g-dev
sudo apt-get liblzma-dev

Then you can configure and build the game. Here are the options:

--m64   align pointers for 64 bits OSes

-b, --big-endian
        force the endianness

-z <module>, --zip=<module>
        specify the compression module to use e.g. lzma, zlib, lzo
        (default: zlib)

Build Zlib with MinGW

In the Zlib directory, run:

make -fwin32\Makefile.gcc

Build XZ with MinGW

Run C:\MinGW\msys\1.0\msys.bat then go to XZ directory with this command prompt, and run:

./configure
make

[1](1, 2) how to add Python to Windows PATH
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.