huseyinhealth/cangine — reverse-engineered prompt

Reverse engineered prompt

Build me a lightweight 2D game engine in C++ using OpenGL that feels simple to use for small games and demos. I want it to open a window, draw colored or textured shapes, render text, play audio, handle keyboard and mouse input, and give me basic timing info like delta time and FPS. Please include a clean game object and component setup so I can spawn objects, attach things like transforms or renderers, and update everything in a simple app loop.

It should also have some ready made UI pieces like labels, buttons, input fields, and panels, plus a movable camera, simple rectangle collision checks, shader and texture loading, and a straightforward audio manager. Make it easy to subclass one app class and override startup and per frame logic.

Please wire up a build that works with CMake and the provided Makefile, and include a few runnable examples like hello world, UI, audio, and a small sandbox. If anything is unclear, look up the current docs for the graphics and font libraries online.

Want more depth? Deep Reverse