/mana-engine

Simple hobby game engine for Windows 10 and up

Primary LanguageC++

Mana Engine

Simple hobby game engine for Windows 10 and up

This is a hobby project I'm slowly working on and there's still a lot of work needed for this engine to be usable, but if someone can learn from it, that's great. Audio and Input engines are "pretty much" done, but things will be refactored or added as I go. There are some big things still missing, such as graphics (next on my TODO list), scripting, and more. Currently supports Windows 10+ x64 only, but I've been coding in preparation to use it cross-platform.

Basic architecture:

  • ManaEngine folder is a static lib that contains the the engine code.
  • ManaGame folder contains the sample game code. Depends on ManaEngine.

The main thread handles the Windows message loop and sends messages to the game loop thread.
There's a separate thread to handle streaming audio.

How to build:

  • Install Visual Studio 2022+ with Desktop developement with C++ and Game development with C++ workloads.
  • Open ManaGame/src/msvc/ManaGame/ManaGame.sln and build the Debug x64 configuration in Visual Studio.
  • Install python3 so you can run a one-time prepare of the game folder:
    python ManaGame/scripts/prepare_game_win.py
  • To be able to run the game from within Visual Studio, open ManaGame project properties. Under Debugging, set the Working Directory to: $(ProjectDir)..\..\..\Game\

Sample game controls

The sample game currently has controls for testing a looping music file and playing a static sound FX file.
Run the game at ManaGame/game/ManaGame.exe or from within Visual Studio.

Up arrow - start/resume music
Down arrow - stop music
Left arrow - pause music
Right arrow - resume music
j - play jump sound FX (can play three buffers simultaneously)

Additional engine info: