Skip to content

Kobengine

... is a small, custom, 2D Game-Engine made from scratch in C++!

What is Kobengine?

Kobengine is a custom-built 2D game engine written from scratch in C++.
I had been using game engines such as Unity and Unreal Engine before, but how do they actually work under the hood? How do they handle certain things? This custom engine is a challenge to better understand how game engines work.

It features a component-based system, input handling, asset loading, and a basic UI layer. It’s meant to be simple, fast, and flexible. How do you test if your game engine works though? Well you make a game in it! For that I recreated the classic game Burger Time in my own engine, which you can find here.

Framework Features

Game Objects
Components
Events
Service Locator
Update Loop
Input Handling
Animation System
UI
Collision
Commands
Hover over an item

Description will appear here.

Deep Dives

Update Loop

The update loop is crucial to be correct in order to ensure predictable behaviour. We need to make sure everything happens in the correct order per frame.

UpdateLoop

Components

The engine uses a component-based architecture. Game objects are composed of reusable components, some provided by the engine, others made by the user. Some components that are a part of the engine are an Image Renderer, Text Renderer, Animator, Collider, and more.

Events

For communication, the user has the option to use events that are built into the engine. Kobengine tries to mimic Unity events in C++, binding (member) functions and/or lambdas to events, which get called once the event gets invoked. Kobengine already supports events to have lambdas and event listeners as its listeners, but the user can always make a new class that inherits from EventListener to have extra functionality if they need.

Service Locator & Singletons

Both the Sound System and Collision System are part of the Service Locator Pattern and can be swapped out by a personal implementation if wanted. For some other classes such as the Timer class, this is not possible, as it is a purey static class.