New Version of SDL2-for-Pascal Units Released

Version 2.2 of the SDL2-for-Pascal Units got released! It took nearly two and a half years to update the SDL2-for-Pascal Units to be quite up-to-date with the latest version of SDL2. We got a quite updated package now. For you this means, there is no good reason not to start using SDL2 in Pascal to realize your (game) projects, be it with Free Pascal or Delphi, on Linux, Windows or MacOS. – Other compilers and OS’es work too, probably.

I’d like to thank all contributors for their efforts. I’d also like to thank suve, the co-maintainer, for the great cooperation, without which some large improvements would be missing in this release and some serious mistakes wouldn’t have been caught before merging the code :-)!

Happy New Year and Happy Coding!

Here are the offical release notes:

  • SDL2 unit is up-to-date with at least version 2.0.14 of the SDL2 library (exception sdlthread.inc)
  • many aliases got replaced by typed enums
  • add single and double pointers for all types (thanks furious-programming)
  • update SDL_ttf.pas to latest version 2.21.0
  • replace data types by c data types (see PR #29)
  • add folder structure (see PR #27)
  • many bugfixes
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)

sdl2 news title image

SDL2 documentation

Thanks to suve a new documentation resource is available for the PGD SDL2 units at https://pascalgamedevelopment.github.io/SDL2-for-Pascal. The docs are generated directly from the source if new pull requests are merged into the master branch of the repository. Talking of the SDL2 units: They made good progress in 2022 and are still making good progress and soon the first official release will be available.

FFPlay4Laz2 has been added to the projects. It is a Free Pascal/Lazarus Media Player powered by the FFmpeg frame work and SDL2.

In the future I will not refer to SDL version 2 as “SDL 2.0” anymore as SDL’s version numbering scheme has changed with version 2.0.23 (now actually being 2.23.1). That means the minor version is not zero anymore and SDL 2.0 is misleading in that regard. I will update any reference by “SDL2”.

Updated Chapter 4 to reflect changes in the new PGD SDL2 units.

sdl2repo-music-sound

Many updates, everywhere

The news title says nothing and everything :-).

After an PHP update the syntax plugin doesn’t work anymore. I added a better plugin and updated all chapters to display code in a reader friendly way. I also removed the description how to copy source code using the old plugin in the introductory chapter. I adapted code snippet length in some chapters (Chapter 4, Chapter 15). Updated Chapter 18 about music and sound.

I added a new SDL2 powered Free Pascal project: SuperSakura. It’s a nice visual novel engine to run retro-style Japanese games by Kirinn.

I updated some chapters (Introduction, Windows Installation, Linux Installation), mainly because of the repository change to the PGD Community SDL2 units. The units got a lot of updates lately, and help is needed to improve them even further. While this news post was waiting to be published, it appears Tim is back. Now, we have the unfortunate situation that there are two active repositories for the SDL2 headers and the situation has not been resolved, yet.

Also, I changed some stylings.

Download SDL2 units on GitHub

Important: New SDL2 Repo!

IMPORTANT: The repository to get the newest, up to date, SDL2 units has changed. It is found here: https://github.com/PascalGameDevelopment/SDL2-for-Pascal. It is now hosted by our Partner site Pascal Game Development, where you can find many resources if you are interested in game development with Delphi or Free Pascal.

Background: The old repository by Tim Blume has been an up to date source for these units for many years since its establishment (Thanks Tim!), but lately no more pull requests were integrated and so a new repository maintainer had to be found. Long time contributor to the units, Super Vegeta (suve), came up with the great idea to integrate it to the PGD repository, which is now reality (Thanks AthenaOfDelphi!).

What now: Please, if you are a Pascal SDL2 developer, pull from, commit to, fork and star the new repository over at https://github.com/PascalGameDevelopment/SDL2-for-Pascal and update your links accordingly. 🙂

Updated the Linux installation chapter. Now you can get the environment running rather quickly.

Added a new widget “Quality Pascal Articles” (right sidebar) where I add carefully chosen Pascal articles, I appreciate.