For various reasons, I don’t want to make a big 3D map, or a tiled 2D map. Instead, I’d like to use a super-high resolution, hand-painted 2D map. Right now, I’ve been developing the game with a placeholder 2D map texture of around 20 megs in PNG format (which I’m using so I can freely use GetPixel and SetPixel) slapped onto a cube. However, eventually I’m going to need a much larger map.
I’m assuming this is going to cause performance problems later on, especially since I’d like to port to tablets/mobile eventually. My question is, how do I handle this? Should I chop up the map into a number of smaller textures, and load only the ones currently in view of the camera (and if so, how can I do this)? Or is there another good solution I’m overlooking?
I’d greatly appreciate any help you could offer. Thank you!
There are physical limitations to the texture sizes for various hardware, so it’s unlikely you’d want to use anything larger than 2048x2048 for a single texture.
If your looking for a map that wont involve moving around on, while zoomed in to see finer details or individual units for example, then a much larger map could be achieved by simply making your ‘unit’ icons smaller and make it take longer to traverse the map.
The suggestion from the first thread is quite nice though, I would certainly start there.
Thank you. So would making, say, 16 rectangles, each with their own piece of a larger texture, potentially work well? Or would I run into other problems with this approach?
Yeah I’ve been using the techniques posted in that thread, they’ve worked like a charm so far on my relatively low-res map.
I need some level of zooming in (probably 3 levels of zoom, I think–the entire world at the top, to a reasonably crisp level of detail fully zoomed in). So I’ll still need a significantly larger texture than I’ve been using.
If that’s 2048x2048x16 tiles, then you’re talking about 256MB uncompressed, which may be an issue; naturally compression would help if the quality is acceptable.
I think if a world map is needed you’d be best off importing a mesh. This shouldn’t be more than a couple of megs regardless of density. You can then use render textures to render any portion of this huge mesh ahead of time, or if hardware permits, render the mesh itself.
Using substances, or just classic vertex based splatmaps and tiled textures, you should be able to do the images you’ve linked to with tiny memory footprint.
Thanks for the advice! I’m not too familiar with render textures so I have some research to do, but any technique that’ll render only the part of the map I’d need seems promising.