The Frank Engine

The Frank Engine is an open sourced game engine written in C++. The mission is to have a fun and fast way to create large open world games with state of the art 2D graphics. Everything necessary to create a fully featured game is included: physics (Box2D), rendering (DirectX), level editor, dynamic lighting, particle system, sound, music (Ogg Vorbis), gamepad input, GUI, and debug console. The code is well documented and includes a simple starter project to build on.


To download a snapshot of the latest release or access the SVN repository you can visit the Frank Engine project page on GitHub.

  • You can also download the Frank Engine Demo, which is an example project that shows some of the basic features.  This has all the engine features like the integrated level editor and debug console for you to play around with.
  • To compile games for the The Frank Engine you will need to install Visual Studio Community 2017.
  • Make sure to install components “Windows Universal CRT SDK” and “Windows 8.1 SDK” which may not be selected by default.
  • Also you will need the DirectX SDK.


  • Open source with MIT license on SourceForce
  • Focus on simplicity, flexibility, and fast iteration
  • C++ with object oriented architecture
  • Supports huge streamable worlds
  • Deferred lighting, dynamic soft shadows, emissive, specular, and normal maps
  • Integrated physics using Box2d
  • Rendering for 2D sprites, deformable terrain and particle system
  • Integrated level editor for faster iteration
  • Sub frame interpolation using fixed time step
  • Detects if assets changes and refreshes automatically
  • Stereo sound effects using Direct Sound
  • Music using Ogg Vorbis
  • Input supports keyboard, mouse, gamepad, and Xbox 360 controllers
  • Integrated with The DirectX Utility Library (GUI, fonts, sound, etc)
  • In game debug console and debug primitive rendering system
  • Dev environment is Microsoft Visual C++ 2010 Express
  • Graphics SDK is Microsoft DirectX 9
  • Uses precompiled headers for faster compile times
  • Native wide character support
  • Integrated tile sheets support
  • Font rendering using BMFont
  • User friendly editor features including cut, copy, paste, undo, and redo

Basic Engine Commands

These commands work by default in all games made using Frank Engine, so you can use them with pretty much ever game I’ve made. In some games you will need to type “devmode 1” in the debug console to enable all the commands.

  • Tilde – Brings up the debug console where you can enter debug commands.  Try typing “help” for more info.  There are a slew of commands, everything from vsync to tweaks for specific gameplay variables.
  • F1 – Shows debug information like frame rate and engine stats.
  • F2 – Shows an Box2D debug physics overlay.
  • F3 – Reloads textures and sounds from disk.
  • F4 – Toggles edit mode, allowing a designer to create the terrain and place objects.
  • F5 – Takes a screenshot and saves it to the snapshots folder.
  • F6 – Opens up the profiler to help track where frame time is being spent.

Editor Help

Pressing F4 will toggle between the editor and the game. Whenever you switch back to the game, the player will automatically be moved to the mouse cursor to make iteration faster.

The top right shows which layer you are editing/selecting, click on a layer number to change it, or use the number keys. On a tile layer you can draw and change tiles for visual and collision. On an object layer you can move objects and change their attributes. Select the tile or object type to draw in the pick box in the lower right. Cut, copy, paste and undo/redo are all very functional.

Draw tiles and select objects using the left mouse button. Drag right mouse button to select multiple tiles/objects. By default this will select all layers but you can hold alt to select only the active layer.

Layer Select
1 – Background layer
2 – Foreground layer
3 – Objects layer

Middle Mouse (or Left Mouse + Tab) – Move camera
Mouse Wheel (or Right Mouse + Tab) – Zoom camera

Mouse Right – Rectangle select
+ Alt – Single layer select
+ Shift – add to selection (only for objects)
+ Ctrl – remove from selection (only for objects)

Tile Edit
Mouse Left – Draw tile data & select/deselect
+ Shift – Draw line
+ Ctrl – Eyedropper
+ Mouse Right – Block erase
Alt – Block draw
Z – Flood fill
X – Flood erase

Object Edit
Mouse Left – Object select
+ Ctrl – Scale object (only can be done when 1 object is selected)
+ Shift – Rotate object (only can be done when 1 object is selected)
Z – Add object
X – Remove object

WASD – Move in quick pick box
Ctrl+Z, Y – Undo, Redo
Ctrl+X, C, V – Cut, Copy Paste
Ctrl+S, L – Save, Load
Shift+Ctrl+C,V – Copy, Paste the entire patch under the mouse
G – Toggle grid
B – Toggle block edit

19 Responses to The Frank Engine

  1. Pingback: 2D Light Mapping | Killed By A Pixel

  2. McFunkypants says:

    Wonderful work! Thanks so much for being awesome, using the MIT license, and creating something truly impressive. Good luck at the upcoming Ludum Dare!

    – McFunkypants

  3. Jeremy Stark says:

    This looks amazing! Love the lighting work, can’t wait to try it out! Good luck in Ludum Dare!

  4. Pingback: Dark World Post Mortem | Killed By A Pixel

  5. Pingback: (R,G,B) – Postmortem | Killed By A Pixel

  6. Gerald Howes says:

    i just tried compiling this one vs2013 but all the lighting is messed up
    how can i fix this please

    • Gerald Howes says:

      same with 2010
      using win7

    • Frank says:

      I am using Visual Studio Express 2010 with Win7. First try updating both your graphics driver and DirectX. Then verify that the pre-compiled version of my engine demo looks correct. If that doesn’t work you will need to be more specific about the problem you see.

      • Gerald Howes says:

        precompiled game works. dxjune10 is installed correctly. driver updated to latest. here is a screenshot of my problem.

        • Frank says:

          That is weird. Did you download the project directly or sync to the repository? The only thing I can think of is if you aren’t up to date and it is a bug that is now fixed.

        • Frank says:

          I’m not sure what could cause that. Looks like the light buffers aren’t being cleared properly. I’ve tried building on a few other pcs and it seemed to work fine. Can you send me the exe?

          Edit: This bug has been fixed, many thanks to Gerald.

  7. John Doe says:

    Great work on this, looks excellent.
    Especially great since it’s MIT.
    Unfortunately its uses are probably limited due to poor performance (demo has resource usage on par with modern 3D FPS engines), but an optimized version could be a winner.

    • Frank says:

      Thanks! From my testing it runs much better then a typical FPS game with a much smaller memory footprint then even other 2D engines. It is already fairly well optimized and there is not much more low hanging fruit. It is very simple to reduce the graphics settings for slower PCs, the bulk of frame time is spent rendering the deferred lighting. My PC gets about 150 fps on the starting area in the demo and uses about 50 meg of ram. When I turn off lighting it jumps to around 2000 fps.

  8. I downloaded the Frank Engine source code and tried to build with MSVS 2015 and ran into many problems. I’m guessing that no one has tried using this new a version of Visual Studio. I had to change various lines of code to add casts to float and bool. I had to change hash_map to unordered_map. I had to fix the following line, which seems wrong:
    swscanf_s(text.c_str(), L”%d %d %d”, oldTileID, newTileID, count);
    should be:
    swscanf_s(text.c_str(), L”%d %d %d”, &oldTileID, &newTileID, &count);
    In the end I wasn’t able to fix all of the various type conversion warnings and incorrect scanf format strings, so I had to turn off “treat warnings as errors” and try to ignore a thousand lines of errors printed to the console. I was able to hack things up enough to get it working and everything seems to be okay. Let me know if you want a complete list of the warnings and everything I had to change.

    • Frank says:

      Thank you for the notes. Currently I am only supporting Visual Studio 2010 with DirectX 9. It compiles without warnings in that environment. I would like to update at some point but haven’t gotten around to it yet!

  9. Andy says:

    seems awesome. nice effort. all the best to your game engine.

  10. Pingback: One Year Going Indie | Killed By A Pixel

Leave A Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.