Hi all,
Just wanted to share a game engine I’m working on for my current project (using SDL ofc, with the usual extensions).
It’s implemented in CPP and have a C# bind.
CPP:
https://github.com/RonenNess/BonEngine
C#
https://github.com/RonenNess/BonEngineSharp
The engine is code base (ie no editor) and it basically aims to make everything as simple as possible to use and setup.
It has the following key features:
- Scene-based architecture with all the basics - Update, FixedUpdate, Draw, Load, Unload…
- Assets management (textures, sounds, music, config, fonts) with optional cache.
- Graphics manager to draw sprites, text, textures ect.
- SFX manager to play music and sound effects.
- Input manager to provide key bindings and simple to use input using querying instead of events (ie IsDown(), IsReleased(), IsPressed()…)
- Sprites and sprite animations.
- Framework with all the basics (vectors, rectangles, colors…) but as classes with extended API.
- Loading and using ini files to store config and game asset’s metadata.
- UI system with windows, buttons, text input, checkboxes, sliders, and more.
- Built in logging and diagnostics manager.
And some other useful stuff.
Here’s a tiny example to show the lib general vibe:
/**
* Basic hello world scene.
*/
class HelloWorldScene : public bon::engine::Scene
{
private:
bon::ImageAsset _spriteImage;
public:
// on scene load
virtual void _Load() override
{
Game().LoadConfig("config.ini");
_spriteImage = Assets().LoadImage("../TestAssets/gfx/gnu.png");
}
// per-frame update
virtual void _Update(double deltaTime) override
{
if (Input().Down("exit")) { Game().Exit(); }
}
// drawing
virtual void _Draw() override
{
Gfx().ClearScreen(bon::Color::Cornflower);
Gfx().DrawImage(_spriteImage, bon::PointF(100, 100));
}
};
// init engine
void main()
{
auto scene = HelloWorldScene();
bon::Start(scene);
}
Anyway if you find it interesting feel free to use for whatever purpose.
Feedback is always welcomed.
Thanks,