Skip to content

karnkaul/LittleEngine

Repository files navigation

Little Engine

Written in C++17, utilising SFML and PhysicsFS, Little Engine is a 2D game engine hobby project with little defined ambition or scope; in other words, let's see where we can take this!

Build Status Licence Twitter

Note: Since v0.5.0.0, custom Worlds, Objects, and application code has been moved out of LittleEngine into a separate project and repository, LEDemo. LittleEngine is now one static library archive, with no Worlds or Game Initialisation code, thus enabling multiple game projects to use it as a submodule that updates independently.

Features

  • CMake project - develop/build (almost) anywhere
  • Full keyboard, mouse and single joystick support
  • Multiple 2D coordinate systems (world space, UI space, viewport) using 3x3 matrices
  • Quad, Quads, Rectangle, Circle, and Text primitives
  • Asynchronous rendering on a dedicated thread; light main/game thread
  • Dynamic game Entities/Components with Circle and AABB collision detection
  • Cache-friendly Particle Systems with distributed updation
  • Engine Repository with async loading and asset manifests
  • In-game Console, Tweakable variables, Profiler, and other debugging tools
  • Stack and Context-based UI Framework
  • Various Python3 tools for asset cooking, app packaging, bundle archiving, etc

For a game demo project using LittleEngine, visit LEDemo! Here is a short video demonstrating full project setup from scratch on Linux (v0.5.0.0).

Development

Visit the Little Engine wiki for more detailed and per-platform instructions.

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 LittleEngine
    1. CMake: generate a project using CMakeLists.txt; set CMAKE_BUILD_TYPE to desired build configuration
    2. Build
  2. Build a game using LittleEngine:
    1. Add LittleEngine as a git submodule to the main repository
    2. In the top-level CMakeLists.txt, set up the following:
      1. Add the subdirectory (add_subdirectory(LittleEngine))
      2. Add LittleEngine as a build dependency and link library for the executable target
      3. Add custom Worlds, Entitys, Components, etc., and set up game initialisation through the GameLoop API
      4. Use add_le_executable(EXE_NAME SOURCES) (defined in Common.cmake) to set up include paths, compile flags, etc
    3. Debug/run the built/installed executable

Contact

Licence

LittleEngine uses the GNU GPLv3 licence.

Note: Code of Conduct can be found here.