I tested a larger map imported from Tiled in my project. A map about the size of 3600x1800px.
A guess is that around 20000 tiles (one terrain used, 13 different tiles) are used on the map in total.
Performance was not that good when pre-viewing.
My question is if an imported map makes one hitbox per tile? And if using the native map editor, will a resized tile in the native editor result in still one hitbox?
Perhaps someone have some neat solutions on how to keep performance good along with large levels?
You have to cut that larger map to pieces. And use different object as a collision box.
I have a big map in my game and I had to make rooms separately and they get destroyed if player is not in that room. When player get into that room, game create that room etc. And those tilemap room objects doesn’t have any behaviors.
So you create the new room from a tilemap but then give other objects platform behavior? What kind of object and like overlayed but not visible?
Yes. My project resolution is 400x240, so I have been made over 60 rooms now using tilemap object. Every room is 400x240 and tile size is 16x16, so one room in tilemap is 25x15. And I got one 16x16 tiled sprite object that has platform behavior and I use that everywhere I need a platform. That object is not visible when you play.
And there is always only 1 room in the scene at the same time. That one room is where the player is. Rooms around it get destroyed etc.
My project performance went 40-50 fps (most of the time fps was 45) to +60 fps when I tested it with my very bad laptop. So yeah, I don´t know why that tilemap object is such a performance eater even when it does not have any behaviors…