Hello everybody! Tell me please… I want to implement my custom processor for the .tmx tile map.
- I have an idea to create other dependent files at runtime (for example, tileset and tile collection), but I don’t understand how to add them to the .mgcb file.
- How to delete dependent files if I delete a file.tmx. Can anyone know how to implement this?
If you haven’t already, you might want to check out monogame extended first - it has support for Tiled maps.
I gave the TMX file as an example. For a better idea, I will describe the situation with the TMX file: the file contains information about the tileset, which has tiles and the location of these tiles in the grid (layers). Let’s say I want to use these tiles in the game, but I don’t plan to load the entire map. Therefore, there is an idea to create XML files Tileset and Tiles during processing of the TMX file. And now to rephrase the question: can I create additional dependent files during the single file process?
Are you planning to load a subset of tiles as per a zone/room or proximity to your character?
-
Zone means let’s say a forest which is larger than a screen but smaller than the full map;
-
Room would be something very small, maybe a bit larger ori smaller than your screen such as perhaps the interior of a house;
-
Proximity to player would mean all tiles that are visible on the screen surrounding the player.
If either #1 or #2, maybe you can define one XML file per zone or room. For #3 things get a bit complicated because you need somehow to slice your map and maybe preload the slice where your player is, all the neighbouring slices and repeat that each time you switch to another slice.
Hope this helps.