What I've Made With SDL3 ZEngine (Oneirium) Development

ZEngine (Oneirium) Development


ZEngine:

Built a complete 2D game engine with SDL3 (SDL2→SDL3 migration). Horror metroidvania playtest just launched!

Hey everyone!

After a few years of development, I just released the public playtest for my game Oneirium on Steam, and I wanted to share my experience building a custom 2D game engine using SDL, from SDL2 through the SDL3 migration.

Why I chose SDL:

When I started this project, I knew I wanted complete control over my rendering pipeline, input handling, and system architecture for a dark atmospheric horror game. I evaluated several options:

  • Unity/Unreal felt too bloated for pure 2D

  • Raw OpenGL/DirectX meant reinventing too many wheels

  • SDL hit the perfect sweet spot: low-level control with abstractions

SDL gave me exactly what I needed: a solid foundation to build upon without imposing architectural decisions.


The SDL2 → SDL3 Migration:

I started development with SDL2, and had some on/off years (i.e: graduating college and getting a full-time job). Recently, SDL3 previews started appearing. Here’s my migration experience:

Initial Attempt (Early SDL3):

Tried migrating when SDL3 was still in preview. Hit some issues:

  • Some functionality I relied on wasn’t fully implemented yet

  • Documentation was sparse for certain edge cases (Overall, still great documentation)

  • Decided to wait for a more stable release

Second Attempt (SDL3 Stable):

Waited for SDL3 to mature, and the second attempt was remarkably smooth:

What made it easy:

  • The migration scripts provided by the SDL team were excellent: caught ~80% of the changes automatically

  • API improvements felt natural (e.g., properties system, explicit app callbacks)

  • Performance improvements were noticeable, especially in rendering batching

  • Better controller support out of the box, after taking some time to figure out the new API.

Manual changes needed:

  • Updated initialization code to use SDL3’s explicit structure

  • Refactored some custom pixel format handling

  • Adjusted audio loading to new SDL3_mixer patterns (this took the longest for sure, with the SDL3 & SDL2 hybrid approach I had to take).

  • Fixed some texture creation flags that changed

Overall migration experience. The SDL team did an incredible job with backwards compatibility scripts and clear migration guides. Took me a few weeks of part-time work to fully migrate and test.


About the Game:

Oneirium is a dark Victorian Gothic horror metroidvania inspired by Bloodborne, Blasphemous, and Hollow Knight. You navigate twisted dreamscapes where nightmares bleed into reality, featuring:

  • Interconnected world with backtracking and shortcuts

  • Brutal combat with precise hitboxes

  • Dynamic sanity mechanics that alter gameplay, entities and visuals

  • Custom In-Game Sanity Language

  • Three character classes with unique abilities & passive tree

  • Custom atmospheric shaders for fog, lighting, and horror effects

The demo is live on Steam now if anyone wants to see what you can build with SDL3 and some C++!

Trailer

Steam Link - Public Playtest OPEN


Thank You to the SDL Team:

Seriously, thank you to everyone who contributes to SDL. You’ve spent decades building and maintaining this framework, and it’s enabled countless developers like me to bring their visions to life without getting bogged down in platform-specific nightmares.

SDL is proof that open-source infrastructure can be world-class. The stability, performance, documentation, and community support are outstanding. You don’t get enough credit for how foundational this library is to the game industry.

Special appreciation for:

  • Clear, comprehensive documentation

  • Responsive issue tracking and bug fixes

  • Excellent migration tooling for SDL3

  • Conservative API design that doesn’t break existing code unnecessarily

  • Active community that helps newcomers

If anyone has questions about building a custom engine with SDL, specific implementation details, or the SDL3 migration process, I’m happy to share my experiences!


Stats for the curious:

  • Development time: ~5 years solo (However, I did have some times where I stopped working on the game for long periods of time)

  • Engine LOC: ~140k lines across 90+ files

  • SDL features used: Rendering, Input, Audio, Timing, File I/O

  • Target platforms: Windows (primary). TODO: Linux (Currently Proton handles this) and macOS and then Consoles (Switch / Xbox / Playstation).

  • Performance: 60 FPS locked on integrated graphics, SDL is capable of handling more but I decided 60 FPS is the perfect amount for this game.

  • Future plans: Complete switch over to the SDL GPU API as it better supports the shader system. Currently using a hybrid approach which causes a good amount of artifacts unfortuantely. While I don’t necessarily need multi-threading for the core game, I am likely going to implement it for my resource manager.

I still have a long way to go, but I’m happy to share what I have achieved so far with SDL!

Thank you!

3 Likes

Your game looks very good and reminds me a little of Shadow of the Beast.

1 Like

@Mik
Thank you, I truly appreciate that :smile:
I’ve actually never heard of that game, but I’ll check it out!

Very cool! I put it on my wishlist, and will try to take a run at the playtest build soon!

1 Like

Sounds great! Thank you :smiley: