Closed MarkOates closed 6 months ago
This issue describes several different issues with the PrimMesh
specifically. Since writing this issue, a new object TileMaps/TileMesh
is created that permits empty tiles. It accomplishes this having an internal ALLEGRO_INDEX_BUFFER
(along with a ALLEGRO_VERTEX_BUFFER
). The tiles are "removed" by having the vertices removed from the index buffer via vertex_indices_for_tile_xy(x, y)
. They remain present in the vertex buffer.
This core issue is completed, however, the additional issues need to be broken down into separate issues.
Components in Use
A somewhat disjointed problem among several components. The roles of each are not yet sorted out.
Irregularities
72
is used to replace0
tiles when loading.72
being a blank tile in one of the tileset bitmaps that was used at one point. This was probably done in a hackathon back in the day.0
is reserved for an empty tile, and the file will start tilesets at different indexes, starting with the first tileset at1
. AllegroFlare components are currently re-indexing all the tilesets to start at0
, and relying on a tileset's declaration at run time to include a single bitmap filename to be used as the tileset.1
.-1
indicate an empty tile? Are there locations whereuint32_t
is used as indices?Desired features
Fastest possible would be a single mesh, holding all sprites and tiles, a single shader with different blending modes, additional shader data included in the vertex with correlated data in another bitmap like a normal map. Something like that.