An open API service indexing awesome lists of open source software.

https://github.com/canreader/sleakengine-fpp

First Person Perspective game built with SleakEngine
https://github.com/canreader/sleakengine-fpp

Last synced: about 1 month ago
JSON representation

First Person Perspective game built with SleakEngine

Awesome Lists containing this project

README

          


SleakEngine

SleakEngine Empty Template


Starter template for building games with SleakEngine


Clone, build, and start writing game logic immediately.


License
C++23

---

## What is this?

This is a **game project template** for [SleakEngine](https://github.com/CanReader/SleakEngine). It includes:

- `Game/` — Example game logic (scenes, objects, components)
- `Client/` — Thin executable entry point
- `Engine/` — SleakEngine core, pulled in as a **git submodule**
- `scripts/` — Build helper scripts
- `docs/` — Scene system guide and documentation

The Engine is included as a git submodule. Use `git submodule update --remote` to fetch the latest version.

## Prerequisites

| Requirement | Minimum |
|---|---|
| **CMake** | 3.31+ |
| **C++ Compiler** | C++23 (MSVC, GCC, or Clang) |

All engine dependencies are vendored — no package manager needed.

## Quick Start

### Clone

```bash
git clone --recurse-submodules https://github.com/CanReader/SleakEngine-Empty.git
cd SleakEngine-Empty
git submodule update --remote
```

> **Already cloned without `--recurse-submodules`?** Fetch the Engine submodule:
> ```bash
> git submodule update --init --recursive --remote
> ```

### Build

```bash
cmake --preset debug
cmake --build --preset debug
```

For an optimized build:

```bash
cmake --preset release
cmake --build --preset release
```

Output goes to `bin/` with all assets and runtime libraries in place.

### Run

```bash
./bin/SleakEngine -w 1280 -h 720 -t My_Game
```

| Flag | Description |
|---|---|
| `-w` | Window width |
| `-h` | Window height |
| `-t` | Window title (use `_` for spaces) |

## Project Structure

```
SleakEngine-Empty/
├── CMakePresets.json Build presets (debug / release)
├── Engine/ SleakEngine core (git submodule)
│ ├── include/ Public & private headers
│ ├── src/ Implementation
│ ├── assets/shaders/ Default shaders
│ └── vendors/ All third-party dependencies
├── Game/
│ ├── include/ Game headers
│ ├── src/ Game implementation
│ └── assets/ Textures, models, etc.
├── Client/
│ └── src/ main.cpp
├── scripts/ Build helper scripts
└── docs/ Documentation
```

## Building Your Game

Edit `Game/src/Game.cpp` to implement your game logic:

```cpp
#include "Game.hpp"

void Game::Initialize() {
auto* scene = CreateScene("MainScene");

auto* player = scene->CreateObject("Player");
player->AddComponent();
player->AddComponent();
player->AddComponent();

auto* camera = scene->CreateObject("Camera");
camera->AddComponent();
camera->AddComponent();

SetActiveScene(scene);
}

void Game::Begin() {
// Runs once after initialization
}

void Game::Loop(float DeltaTime) {
// Runs every frame
}
```

See the **[Scene System Guide](docs/SCENE_SYSTEM_GUIDE.md)** for the complete API reference.

## Updating the Engine

To pull the latest Engine version:

```bash
cd Engine
git fetch origin
git checkout
cd ..
git add Engine
git commit -m "Update Engine to "
```

Or to track the latest on the Engine's main branch:

```bash
git submodule update --remote Engine
git add Engine
git commit -m "Update Engine to latest"
```

## License

This project is released under the [MIT License](LICENSE).