Instructions - Free Pascal - Linux

This article shows you how to get started creating a SwinGame using the Unix Free Pascal version of the SwinGame SDK.

Requirements
You will need the following to use the Linux-Pascal version of the SwinGame.


 * The SwinGame SDK - download SDK or compile from source.
 * The following libraries from SDL: (include the runtime and dev packages)
 * SDL core library
 * SDL Mixer library
 * SDL Image library
 * SDL TTF
 * SDL GFX

Installing
The file downloaded contains all the files you need to start making the game. You will not need to install this, just copy the SGDDK folder to wherever you like. The following files are included in the SDK.
 * GameLogic- The main game source file. You will be writing your game to this file.
 * GameResources - Resource manager (Explained in here)
 * build.sh - A script to compile the game.
 * bin folder - A compiled game will go in here.
 * lib folder - Contains the SwinGame libraries.
 * Resources folder - Contains the resources used in a game.

Starting a Game
In order to run the game you need to do the following:
 * 1) Open the Terminal
 * 2) Move to the SwinGame SDK directory (use cd command)
 * 3) Compile the game using the build.sh script. (execute ./build.sh)
 * 4) Run the compiled game from the bin folder.

That's all. You have now setup SwinGame and are ready to create your own games.

Distributing your Game
When your game is complete you can distribute it by packaging up all of the files in the bin folder. Users of your game will need to install the SDL libraries to run your game.

As you have developed this game in Pascal it is also possible to distribute it to people running Windows or Mac. To do this you will need to compile the game on Windows or Mac. You need to get the SwinGame and copy all of your Pascal source code files (*.pas) to the Windows or Mac version of the SDK. Then run the scripts that accompany these SDKs and you will have a native Windows or Mac application!

Enjoy programming with SwinGame!