vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
project.h
1#pragma once
2
3#include <cstdint>
4#include <filesystem>
5#include <string>
6#include <vector>
7
8#include "core/engine_config.h"
9#include "system/render/render_settings.h"
10
11namespace Vkm::Engine {
12
19 std::string image;
20 float seconds = 1.5f;
21};
22
29struct Project {
30 std::string name = "Untitled";
31 std::string description;
32 std::string version;
33 std::string engineVersion;
34 std::string entryScene;
35 uint32_t tickRate = Config::DEFAULT_TICK_RATE;
36
43 uint32_t maxPlayers = 10;
44
50 uint16_t netPort = 27750;
51
53 std::vector<SplashEntry> splash;
54
62};
63
74bool loadProject(const std::filesystem::path& projectRoot, Project& out);
75
87[[nodiscard]] bool saveProject(const std::filesystem::path& projectRoot, const Project& project);
88
99bool compatibleEngine(const std::string& engineVersion);
100
110std::filesystem::path findProjectRoot(const std::filesystem::path& start);
111
112} // namespace Vkm::Engine
What a project.json says about the game it describes.
Definition project.h:29
RenderSettings render
What the game looks like, as the author left it.
Definition project.h:61
uint32_t tickRate
Simulation ticks per second.
Definition project.h:35
std::string entryScene
Scene to boot, relative to the project root.
Definition project.h:34
uint32_t maxPlayers
How many players this game is for.
Definition project.h:43
std::string engineVersion
Engine version this was authored against.
Definition project.h:33
std::string name
Display name; titles the window.
Definition project.h:30
std::string description
One line on what it is, for the editor's start screen.
Definition project.h:31
std::string version
The game's own, which its packages are named by.
Definition project.h:32
std::vector< SplashEntry > splash
Logos shown after the engine's own, in the order listed. Usually empty.
Definition project.h:53
uint16_t netPort
The port this game is served on unless a run says otherwise.
Definition project.h:50
Editable render tuning: pass toggles + per-effect parameters.
Definition render_settings.h:86
One logo a project shows at startup, and how long for.
Definition project.h:18
std::string image
Image to show, relative to the project root.
Definition project.h:19
float seconds
Time held at full opacity.
Definition project.h:20