Crimson Engine 1.0.0
A high-performance C++20 game engine prototype showcasing a custom ECS, Vulkan renderer, and ImGui editor.
Loading...
Searching...
No Matches
Engine::TilemapComponent Struct Reference

Represents a 2D tile grid in the scene. References a tileset by its disk path (.tileset file). The TilemapSystem loads the tileset, builds a packed atlas, and generates a single mesh + material per tilemap entity. More...

#include <Tilemap.hpp>

Public Attributes

int width = 0
int height = 0
float tileSize = 1.0f
std::string tilesetPath
std::vector< int > tiles
 1D tile grid of size width*height. Value = index into TilesetAsset::tiles[]. -1 = empty cell.
bool isDirty = true
 Flag requesting mesh + collision rebuild next frame.

Detailed Description

Represents a 2D tile grid in the scene. References a tileset by its disk path (.tileset file). The TilemapSystem loads the tileset, builds a packed atlas, and generates a single mesh + material per tilemap entity.

Member Data Documentation

◆ height

int Engine::TilemapComponent::height = 0

◆ isDirty

bool Engine::TilemapComponent::isDirty = true

Flag requesting mesh + collision rebuild next frame.

◆ tiles

std::vector<int> Engine::TilemapComponent::tiles

1D tile grid of size width*height. Value = index into TilesetAsset::tiles[]. -1 = empty cell.

◆ tilesetPath

std::string Engine::TilemapComponent::tilesetPath

◆ tileSize

float Engine::TilemapComponent::tileSize = 1.0f

◆ width

int Engine::TilemapComponent::width = 0

The documentation for this struct was generated from the following file: