Posted June 01, 2023 by Joe Betz
#performance #graphics #sdl
Feature development on Angel Beats is paused as I'm currently in the process of switching the rendering layer from GDI+ to SDL. Upgrading to something with 3D support is something I had always been planning to do, and performance issues with GDI+ have become intolerable, so I decided that now was as good a time as ever.
Wins of switching to SDL so far:
Downsides have been bearable. There is more explicit resource management required to prevent memory leaks. And it's going to take some time to get fonts looking pretty. But already I'm more than happy with the change and am convinced it was totally worth it. SDL's API is really well documented and does a good job of sticking to an abstraction level.
Descending from high level features to low level details always sucks, but I think what's made it relatively painless and even enjoyable this time is knowing that I'll be able to go all the way with SDL. It's a stable foundation not just for 2D applications but also for 3D game engines. And like I said before, one of the meta-goals of Angel Beats is raising the level of GUIs to video games and beyond.
I also want to emphasize that this only touches rendering and nothing else. Windows native widgets are too weak and inflexible for what I need, so I built a GUI framework that 2D rendering, layout, and event routing, as well as an accompanying widget library. I can talk more about that in future devlogs if people are interested.
To use Tears of the Kingdom as a metaphor, I'm currently making my way through the depths, but the sky islands are still in sight and I'll be back to them soon!