Game Development Community

Layers/Tilemaps vs. Images

by Landixus · in Torque Game Builder · 02/28/2011 (3:52 am) · 5 replies

Make it a difference to work with layers/Tilemaps or
only work with images to build a Level in Torque 2d?

I mean it for the performance.

Because i have always problems when i load and save layers for the Levels,
sometimes they are missing in the t2d files.

When it does not matter, i can use only images....

#1
02/28/2011 (7:18 am)
I'm not sure it makes a difference, but if your level image is very large you might run into performance bottlenecks in hardware. You might even cause crashes depending on how graceful some drivers are. 2048x2048 is probably safe and 4096x4096 would work on newer hardware but your mileage may vary. You could try experimenting with this, I guess - I'm not sure how accurate this info is - but if the whole image won't fit in video memory it'll be a drag on performance because it will stall rendering while it transfers the image in chunks to the video card each time it is rendered.
#2
02/28/2011 (7:21 am)
I work with tileset images 256x256, so this should not be a problem, i think?
#3
02/28/2011 (5:15 pm)
Well, the performance issues are going to arise if you're using giant maps, tileset size isn't important. A 256x256 map of 16x16 tiles is going to be 4096x4096. I haven't had any luck importing images bigger than 2048x2048, so I'm not sure that, say, a Final Fantasy-size world map would be possible as an image.

For the disappearing map issue, I'd edit your tilemaps in a separate T2D file. It seems to happen less if there's less going on in the scene.
#4
03/01/2011 (2:45 am)
so it is better to have for every Level a own tileset?
#5
03/01/2011 (9:45 am)
It depends on what you're making. A "tileset" is stored in T2D as one image asset, and you can have plenty of those. If so inclined, you could fit your entire graphics library in one tileset like the CHRRAM of a game cart.