KTech 1.1.0
C++ 2D terminal game engine library
Loading...
Searching...
No Matches
engine.hpp
1/*
2 KTech, Kaup's C++ 2D terminal game engine library.
3 Copyright (C) 2023-2025 Ethan Kaufman (AKA Kaup)
4
5 This file is part of KTech.
6
7 KTech is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 any later version.
11
12 KTech is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with KTech. If not, see <https://www.gnu.org/licenses/>.
19*/
20
21#pragma once
22
23#define KTECH_DEFINITION
24#include "../ktech.hpp"
25#undef KTECH_DEFINITION
26#include "../basic/upoint.hpp"
27#include "collision.hpp"
28#include "input/input.hpp"
29#include "memory.hpp"
30#include "output.hpp"
31#include "time/time.hpp"
32
41{
42public:
43 bool running = true;
44 const bool noGameLoopMode;
45
51
52 Engine(UPoint imageSize, size_t ticksPerSecondLimit = 24, bool noGameLoopMode = false);
53
54 void Quit();
55};
Engine component responsible for processing Object movement and collision.
Definition collision.hpp:34
Complete engine containing all engine components.
Definition engine.hpp:41
Collision collision
Collision engine component.
Definition engine.hpp:46
Output output
Output engine component.
Definition engine.hpp:49
bool running
States whether the game loop should be running or not.
Definition engine.hpp:43
Engine(UPoint imageSize, size_t ticksPerSecondLimit=24, bool noGameLoopMode=false)
Construct the engine components.
Definition engine.cpp:85
Time time
Time engine component.
Definition engine.hpp:50
void Quit()
Set Engine::running to false.
Definition engine.cpp:93
Memory memory
Memory engine component.
Definition engine.hpp:48
const bool noGameLoopMode
States whether the engine is in "no-game-loop mode" or not.
Definition engine.hpp:44
Input input
Input engine component.
Definition engine.hpp:47
Engine component responsible for distributing user input.
Definition input.hpp:44
Engine component responsible for registering all world structures.
Definition memory.hpp:36
Engine component responsible for outputting rendered images.
Definition output.hpp:42
Engine component responsible for game loop timing.
Definition time.hpp:35
Unsigned 2D vector, mostly used to store sizes and 2D indexes.
Definition upoint.hpp:29