SwinGame V2 Pascal API
From SwinBrain
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.
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
- SwinGame Vectors - This article shows how to use Vectors with your sprites to map movement
- SwinGame Vector Manipulation - This article shows how to transform your vectors within SwinGame.
- Collision Detection
- SwinGame Edge Collisions - This article details how to detect collisions on edges of a playing area
- SwinGame Pixel Level Collisions - This article covers how to perform pixel level collisions within SwinGame
- Other Articles
- SwinGame Circle Collisions - This article details how to perform collisions between two circles one circle bounces off another.