Modular Engine
A Lightweight 2D Game Engine for Retro Game Development
Modular Engine is a highly efficient, modular game engine tailored for creating retro-style, pixel art games. Its streamlined architecture, optimized rendering systems, and powerful sprite handling make it an ideal tool for indie developers and retro game enthusiasts. Whether you're a seasoned game developer or someone with a passion for 16-bit style games, Modular Engine offers the tools and optimizations you need to bring your vision to life.
Lightweight, Modular Design for Optimal Performance
At its core, Modular Engine is designed with a modular architecture, which allows it to swap in only the necessary components at runtime. This makes the engine highly memory-efficient and adaptable for different types of games. The engine avoids bloat by only loading what is required, reducing memory overhead and allowing your game to run smoothly on the most limited of hardware. Practically any computer produced in the last 25 years can run the engine, even systems without hardware accelerated graphics.
Two-Stage Rendering System
One of the standout features of Modular Engine is its sophisticated two-stage rendering system, which splits drawing logic into two modes: Text Mode and Graphics Mode. This approach optimizes the way both text and graphics are handled, tailored to the specific needs of retro games.

Text Mode
Text in retro games is often static or changes less frequently compared to graphics. Modular Engine's Text Mode is optimized for this, minimizing redraw operations and ensuring efficient text handling. Since text is drawn after graphics, you never have to worry about important information being obscured by on-screen elements. The simple, printf
-like function allows you to print text with just two additional parameters: the x and y coordinates of the screen.
- Refresh Rectangles: Automatically redraws only parts of the screen that changed, which is ideal for games that feature HUDs or status displays that don't change every frame.
- Simple Positioning: Developers can position text precisely with x, y coordinates, similar to retro console-style output, while maintaining pixel-perfect clarity.
Graphics Mode
Unlike text visuals and graphics tend to change every frame in fast-paced games, therefore Graphics Mode is optimized for high-speed sprite rendering and pixel-perfect blitting. Designed to handle the quick drawing of retro-style pixel art, the system efficiently manages repetitive objects like tiles, bullets, and enemies using Instancing, allowing objects already on screen to be quickly redrawn.
- Sprite Blitting: Graphics Mode enables rapid sprite blitting with precise control over position and rendering behavior. Sprites are drawn using their image data and screen coordinates, with customizable options for effects.
- Parameterized Drawing: By leveraging scanline-based rendering, the engine supports a wide range of visual effects like color palette manipulation, distortion, and even wave-like behaviors, giving developers the flexibility to recreate classic visual tricks from the 8- and 16-bit era.
- Accurate Pseudo-3D: Technically accurate recreations of pseudo-3D scenes characteristic to the 16-bit era can be created with the blitting system's rotoscaler.
- Planar and Interleaved Graphics: Both planar and interleaved graphics are supported, and the engine can also switch modes on the fly. This allows the engine to better take advantage of limited graphics modes available on constrained or embedded platforms, or optimize certain raster operations in systems which support both formats.
Scanline Effects and Distortions
Modular Engine excels at recreating classic scanline effects seen in iconic retro games like Earthbound, Castlevania IV, and others from the 16-bit era. These effects were critical for adding visual depth and movement to environments, but can be challenging to replicate pixel-perfectly. With parameterized rendering, Modular Engine allows you to recreate these effects effortlessly.
For instance, the wavy backgrounds in Earthbound's battle scenes or the swirling tunnel in Castlevania IV are made possible with vertical and horizontal oscillation parameters. Many top-down games use scanline effects to create transparent water with wavy refraction. Modular Engine offers control over these effects using a variety of wave types (square, sine, triangle, sawtooth) along with customizable amplitude, frequency, and phase. Developers can tweak these parameters to achieve a pixel-perfect reproduction of classic effects or create entirely new ones with ease.

Any effects can be combined to create unique animations!
Horizontal Oscillation
Vertical Oscillation
Horizontal Amplitude Modulation
Infinite Scrolling in all directions
List of all Horizontal Effects
List of all Vertical Effects
Region Blitting Modes
Bringing Retro Games to Life
Modular Engine is a powerful, highly optimized platform for building pixel-art-style games. Its efficient modular architecture, sophisticated two-stage rendering system, and focus on high performance make it a must-have for game developers who want to create pixel-perfect retro experiences. With support for advanced scanline effects, easy sprite handling, and performance optimizations, Modular Engine gives you the tools you need to craft engaging, high-performance games that harken back to the dawn of home console gaming. Check out some tech demos below of the engine in action.