Development Environment of Legend of Tux: Difference between revisions

From LD Smith Games Workshop
Jump to navigation Jump to search
Line 146: Line 146:
(SDL-1.2.14.tar.gz)
(SDL-1.2.14.tar.gz)


Extract the file
Extract the file (I just used File Roller 2.26.1)


Download SDL_mixer-1.2.10.tar.gz from http://www.libsdl.org/projects/SDL_mixer
Download SDL_mixer-1.2.10.tar.gz from http://www.libsdl.org/projects/SDL_mixer

Revision as of 06:09, 9 November 2009

This page defines the process for setting up the development environment for The Legend of Tux. This development environment will be for Cygwin using SDL under Windows. (Yeah... boo Windows... get over it) You should be able to build this same environment under Linux, Solaris, etc if you are ambitious enough. (your mileage may vary) I will try to also provide releases for both Windows and Ubuntu Linux.


Compiler and Game Libraries

Download cygwin: http://www.cygwin.com/

Run the "setup.exe" installer

Be sure to select the following:

  • vi
  • gcc
  • make
  • g++

Download SDL: http://www.libsdl.org/download-1.2.php

Get the "SDL-1.2.13.tar.gz" file


Start cygwin, and extract the file

# gzip -d SDL-1.2.13.tar.gz
# tar xvf SDL-1.2.13.tar

Build the SDL environment

# cd SDL-1.2.13
# ./configure
# make
# make install

Be sure to distribute SDL.dll with Windows builds

Audio

Download SDL_mixer-1.2.8.tar.gz: http://www.libsdl.org/projects/SDL_mixer/

If downloaded with Windows, rename the download

mv SDL_mixer-1.2.8.tar.tar SDL_mixer-1.2.8.tar.gz

Decompress

gzip -d SDL_mixer-1.2.8.tar.gz

Set permissions if needed

 chmod u+rw SDL_mixer-1.2.8.tar 

Decompress

tar -xvf SDL_mixer-1.2.8.tar

Without OGG Support

You will only be able to play .wav files, which can be quite huge (50+ Mb for a 2 minute music clip), which in turn makes your distribution package large


Install

 cd SDL_mixer-1.2.8
./configure
 
 make

 make install

Copy the SDL_mixer.h file

cp SDL_mixer.h /usr/local/include/SDL/

Copy the lib files

 cp ./build/.libs/*.a /usr/local/lib

Compile and run the test program

 gcc playwave.c `sdl-config --libs --cflags` -lSDL_mixer
 ./a -f <wavefile.wav>

Remember to copy the SDL_mixer.dll file (./build/.libs/SDL_mixer.dll) to the base directory of your release distribution

With OGG Support

Finally got an OGG to play with the playmus.c program, however it is a Windows only solution.

Download SDL_mixer-1.2.8-win32.zip from http://www.libsdl.org/projects/SDL_mixer/release/

Unzip, and put the DLL files in the SDL_mixer-1.2.8 directory, and it should work.

Note: Be sure to "chmod 644" your OGG files. When Audacity exports an OGG file, it will sometimes save it with zero permissions, and you won't be able to play the OGG file from your program.


OGG build testing notes

Graphics Tools

Gimp for Windows: http://www.gimp.org/windows/

For editing images


Blender: http://www.blender.org/

For building 3D models


Dia: http://projects.gnome.org/dia/

For creating UML diagrams


Site for free stock photos:

http://www.freedigitalphotos.net

Audio Tools

Audacity: http://audacity.sourceforge.net/

For converting between wav/mp3/ogg


Excellent site for public domain music: http://www.musopen.com/

Great for finding free music to include in the game

Level Design

Mappy: http://www.tilemap.co.uk/mappy.php


Building Under Linux

I am using Ubuntu 9.04 under Virtual Box 3.06 to build the Linux version. It's easier than setting up a dual boot system, and I doubt any of the Live distributions include SDL compilation libraries.

Dowload the SDL source from http://www.libsdl.org/download-1.2.php

(SDL-1.2.14.tar.gz)

Extract the file (I just used File Roller 2.26.1)

Download SDL_mixer-1.2.10.tar.gz from http://www.libsdl.org/projects/SDL_mixer