Trilarion / opensourcegames

Technical infos of open source games.
https://trilarion.github.io/opensourcegames/
Creative Commons Zero v1.0 Universal
684 stars 85 forks source link

Convert projects from SDL 1.2.x to SDL 2? #232

Open Trilarion opened 4 years ago

Trilarion commented 4 years ago

This issue should discuss the usefulness and practicability of upgrading SDL 1.2.x dependencies to SDL2.

Here are relevant parts of recent discussions

lm8

Any plans to update the older SDL 1.2.x games to SDL 2.x? I've started doing that for the SDL programs I regularly build from source. However, there are some operating systems that have a port of SDL 1.x and haven't yet been able to port SDL 2 yet. I've also run across a few situations where developers/Linux distributions might prefer SDL 1.x because it uses less system resources. So, if a programs supports SDL 1.2.15, I've left the code in the program to support compiling either way. I've done a lot of building from source for SDL based programs using C/C++. They port to multiple platforms very easily. I've compiled SDL based programs on Windows, Linux and FreeBSD. Have also ported some programs to work on Android using SDL 2.

me

I'm not yet at the stage where I really look at the projects. Conversion of SDL 1.x to SDL 2.x makes sense if the games kind of profit from it. Looking at the statistics so far about 1/3 of games using SDL use SDL2. There are at least 100 games in this database using SDL 1.x I guess that SDL2 has advantages and SDL 1.2.X may become deprecated at some point. On the other hand conversion just for the sake of conversion doesn't sound very useful for now. There might be more pressing matters. If you want to convert games from SDL 1.2.X to SDL 2 I fully support this and at some point I might also join the effort.

lm8 commented 4 years ago

My impression was that SDL 1.x was deprecated. There are still some Linux distributions that have SDL 1.x packages, but the official SDL mailing lists really only appear to be supporting SDL 2.x now.

Trilarion commented 4 years ago

This means that there are OS that have a port of SDL 1.2 but none of SDL 2 (but they may get one) and the majority of systems supports SDL 2 and may stop supporting SDL 1.2.

Then I would say that a conversion to SDL 2 is always a good thing. Are there guides/tutorials out there for the conversion? What are common pitfalls when converting from SDL 1.2 to SDL 2? Or is it straightforward?

lm8 commented 4 years ago

There's an SDL migration guide: https://wiki.libsdl.org/MigrationGuide

Trilarion commented 3 years ago

We would also need a list of those games with SDL1. There are ~300 entries with SDL (but not SDL2) listed as dependency.

lm8 commented 3 years ago

Someone told me there was a library on Fedora which was a wrapper for SDL 2 that provided SDL 1.x capabilities.

Trilarion commented 3 years ago

Do you know the name of the library?

lm8 commented 3 years ago

I don't know the name of the library. Dennis, the developer behind Gamerzilla ( https://fedoramagazine.org/open-source-game-achievements/ ), mentioned it and said he's worked with it.