pngwen / xboing

A resurrection of the blockout style game for the x windows system.
Other
1 stars 4 forks source link

Select new audio/video libraries #1

Open pngwen opened 3 weeks ago

pngwen commented 3 weeks ago

Let's discuss which audio and video library we want to use for the modernized version of XBoing. Proposed candidates:

josiahtripp commented 2 weeks ago

I think that SDL2 and QT would be good options for the projects. After doing some brief research, it seems that some additional libraries may be required to utilize audio playback with GTK+. However, SDL2 and QT include audio support right from the get-go.

Between SDL2 and QT, I think both could be good options. Compared to QT, SDL2 is much lower-level. SDL2 would require us to deal with aspects such as event polling for input and audio sample rates. But, the Xboing code written for X11 also seems to be lower-level, so it may reduce the changes we need to make. We could incorporate some additional libraries alongside SDL2 to simplify input/audio, but that would just remove the advantage that SDL2 had in being closer to X11.

If we decide to go with a higher-level library, other than QT, there's a pretty intuitive one I've messed with a bit called "Raylib". It's multi-platform, and even supports compiling to web-assembly. Meaning our Xboing revamp could be played by anyone!

At the end of the day, I think comparing the structures of SDL2 and X11 could help us determine if SDL2 is the right option due to better compatibility with current code. Though, for the sake of modernization, I personally think QT or Raylib are our best options!

josiahtripp commented 2 weeks ago

Additionally, using a library other than SDL2 would likely mean our XPM bitmap textures would be unsupported. I think it would be be best to convert these textures to a more widely-used file structure. A raw-bitmap (.bmp) file would preserve 100% of our original texture's quality, while also being supported by both QT and Raylib!

de01dwc commented 3 days ago

I've looked over the three plus one suggestions.

Since we're updating both audio and visual, I lean towards a combined solution which rules out GTK+.

Qt seems to be more heavily focused on gui, which I don't think is needed in this project. QT is written is C++, which may mean an extra level of complexity to integrate with our C program.

Both SDL2 and Raylib are written in C and have both audio and graphic support. Raylib seems to be less robust than SDL2 which may make it a simpler solution to implement. Unless there's a feature needed by XBoing that Raylib does not support, I think it may win out in my mind.

Winner—Raylib Runnerup—SDL2