ETPC

video games

  • he/him/they/them

video games | anarcho-communism | depression | blm | acab | trans rights are human rights | he/him/they/them | like 30 or 40 | movies | Senior Social Media Lead/QA for Mighty Foot Productions | runs @dnf2001rp


rohit
@rohit

If you're wondering how to port a software-rendered SDL 1.2 game to SDL 2.0, here's a patch you can look at.

A big thanks to the Chocolate Doom project for inspiration.


rohit
@rohit

Here's a patch for adding SDL3 support. I cheated a little and turned off joystick support, since that required more changes than some simple #define changes. Maybe I'll eventually add SDL_GameController (now renamed SDL_Gamepad) support and just remove the old joystick code. SDL3 isn't officially released, so I expect to change this code if the API changes. The CMake files will still build for SDL2, but you only need to edit a single CMakeLists.txt file and change the header and library location (and link directory if SDL3 isn't in usr/lib)

The patch isn't as big as the 1.2 -> 2.0 change (mostly some function renames, which is kind of annoying). The game should behave the same way, besides having a more modern rendering backend to push its 320x240 software rendered buffer, especially when @icculus merges his GPU API.

This might be the first game to have platform backends for SDL 1, 2, and 3, which is kind of cool.


You must log in to comment.