Headcannon Game Engine 3DS

From GameBrew

Headcannon Game Engine
AuthorSimon Thomley (Stealth)
Last Updated2014/12/08
TypeGame engine

HCGE, also known as Headcannon Game Engine, is a multiplatform game engine that can be used to create retro-style 2D games. Supported platforms include Windows, Linux, MacOSX, PSP (CFW), Wii (Homebrew Channel), GP2XWiz, GCWZero, and 3DS (Homebrew Launcher).

The PC Windows, Linux, and MacOSX versions serve not only as the engine with which to run the games, but also the SDK with which they can be created and modified. The built-in editors can be entered during gameplay and used to test live modifications or just modify and save for permanent changes, and they, as well as a few other useful tools, can be accessed from the main menu.

The 3DS version is an experimental build which allows you to play the existing games on 3DS, or get a jump-start on developing a homebrew 3DS game, regardless of whether you own one or can access The Homebrew Launcher. If you make a game with HCGE, you can choose either build to distribute it with as stand-alone (3DSX).

HCGE is developed by Simon Thomley, who was later brought on to Sega to work on multiple Sonic the Hedgehog projects, including Sonic 1 and Sonic 2 on Android/iOS, as well as Sonic Mania.


Download contains 2 versions of HCGE and game examples:

  • HCGE3ds.rar - HCGE for 3DS with Sound.
  • HCGE3ds-NoSound.rar - HCGE for 3DS without Sound.
  • template.rar - HCGE General Game Template (game example).
  • sonic.rar - Sonic the Hedgehog Example Game (game example).
  • mmtt.rar - Mega Man: Triple Threat (game example).
  • mettrix.rar - Sonic the Hedgehog: Project Mettrix (game example).
  • Franklin-LD28-3DS - Fantastic Franklin, a puzzle-platformer built with HCGE (standalone game example).

Most current games are not distributed stand-alone. To install a game, unrar their contents into the same folder in which you placed HCGE.3dsx. Both the game folder and the contents of the gdf folder are necessary, so if prompted to overwrite the gdf folder, choose to allow. And the gdf file for the game you're installing will be placed into it along with any others.

If copying games to your 3DS using FTPony, please double-check that all sub-folders were copied correctly; it seems to omit some of them sometimes on mass-copies. If HCGE exits immediately, this might be why. Opening Error.txt in the HCGE folder can help you figure out what's missing.

User guide

An overview of development features with links into relevant portions of the documentation can be found on the official page. Also of interest is the Getting Started document, which serves as an entrypoint to the documentation.

Because the documentation serves as a complete reference manual rather than any sort of tutorial, actual tutorials for individual aspects of usage will be prepared as time permits. Aside from open example projects, there will also be more step-by-step explanations, such as the introduction videos below.

How to use

In-game, tap the touch-screen to return to the main menu. In the main menu, tap the touch-screen to exit HCGE.

HCGE General Game Template

  • This is one of the two open game examples for HCGE (HCGE documentation).
  • It is a very basic General Game Template, contains only enough script and data to start up as a game and display something on-screen.
  • This template can be used as a basis upon which to build a brand new game basically from scratch.

Sonic Example Game

  • The second open game example is a well-featured fanmade Sonic the Hedgehog game (Project page).
  • All scripts and data are provided unprotected and can be modified or used to build either a new Sonic the Hedgehog fan game or something entirely different.
  • Various portions of this game serve as examples of many of the features of HCGE, and the game itself is pretty much "complete".
  • It contains a title screen, a character and level select menu, completable levels with items, enemies, and even bosses.
  • In addition there are a Bonus Stage and Special Stages with randomly-generated layouts.
  • In fact, there are enough opportunities provided in the Gemstone Garden level to enter the Special Stage for a skilled player to obtain 7 Chaos Emeralds, and thus, Super Sonic.

Sonic the Hedgehog: Project Mettrix

  • This is a work in progress HCGE game project (Project page).
  • Sonic the Hedgehog example described above is based on scripts that were originally created for this game.

Mega Man: Triple Threat

  • Also in-progress is the game Mega Man: Triple Threat featuring playable Mega Man, Proto Man, and Bass (Project page).
  • Made in the SNES Mega Man 7 style with new levels and Robot Masters.
  • An open Mega Man example will eventually be created using some of the basic scripts and data that were used to make this game.

Fantastic Franklin

  • A brand new IP Fantastic Franklin, where the inspiration came from the Ludum Dare event in December 2013 (Project page).
  • This game is a puzzle-platformer in which you play as the titular character Franklin who has to dig, climb, push, and carry his way through each level to guide a giant egg safely to the exit.
  • As the game was developed in 72 hours, it is somewhat buggy and content is currently minimal, but it does contain one fully playable and completable level.
  • This build also serves as an example of the fact that a completed and standalone HCGE game can be distributed and made to run without first having to enter the main menu interface.


hcge3.png hcge5.png

hcge4.png hcge6.png


HCGE (formerly E02) Game Creation - Introduction (Stealth)

HCGE (formerly E02) New Interface and Game Template (Stealth)

New HCGE Sonic the Hedgehog Example Game (Stealth)

HCGE (formerly E02) Is Not Sonic - More Games (Stealth)

Megaman: Triple Threat - Zaiaku Man Stage Megaman Gameplay (Stealth)

[3DS] HCGE - HeadCannon for 3DS (DarkFlare)


Requires a 3DS/New3DS capable of running Homebrew Launcher.

Known issues

  • Sound sort of crackles. There is no clear information regarding creating a streaming buffer, and since it mixes sound in software, this is probably the result of the method that is being used - attempt to fill enough audio for 1/60th of a second and play on each frame. The CSND_LOOP_ENABLE setting doesn't seem to work, not sure if there's a way to determine the playback position of a channel.
  • Some areas of some games are a bit slow. Since the 3DS is slower than most platforms that HCGE runs on, this is bound to happen when a level or other parts of gameplay become more complex, however, one major issue is that the sound is currently being rendered in the main thread along with the rest of the game. The assumsion is that, barring other optimizations, running the sound in a separate thread should have comparable performance to the faster "Without Sound" build.
  • Exiting seems to frequently cause the Homebrew Launcher to act as if there's no SD card when you return to it.
  • The downloads and updates system from other net-supporting platforms is missing (don't have enough information to successfully use sockets on 3DS).

External links