AGK for Pascal is a Pascal wrapper and class library for App Game Kit.
- AGK for Pascal wraps all AGK commands into a class model. All you need to use is the AGK unit. The easiest way to use AGK for Pascal is to use the classes provided in the AGK unit. However, if you prefer, you can also use the "flat" AGK commands directly without using the class model (all flat API's have an "agk_" prefix, for example "agk_Print").
- AGK for Pascal is scene based. The idea is that your application consists of multiple scenes (like a startup screen, level select screen and actual levels). You descend these scenes from TAgkScene, and you set the current scene using TAgkApplication.SetScene. Sample applications 054-056 show an example of using multiple scenes.
- AGK for Pascal is very lightweight. It achieves this by using code inlining and static methods wherever possible, so that this wrapper has very little impact on performance (if any at all).
- AGK for Pascal has some utilities not found in the AGK library. For example, the TAgkPoint structure simplifies working with 2D points and vectors. It supports operator overloading to add, subtract and multiply points and vectors, as well as various utilities to calculate the length of a vector, normalize and rotate a vector etc. All AGK methods that have X, Y coordinate parameters also accept a TAgkPoint as parameter. Sample application 014 (Sprites_MovingSprites) shows a good example of this (compare it to the VB or C version).
- AGK for Pascal comes with Pascal versions of almost all sample applications in the original SDK (see the Examples directory). These sample applications are truely single-source in the sense that the actual application code is in one or more source files that are shared between the platform-specific projects. For example, most sample application have a single unit called uMain with the application code. In the same directory, you will find a .dpr file with the Delphi project for Windows, a .lpr file with the Lazarus project for Windows, Mac or Android, and a .xcodeproj folder with the Xcode project for iOS.
- AGK for Pascal currently supports Windows, Mac OS X, iOS and Android (using Delphi or Free Pascal with Lazarus or Xcode). Android development is currently only supported on the Windows platform.
AGK for Pascal wraps AGK into the following main classes and structures:
Application and Scene management:
Color and Geometry:
Sound and Music:
Universal (platform independent) input:
Raw (platform dependent) input:
Networking and Multiplayer: