Skip to content

Demo Game on 2D C++17 engine using PhysicsFS and SFML

License

Notifications You must be signed in to change notification settings

karnkaul/LEDemo

Repository files navigation

Little Engine Demo

Written in C++17, utilising SFML and PhysicsFS, Little Engine is a 2D game engine hobby project with little defined ambition or scope; and this repository demonstrates an example game using it.

Build Status Licence Twitter

Note: Visit the LittleEngine submodule here!

Installation

LEDemo pre-releases containing a demo game with Win64, Linux-x64, Linux-ARMv8 binaries can be found here.

Requirements

  1. x64 CPU with at least two threads
  2. Git submodules (CMake scripts will update them automatically, and will fail to configure otherwise)
  3. (Optional) Python 3.5+ (for installer.py)
  4. Operating System:
    1. Windows 7/8/10: Microsoft VC++ Runtime (x64)
    2. Linux: OpenAL libraries (libopenal-dev)
    3. MacOSX: Python 3 (app bundles are unsigned; installer.py eases the UX)

Installing LEDemo

  1. Obtain the game zip (present inside a GitHub Release zip)
  2. Unzip it to the installation directory and run installer.py via Python 3 (or unzip ".game" manually and copy the contents of "[Your OS]" into the installation directory)

Note: OSX builds are in alpha and may not be stable.

Development

Visit the Little Engine wiki for more detailed and per-platform instructions. LEDemo or any other game project just needs to add LittleEngine as a library dependency, setup game initialisation through the API (and global variables) in GameLoop, and return GameLoop::Run() to the OS.

Requirements

  1. x64 (ARMv8 is supported but not packaged) multi-threaded target
  2. CMake for the target, preferably using Ninja and LLVM
  3. SFML 2.5.1 source / internet access (CMake will download it)
  4. (Linux) libstdc++-7; all SFML dependencies (X11, Xrandr, OpenGL, UDev, Freetype, Vorbis, Flac, etc)
  5. (Win 10) Windows SDK for ninja/MSBuild / Clang/VC++ or MinGW for MinGW / g++
  6. (MacOSX) Xcode
  7. (Optional) Bash (native/MinGW/WSL), Python 3 (all tools scripts are in Bash/Python)

Setting up the project(s)

Quick Start:

  1. Build LEDemo
    1. CMake: generate a project using CMakeLists.txt
    2. Build
  2. Run LEDemo
    1. Set working directory to Runtime
    2. Debug/run the built/installed executable

Short video demonstrating full project setup from scratch on Linux (v0.5.0.0).

Troubleshooting

"openal32.dll not found"

"Could not determine Runtime path" Assert

Ensure working directory is "Runtime" for the App target.

"Default font is null" Assert

Ensure Resources submodule is up-to-date, and GameAssets/Fonts/Default.ttf is present.

Contact

Licence

LEDemo uses the GNU GPLv3 licence.

Note: Code of Conduct can be found here.