Skip to content

game engine architecture | c++ cross-platform 2d game engine with lua

Notifications You must be signed in to change notification settings

mdvsh/pulsar

Repository files navigation

pulsar

my eecs 498 game engine

[wip] a fast, cross-platform distributable 2D game engine. with c++20, perf engineering, box2d, sdl, lua middleware and modular ECS.


Quick Start

Having all requirements set, here you can find how to quickly build and run the application.

Table of contents

Build

Usually available build modes are Debug, Release, and RelWithDebInfo.

To run a debug build:

cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -B build/debug
cmake --build build/debug

To run a release build:

cmake -GNinja -DCMAKE_BUILD_TYPE=Release -B build/release
cmake --build build/release

On macOS Xcode should be used as generator via -GXcode. For example creating a release build with XCode.

# Using Xcode
cmake -GXcode -DCMAKE_BUILD_TYPE=Release -B build/xcode
cmake --build build/xcode

Execute

When not running through an IDE like CLion, the built application can be run by directly executing the generated binary.

macOS

To run a debug build:

./build/debug/src/app/App.app/Contents/MacOS/App

To run a release build:

./build/release/src/app/App.app/Contents/MacOS/App

To run a debug build created with Xcode:

./build/xcode/src/app/Debug/App.app/Contents/MacOS/App

To run a release build created with Xcode:

./build/xcode/src/app/Release/App.app/Contents/MacOS/App
Windows

To run a debug build:

build/debug/src/app/App.exe

To run a release build:

build/release/src/app/App.exe
Linux

To run a debug build:

./build/debug/src/app/App

To run a release build:

./build/release/src/app/App

Distribution

To bundle the application and create a distribution package CPack is used. Before executing CPack a release build needs to be generated.

cpack --config build/release/CPackConfig.cmake

Tests

On any generated build tests can be executed by using CTest, e.g. a Debug build:

ctest --test-dir build/debug

Preview


credits

Martin Fieber's C++20 project template with SDL2 and imgui. Lot of project installation, setup, distribution docs come from there.

Also, open source font Manrope.

About

game engine architecture | c++ cross-platform 2d game engine with lua

Resources

Stars

Watchers

Forks

Languages