Alce Game Engine is a game engine based on SFML and Box2D, designed to simplify the development of 2D games. Its primary goal is to provide a comprehensive suite of tools and components that streamline the creation process. From physics simulations and animations to user interface management and local storage.
The new TileMap component is now available. It lets you render tile-based maps exported from PyxelEdit directly on a GameObject, handling tilesets, layers, flips, and rotations automatically, while keeping the map centered on the object’s transform and updating its bounding corners for efficient scene culling. Perfect for creating levels, backgrounds, or any grid-based environment.
The new TextRenderer component is now available. It allows you to render styled text directly in the game world, with support for formatting, colors, backgrounds, and borders. Useful for names, dialogue, or any text that should exist as part of the scene rather than the UI.
We're excited to introduce a new integration of Candle into AlceEngine, bringing advanced 2D lighting capabilities to your SFML projects. This implementation includes support for radial and directional lights, fog-based lighting areas, and custom light meshes with support for rectangular, circular, and polygonal shapes.
Designed to be modular and easy to use within the AlceEngine's component system, this integration enables dynamic lighting effects, real-time intensity control, and debug visualizations to streamline your workflow.
⚠️ Documentation effort is still in progress.
AlceEngine provides structured and comprehensive documentation for every component, method, and feature, making it easy for developers to understand, integrate, and utilize the engine’s functionality efficiently. Each part of the engine is clearly explained, ensuring that users can quickly find the information they need without confusion.
Alce Engine is completely open to new contributors. We welcome fresh ideas, feature proposals, bug reports, and code improvements from anyone interested. Whether you want to fix a small issue, suggest a new component, or take on a bigger task, your input and participation are highly valued and encouraged.
-
Animation2d: handles 2D sprite sheet animations, allowing you to define, play, and control animations with different playback modes, frame timing, and origins. It also updates cardinal positions for spatial references.
-
Camera: defines a 2D camera that controls the visible area of the scene, supporting zoom, viewport configuration, and smooth following of its associated game object's position and rotation.
-
ParticleSystem: manages a 2D particle system that emits physics-based particles from a defined area, applying customizable behaviors, collisions, and lifetimes to simulate effects like explosions, smoke, or sparks.
-
Raycast2d: performs 2D raycasting to detect collisions along a direction and length, triggering impact events when objects are hit or no longer hit.
-
Rigidbody2d: manages the 2D physics simulation of an object using Box2D, allowing the creation of rigid bodies with different shapes, applying forces and impulses, configuring physical properties (such as friction, density, or restitution), and synchronizing their position and rotation with the engine's transform system.
-
SpriteRenderer: renders a 2D sprite using a texture, allowing you to load, assign, and manage multiple textures, while also updating its position, scale, rotation, and cardinal points based on the associated game object's transform.
-
Light2D: defines a 2D light source (either radial or directional) that can be positioned, colored, and configured with parameters like range, intensity, beam width, and angle, to simulate dynamic lighting effects in a 2D environment.
-
LightMesh2D: represents a 2D shape used as a light-blocking or light-interacting mesh, allowing you to define custom geometry (rectangle, circle, or polygon) that updates with the object's transform and can be visualized in debug mode.
-
LightingArea2D: defines and manages a 2D lighting area that can render fog-like effects, adjusting its size, position offset, color, and opacity dynamically within a game or graphical application.
-
TileMap: renders a PyxelEdit-exported JSON tilemap on a GameObject, slicing the tileset, handling flips and rotations, centering on the transform, applying scale and offset, and updating its bounding corners for efficient scene culling.
-
TextRenderer: renders styled text directly in the game world, supporting formatting, colors, and optional backgrounds with borders.
-
Core: manages window creation, scene management, asset loading (textures, sounds, fonts), system info retrieval, input handling, and the main game loop for a graphical application using SFML.
-
Audio: manages audio playback by organizing sounds into channels, allowing loading, controlling (play, pause, stop), and adjusting sound properties (volume, pitch, looping) within each channel.
-
Storage: manages persistent JSON-based data storage by dynamically mapping named entries to multiple segmented files, ensuring size limits are respected and providing methods to set, get, delete, and clear stored data.
-
Chrono: implements a Time class that stores time internally in milliseconds and provides methods and operators to add, subtract, convert, compare, and reset time values with validation against negative inputs.
-
Debug: provides a DEBUG utility for formatted console logging with color-coded message types (info, warning, ARL messages/errors), optional asynchronous file persistence, and rate-limiting based on elapsed time.
-
Input: handles input detection and state tracking for keyboard, mouse, and joystick devices, including button presses, button downs (edge detection), axis values, mouse position, and joystick connectivity, with an enable/disable control.
-
Math: provides mathematical utilities, random number generation, 2D vector operations, and shape classes (rectangle, polygon, circle) with geometry-related functions and conversions.
-
Color: Wrapper class for SFML's sf::Color providing multiple constructors and setters for RGB, RGBA, hex and string formats, color blending, conversions, and predefined common colors with error handling and string parsing utilities in C++.
-
Collections: provides a collection of generic, exception-safe container classes—including a customizable List with advanced manipulation and filtering capabilities, a Pair utility, and a Dictionary implemented on top of the List—designed to facilitate flexible and efficient data storage and retrieval.
-
String: versatile String class wrapping SFML’s string type, offering extensive manipulation methods such as substring operations, case conversion, comment removal, parsing to various data types, trimming, splitting, regex matching, and comprehensive operator overloads for flexible and efficient string handling in C++.
-
Json: JSON wrapper class for C++ using RapidJSON, providing methods to parse from strings or files, get/set JSON values (strings, nested JSON, lists), check keys, delete or clear members, validate JSON, and serialize back to formatted strings or save as files — with exception handling for type errors and missing keys.
-
FileSystem: File and Folder management wrapper using C++17 std::filesystem, providing methods to create, delete, read, write, append, and clear files, check existence of files and folders, and handle paths as absolute strings with exception handling for invalid operations.
-
Button: represents an interactive UI element that can display text, respond to mouse events, and trigger custom callbacks on click, mouse enter, or mouse exit.
-
Image: represents a UI element that can display and manage multiple textures, allowing dynamic switching and rendering of images with adjustable origin offsets.
-
Text: represents a UI element that displays customizable text, allowing you to set color, font, size, style, borders, and background, with support for initialization from various data types.
-
TextInput: represents a UI element that allows users to enter and edit text, featuring customizable appearance, placeholder text, cursor behavior, font size, and an onSubmit callback for handling input events.
-
Alce CLI: prompt program designed to compile, generate and run Alce projects. Perfect if you dont want to install a complete C++ environment like Visual Studio or Code::Blocks.
-
ARL: the in-game development prompt language. Allows the developer to make a lot of repetitive debug stuff without the need of being compiling constantly.
Learn how to set up Alce Engine with ease through this tutorial.
Minimun requirements:
- GCC 32bit v13.1.0^ (g++, mingw32-make, gdb)
- Windows 10, 11
Recommended:
- Python v3.1.0^
PyxelEdit
For any professional inquiries, please contact me at gabrielbeguren@outlook.com. If you wish to contribute ideas or report any bugs, feel free to use the tools that GitHub provides.
SFML under the ZLIB license
Box2d under the MIT license
Candle under the MIT license
RichText under public domain
rapidjson under the MIT license