SwinGame V2 Pascal API

From SwinBrain

Note: SwinGame is now at www.swingame.com

The SwinGame API is a Pascal unit designed to assist in the creation of small 2d games in Pascal. This page contains links related to developing small games using version 2 of the API. Version 2 is a cross platform API which works on Windows, Mac OS, and unix. If you have suggestions or comments, please feel free to pass these on.

The content of this section was created for SwinGame API version 2. This may not be relevant for different versions of this software.

Getting SwinGame API

The SwinGame API requires the Free Pascal Compiler or the Delphi IDE. On Intel Macs you need to have an Intel version of the FPC compiler. Once you have the compiler or IDE you can download the following file that contains the SwinGame API setup to work in different environments. SwinGame: this zip file contains the setup used for working with SwinGame on Windows, Mac, and Unix. If you stick to using the SwinGame API and general Pascal routines the one project will be able to compile and execute across these three operating systems. This zip file contains everything you need to build and run these games on Windows and Macs, for Unix you will need to download and install libSDL, and the mixer, image, and TTF packages. These packages are available via apt-get on applicable distributions.

Download: SwinGame

Developing with SwinGame API

The following articles illustrate how to use the SwinGame API to perform certain tasks.

  • Basic SwinGame Articles
    • SwinGame Hello World - This article shows how to setup the SwinGame API, the basic program structure as well as loading fonts and writing to the screen.
    • SwinGame Image Drawing - This article shows how to load images and draw them using SwinGame API.
    • SwinGame Sprites - This article shows how to use Sprites within your games
    • SwinGame Reading Text - This article shows how to read text using the SwinGame API
    • SwinGame Drawing Image Parts - This article shows you how to draw parts of an image to screen. This shows an animation used to create a splash screen for the game.
  • Working with Vectors and Matrix2D
  • Collision Detection
  • Other Articles