ImagoEngine
A C++ 2D game engine built on a sparse-set ECS, with scenes, scheduled systems, events, and action-based input
Loading...
Searching...
No Matches
GameConfig.hpp
Go to the documentation of this file.
1
6
7#pragma once
8
9#include <string> // for title setting
10
11namespace Imago::Engine
12{
14 enum class FramePacing { VSync, Limited, Uncapped };
15
17 struct GameConfig {
18 std::string title = "ImagoEngine";
19 unsigned int width = 1280;
20 unsigned int height = 720;
21 FramePacing pacing = FramePacing::VSync;
22 unsigned int targetFps = 60;
23 std::string firstScene;
24 };
25}
FramePacing
How the game limits its frame rate. Excactly one mode is ever active.
Definition GameConfig.hpp:14
Everything the Game needs to start. Default values for now but will later be filled by a YAML config ...
Definition GameConfig.hpp:17
std::string firstScene
name of the first Scene to load and run.
Definition GameConfig.hpp:23
unsigned int height
height of the window
Definition GameConfig.hpp:20
unsigned int width
width of the window
Definition GameConfig.hpp:19
FramePacing pacing
how the frame rate is limited. VSync by default.
Definition GameConfig.hpp:21
unsigned int targetFps
only read when pacing is limited.
Definition GameConfig.hpp:22
std::string title
window title
Definition GameConfig.hpp:18