Tag Archives: sdl3

title image fairtris

Fairtris and an “Error Chapter” :-)

Added a new great project by Jarosław Baran, Fairtris! – It is purely done in the Lazarus IDE with Free Pascal and uses the SDL2-For-Pascal units to make use of graphic hardware acceleration. The full source code is available and poses a great opportunity to learn how to craft a SDL2 game with Free Pascal!

A brand new chapter about error handling in SDL2 and its combination with Pascal’s exception handling is released now and added to the SDL2 tutorial.

Updated the widgets (replaced legacy widgets) and added new links. Some tags got updated to reflect my new “naming policy” to use SDL2 instead of SDL 2.0.

The work on SDL3 has begun on the official development branch of the SDL project. I’m curious to see what comes from this.

Edit: Fairtris’ author’s name got corrected. (03/06/2023)

What is SDL (SDL2, SDL3)?


SDL is the abbreviation of Simple DirectMedia Layer. It is a software library written in C which provides a free, easy and platform-independent access to features needed for developing high performance games and applications. This includes easy access to graphic, sound and input device handling (keyboard, gamepad, mouse, joystick, touch screen, …)

The idea is, you create a program against SDL and it should compile on any supported platform (Linux, Windows, Mac, Android, iOS, Playstation, …) without or with minimal adaptions necessary.

Originally when referring to SDL, SDL version 1.2 was meant. It is the predecessor of SDL2 and modern SDL3. Nowadays, when refering to SDL, it depends on context if you really mean the old SDL 1.2, the successor SDL2 or the modern SDL3.

For the obsolete SDL versions and the modern SDL3 are sets of units available for Free Pascal and other Pascal dialects.

Who made SDL, SDL2 and SDL3?


SDL was developed between 1998 and 2001 by Sam Lantinga, the chief programmer of the software company Loki Games. It should be a tool to convert successful Windows games to Linux. In 2002 the company got bankrupt though, but Lantinga went on developing SDL. So it got updated continuously  until today. In August 2013 the successor SDL2 has been released.

On January the 21st in 2025 SDL3 has been released and introduces a lot of new features which allow development of high performance applications using up-to-date technologies.

Although the original library isn’t written in Pascal, fortunately the SDL3 headers got translated to Pascal, so the SDL3 library is usable for Pascal developers as well.

What is this page about?


This page is made to help you to start with SDL3 (or the older SDL or SDL2) under Free Pascal (or other Pascal dialects) and to acquaint yourself with SDL’s concepts and commands.

Be aware though that my tutorials gives just a brief overview and introduction to SDL and are far from being all-embracing.

The tutorials aim at Pascal programmers knowing the basic concepts (loops, functions, pointers) of Pascal and now like to progress to SDL3 (or older SDL/SDL2).