jMaz

A foundational game engine built from the ground up for a cross-platform experience. Developed entirely in Java, without the use of external libraries.

Industry

Game Development

Stack

Java

Render engine and lighting system

jMaz features a custom render engine built from the ground up with the ability to render shapes, fonts, light sources, full images, and image segments. The engine works by iterating through the pixel data of all components and merging it into a pixel map using bit shifting to accurately obtain and combine red, green, blue, and alpha (RGBA) layers.

Built on top of the renderer, the lighting system supports ambient lighting, dynamic light sources, shadow casting, and light source blending. It generates a light map from all active sources and combines this with the pixel map to produce dimmed or brightened pixels based on lighting intensity.

Sprite and animation system

Images can be loaded into the engine as sprite sheets, which are divided into segments of a specified size. This allows a single image to be reused in multiple contexts throughout the engine.

The main use of sprite sheets is animation. Each segment of the sheet represents a frame tied to a specific action or behavior, enabling smooth character and object animations.

Camera and input system

The camera defines what the player sees. It can follow any specified object within the stage while keeping the view bounded within the game container. This allows for smooth tracking without revealing areas outside the intended stage.

The input system handles hardware inputs such as movement and actions. It allows the player to move, jump, and shoot projectiles in real time.

Object and physics system

All entities in the game — including the player, light sources, and projectiles — are treated as independent objects. The object management system updates their state, handles interactions, and sends them to the renderer each frame if active.

The physics engine defines rules like gravity, acceleration, and momentum, while the collision system governs how objects interact. This includes platform collisions, projectile hits, and event triggers based on spatial conditions.

Stage and level management

jMaz uses a stage templating system that combines visual layout with collision data. Each level is defined using two images: one for how the stage looks on screen, and another for the collision map that determines solid areas, platforms, and boundaries.

Audio system

The audio system enables background music and sound effects to be played throughout the game environment.

Client/server functionality

To support online play, jMaz uses Java's Remote Method Invocation (RMI) system. Both the client and server share an API that defines operation codes and parameters, allowing the client to remotely call server-side functions and receive responses in real time.

Want to see more?

I've worked on a wide range of projects across different industries and styles. If you enjoyed this one, there's plenty more to explore.