/omega

Simple framework for creating 2D games in C

Primary LanguageCGNU Lesser General Public License v3.0LGPL-3.0

OMEGA

Simple framework for creating 2D games in C (C++)

Functionality

  • Multiple backends (Dynamic/static backends loading at real time) (SDL2, Raylib, Win32)
  • Libraries config using config.h or preprocessor macros
  • Window management (SDL2, Raylib)
  • Renderer (Direct3D, OpenGL, OpenGLES, WebGL, Software) (using SDL2, Raylib)
  • Image loading (SDL2_image, Raylib, libspng)
  • Audio (Music/Sounds) playback (SDL2_mixer, Raylib, FMOD, Web)
  • TTF (TrueType Font) Rendering (SDL2_ttf, Raylib)
  • Bitmap fonts
  • LDtk tilemaps import

Is it written in C?

Yes, it it's written in pure C.
It also does some tricks with C to extend its power. For example:

  • OOP using structs, function pointers, etc
  • Magic macros like OMG_INFO which accepts different number of arguments of different types
  • Things like tracing memory allocation by code file, function, line
  • Simple error handling using bool return type
  • Using native win32 api instead of C stdlib on Windows
  • Many other tricks

Portability

It's only limited to C language and backend libraries. I was able to run examples on:

  • from Windows XP (including ReactOS) to Windows 11 (Windows 2000 is only supported with extended kernel)
  • UWP (Windows 11)
  • Linux
  • UNIX (FeeBSD, NetBSD, OpenBSD)
  • Web (SDL2 + Emscripten)
  • Android (thanks to SDL2)

Examples

There are some examples.

This one shows main functionality of the framework

This one shows working with scenes, animations, tilemap rendering

This is a mini-platformer (written in ~3 days) which shows what you can do with my framework

License

LGPL-3.0 License. See LICENSE.md.
In short, feel free to use it in your projects, but you may not close source code of this framework, if you modify it.