Air-Trap 1.0.0
A multiplayer R-Type clone game engine built with C++23 and ECS architecture
Loading...
Searching...
No Matches
LevelData.hpp
Go to the documentation of this file.
1/*
2** EPITECH PROJECT, 2025
3** Air-Trap
4** File description:
5** LevelData
6*/
7
8#pragma once
9
10#include <optional>
11#include <string>
12#include <vector>
13
14#include "RType/Math/Vec2.hpp"
18
19namespace rtp::server {
20
30
38
40 float atTime{0.0f};
41 Vec2f position{0.0f, 0.0f};
42 Vec2f size{32.0f, 32.0f};
43 int health{50};
45};
46
47struct LevelData {
48 uint32_t id{0};
49 std::string name;
50 Vec2f playerStart{100.0f, 100.0f};
51 float widthPixels{0.0f};
52 std::string tilesetPath;
53 std::vector<SpawnEvent> spawns;
54 std::vector<PowerupEvent> powerups;
55 std::vector<ObstacleEvent> obstacles;
56};
57
58std::optional<LevelData> loadLevelFromFile(const std::string& path, std::string& error);
59
60} // namespace rtp::server
Network packet implementation for R-Type protocol.
Declaration of the 2-dimensional vector class.
Patterns
Enum representing different enemy movement patterns.
@ StraightLine
Moves in a straight line.
PowerupType
Supported powerup types.
Definition Powerup.hpp:16
EntityType
Types of entities in the game.
Definition Packet.hpp:144
File : GameManager.hpp License: MIT Author : Elias Josué HAJJAR LLAUQUEN elias-josue....
std::optional< LevelData > loadLevelFromFile(const std::string &path, std::string &error)
std::string tilesetPath
Definition LevelData.hpp:52
std::vector< ObstacleEvent > obstacles
Definition LevelData.hpp:55
std::vector< PowerupEvent > powerups
Definition LevelData.hpp:54
std::vector< SpawnEvent > spawns
Definition LevelData.hpp:53
ecs::components::PowerupType type
Definition LevelData.hpp:33
net::EntityType type
Definition LevelData.hpp:23
ecs::components::Patterns pattern
Definition LevelData.hpp:25