SDL3 release

SDL3 got released

The major news is the release of SDL3! Many improvements and new features got implemented! We are working on creating an easy to use binding called SDL3 for Pascal in a community effort. It is Free Pascal and Delphi compatible. sechshelme is working on another set of bindings as well.

Updated and fixed the code in the chapter about keyboard states. Fixed some “Next/Previous Chapter”-Links.

Fairtris 2: The Ultimate Challenge got released and has got many impressive improvements! You should definitively look into this game. It is open source and you can learn a lot how to use SDL2 in Pascal.

[Title image created with https://flatai.org; public domain]

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.