If you don't already know what this is, this is probably not for you!
Slate2D is my toy 2D engine. It is small, but not minimal. It has an API modelled after fantasy consoles, but without any designed restrictions in place. Slate2D is programmer-centric; you'll want to be familiar with C/C++, and have the ability to build and debug the engine yourself. Slate2D gives you the blank slate (get it??) to let you code.
Slate2D will feel somewhat familiar for anyone who has ever worked with engines like Source, Quake, or Doom. Convars, commands, and binds are all present. The game is loaded into the engine by way of shared library, and rendering is abstracted out into high-level render commands, which are handled by the engine. This means your game DLL can be relatively pure, and won't rely on linking to graphics or system libraries.
The default game DLL integrates the Wren scripting language. Although the intent originally was to write game code in C, I found the Wren language and really enjoyed writing code in it. It's easy enough to swap out, though. Other scripting languages like Duktape or Lua could be used, or any language that can build a shared library and call C functions. If you've found some neat programming thing, and wish you had an easy way to draw some graphics with it, Slate2D can get you off the ground.
Slate2D uses Premake5 to generate project files. While the engine is intended to be cross-platform,
right now only Windows and WASM/Emscripten builds are proven. Mac builds are bitrotted, and Linux should run. Run a premake command such as
premake5 vs2017 to generate the project, or
premake5 --help to see extra options specific to the project. An attempt has been made
to make it build clean out of the box. This has been confirmed to work on two different computers!
- Asset loader to let you work with asset handles instead of files
- PNG images
- Spritesheets: Minimize draw calls by loading a sprite atlas
- Fonts: TTF and sprite-based
- Audio: OGG and tracker formats
- Tilemaps: Load and draw TMX maps
- Shaders: Customize drawing of shapes and sprites
- Canvas: Draw onto an off-screen texture
- Text to Speech: The most important
- Built in object inspector for Wren objects.
- Watch for changed files, and run a command on modification.
- Optional automatic sprite atlas packer.
- No documentation.
- Inconsistent usage of C and C++ patterns, and code style.
- It mostly works!
- SDL - windowing, OpenGL context, input, DLL support
- Wren - embedded scripting language
- PhysicsFS - virtual filesystem, zip loading
- dear imgui - debugging tools
- SoLoud - audio engine
- TMX C Loader - loading Tiled maps
- GLEW - GL extension support
- rlgl - OpenGL wrapper
- crunch - sprite packing
Despite the self-deprecating feature list, Slate2D has successfully been used in two game jam games!
Hot Air - a Balloon Fight style game.
Clive Sturridge's Battlement Defence - a mix of tower defense and Rampart.