A free open-source 2D game engine, inspired by the classics.
What is N’gine?
N’gine is an open-source engine for 2D game development, especially for pixel art games, inspired by the techniques used in classic consoles (tile backgrounds, sprite-sheets, etc.).
What programming language uses?
The entire engine is programmed in C++, using support libraries to speed up the creation process, such as SDL2, SFML, and LodePng, among others.
Who is it for?
For anyone who wants to develop their video game and has knowledge of object-oriented programming.
Which systems does it support?
The engine currently runs on Windows, Linux, and Raspberry PI OS, allowing you to export projects for Windows, Linux, Raspberry PI, Anbernic RG35XX, and Evercade*.
* Evercade export requires an official developer license from Blaze Entertainment Ltd.
Under what license is it distributed?
The engine is distributed under the MIT license. This means you can use, modify, create, and distribute content using the engine, as long as you provide proper credit.
How did this project come about?
The project was born out of the need for a custom 2D tool for developing personal projects and, to a greater extent, as a foundation for first-year student projects at the center where I teach as a video game design and programming instructor.
What is the current development status of the engine?
With over 10 years of development, it is now in a stable development phase with no known serious bugs. Current work focuses on performance improvements and adding new features.
What are the main features of the engine?
Input Methods:
- Keyboard
- Mouse
- X-input standard Gamepads
Graphics:
- Textures up to 8192×8192 pixels
- Large backgrounds using tiles
- Sprites with or without animation
- 2D virtual camera
- Text layers
- Canvas for drawing primitives
- Different blending modes and mask usage
- Up to 8 simultaneous and adjustable viewports
- Ability to move, rotate, and scale all graphic elements
Sound:
- Up to 4 simultaneous music/dialogue streams (OGG format)
- Up to 64 simultaneous sound effects (WAV format recommended)
- 6-channel mixer
- Ability to change volume, pan (for sound effects), pitch, and loop
Video:
- Support for OGV (Theora) video file playback
- Up to 4 simultaneous video streams with audio/video synchronization
- Full playback control: Start, pause, stop, and loop mode
- Complete video render transformation: Position, rotation, and scaling
- Visual effects applicable to the stream: Transparency (Alpha), RGB tinting, and blend modes
Collisions:
- Box collision detection between 2 sprites, with the ability to add multiple colliders to each sprite
- Pixel-level collision detection between 2 sprites
- Raycast from a coordinate point to a sprite
- Collision maps with up to 255 colors
File System:
- Functions to load resources from the file system
- Ability to create resource package files with encryption support
- Functions for loading and saving files in binary or text format
- Ability to manage up to 127 resource repositories, specifying the list of files to load from a plain text file.
GPIO Ports (Raspberry Pi):
- Direct digital I/O port control on Raspberry Pi 4 & 5
- Digital output & input modes with configurable internal Pull-Up and Pull-Down resistors
- Hardware debounce filtering configurable in microseconds for arcade buttons and switches
- Implemented on top of the Linux Kernel
libgpiodv2 API
What does the engine distribution package contain?
The package contains the engine's source code, as well as its compiled libraries for Windows. It also includes scripts for compiling and installing the engine in Linux environments, and scripts for creating several Docker images to facilitate compilation and export across all described Linux-based systems. Additionally, installation and usage documentation, commented examples, and a bundle of pre-compiled demos showcasing the engine's main features are provided.
Where can I get the engine?
The engine is currently hosted on Github. You can download the latest version from the menu of this page.
How can I contact the author?
You can send an email to the contact address: contact@nightfoxandco.com.