Instructions - Free Pascal - Windows
From SwinGame
This article shows you how to get started creating a SwinGame on Windows with the Free Pascal version of the SwinGame SDK.
Contents |
Requirements
You will need the following to use the Windows Free Pascal version of the SwinGame.
- Free Pascal Compiler - A free download from Free Pascal.
- Text editor - for example Crimson Editor
- The SwinGame SDK - download
Installing
The zip file contains all the files you need to start making the game. You will not need to install this, just copy the extracted files to wherever you like. The following files are included in the SDK.
- GameLogic.pas - The main game source file.
- GameLauncher.pas - Launches a game (You will never need to modify this file)
- GameResources.pas - Resource manager (Explained in here)
- winbuild.cmd - A script to compile the game.
- copyresources.cmd - A script used by the winbuild.cmd.
- 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:
- Open the Command Prompt
- Move to the SwinGame SDK directory (use cd command)
- Compile the game using the winbuild.cmd script. (execute winbuild.cmd "game's name here".exe)
- Run the .exe file in 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. These can then be distributed to anyone running Windows. They run the game by double clicking the executable. They do not need to install anything to run the game.
As you have developed this game in Pascal it is also possible to distribute it to people running MacOS or Linux. To do this you will need to compile the game on Mac or Linux. You need to get the Free Pascal versions of SwinGame and copy all of your Pascal source code files (*.pas) to the Linux or Mac version of the SDK. Then run the scripts that accompany these SDKs and you will have a native Mac or Linux application!
Enjoy programming with SwinGame!

