Hatch is a multiplatform game engine that is primarily focused on powering two-dimensional video games, such as those found on the Sega Mega Drive, the PlayStation, or the Game Boy Advance. For this reason, it natively supports features found in video game consoles similar to the ones previously mentioned, such as tilesets, parallax effects, and palettes. Rudimentary support for 3D graphics is provided, powered by OpenGL rendering.
While the engine is programmed in C++, a typical Hatch game is written using a custom scripting language created specifically for it: the Hatch Scripting Language, or HSL. It is object-oriented, with a syntax inspired by C++ and JavaScript. For a developer that already knows C++ or similar, picking up HSL will be faster than learning from scratch.
Originally, Hatch was designed as an engine for 2D retro-style projects, especially platformers, but it's constantly evolving. It offers a code-based workflow, and there is no dedicated official game editor or IDE, similar to frameworks like LÖVE. That said, Hatch requires very little to set up a project, and this kind of approach allows developers to adapt their existing game development environment (like code editors, asset creation tools, etc.)
As any game engine or framework does, Hatch provides to the developer essential core components necessary to build a game:
This is a quick rundown of the main concepts you will often be using when developing a Hatch game.
Everything in Hatch happens inside of a scene. A scene may be loaded from a scene file, which contains entities. The typical game made in Hatch has multiple scene files; in a very simple game, you might contain all of its gameplay in a single scene file, but for larger games, scenes may be used to contain levels, cutscenes or interfaces. It will depend on the type of game you are trying to build.
A scene by itself does not do anything. An entity however can be your player, an enemy, a particle effect, the HUD, an interface, you name it. The scene is not concerned about what an entity is exactly. It only runs its code.
Most games do need to load some kind of asset, be it a sprite or a sound effect. In Hatch, any kind of asset managed by the engine is called a resource. A resource has two kinds of scope: a game scope, and a scene scope. Resources loaded with a game scope stay loaded for the entire execution of the game, and those loaded with a scene scope are unloaded whenever the current scene changes.
For an entity to do something useful, they require to be programmed. Scripts are written in HSL, Hatch's scripting language. Any entity in Hatch is spawned from a class, and spawning an entity is merely creating an instance of a class. There is no need to "import" a specific class or file when spawning an entity; Hatch knows what scripts it should load, and this happens transparently. Not all code happens inside an entity, however, and you are free to organize your scripts as you see fit.