Kanapka Engine

Kanapka Engine, a personal 2D game engine that I developed in Java to learn more about engine architecture, graphics programming, physics, tooling, and networking.

The engine uses OpenGL for rendering and follows a component-based scene structure. Game objects are represented as nodes containing reusable components, with support for parent-child relationships, 2D and 3D transformations, materials, shaders, textures, cameras, and multiple scenes.

Its rendering system includes configurable render layers for the background, world, particles, UI, and foreground. It also supports sprite rendering, texture atlases, animations, particle systems, render textures, custom GLSL shaders, and experimental post-processing effects.

The engine includes a custom 2D physics system with rigid bodies, gravity, rectangle colliders, collision resolution, raycasting, and collisions with a chunk-based tile world. I also created foundations for client-server networking, route-based messages, payload serialization, synchronized data, plugins, audio playback, and scheduled operations.

An editor built with Dear ImGui provides a scene hierarchy, resource browser, transform controls, component inspection, editable fields, and debugging information. Java reflection is used to expose selected component fields and methods inside the editor.

- Engine uses Java 1.8 as its SDK

- LWJGL for access to OpenGL, GLFW, and OpenAL

- OpenGL and GLSL for rendering

- JOML for vector and matrix mathematics

- Dear ImGui for the editor and debugging tools

- Java sockets for client-server networking

- Maven for dependency and project management

Developing Kanapka Engine taught me how the different parts of a game engine communicate with one another. It gave me experience with scene and component architecture, rendering abstractions, resource ownership, physics updates, input handling, editor tooling, networking, and the overall game loop.

This project also helped me understand the challenges involved in maintaining a larger codebase as its systems grow and become more connected. Although the engine remains an experimental personal project, building it gave me a strong foundation for my later graphics and game-development work.

Gallery

Networking 1

Networking 2

Automatic material uniform binding