ken-noland / OpenXcom

Open-source clone of the original X-Com
http://openxcom.org
GNU General Public License v3.0
0 stars 0 forks source link

SDL needs to be removed #2

Open ken-noland opened 1 month ago

ken-noland commented 1 month ago

SDL is currently stuck on version 1.2 and has some modifications in order to get it to work on all the various platforms. There is no need for SDL in this project, so it would be good to remove it and replace it with something a little more modern and something that is supported on all the various platforms.

Graphics

OpenGL and Vulkan come to mind for the graphics side.

OpenGL might be a good option, but it is archaic and has implementation differences on target platforms that could make it challenging to implement.

Vulkan is a better choice, but is famously verbose and takes a lot of scaffolding code just to get it to work.

Ultimately, I think Vulkan would be a better choice.

Windowing and Input

SDL handles a bit more than just graphics. It also handles windowing, input, audio and more. For a windowing framework and input framework, we can just roll our own. It's mostly just boilerplate code anyway.

Audio

For audio, we need to investigate our options there, but OpenAL might be a good starting point and we can then use the open source codec support to allow for various audio formats.

Problems

SDL is widely embedded in the project and if great care isn't taken, then we could end up breaking the whole thing.