Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


One Big Texture or Multiple Tiled Textures for my RTS?

This topic is 6027 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Therein lies my dilemma. I was originally going to go for multiple tiled textures, where for example my 3D heightmap landscape is covered with 32x32 or 64x64 pixel graphic tiles representing different terrain types such as grass, dirt, sand, etc., and with the accompanying headache of drawing and correctly using transitional textures between tiles of different types (i.e., grass fading to dirt fading to sand fading to....) After attempting to program some automagic blending between tile type routines that work in real-time, and failing, heh heh, I switched to one giant texture. For example, for a map 256x256 tiles I would have a 4096x4096 pixel texture representing the entire landscape (which would come out to 16x16 pixels per tile). 48 Mb for the 24 bit data. I use a separate program to generate the texture based on terrain height/slope/etc., and it looks pretty good IMHO, with smooth blending between different terrain tile types. It would allow dynamic alteration of the ground with stuff like footprints, bloodstains, explosion marks, etc., but it takes up a massive hunk of memory and hard drive space. This is problematic, because I always wanted to have giant maps for my RTS. Bigger even than AOK''s largest. Stuff like 1024x1024 tiles, or 2048x2048 and even up to 4096x4096 tiles. Maps so large that, with time set at normal it would take your little troopers over an hour of real time to get from one end to the other (4096 tiles wide at 1-2 seconds per tile). Epic scale. Thing is, even at 512x512 the texture for said epic map ends up being 192 Mb. At 1024x1024 it''s 768 Mb. That''s RAM we''re talking. Yeah, I''m familiar with the idea of texture compression, and I''m aware of various techniques to reduce the memory footprint of data, but I''m trying to keep it simple here for sake of discussion. Besides, I don''t think I could do much to help 768 Mb of texture get down to a usable level! So by sticking with a giant texture I''m limiting myself realistically to maps no bigger than 256x256. *sigh* No can do. I think I''m going to go back to the tiled texture method, where I use a ton of small repeated textures to cover the ground. And I think I can get some good results. I mean hey, other games did. Total Annihilation:Kingdoms is tiled, and has some nifty landscapes. AOK is tiled, and seems to be extremely popular. Here''s my thought. I''m thinking that if I generate a giant picture of my terrain like I''m currently doing (maybe at an even higher resolution), I can then cut out 64x64 pixel chunks of this terrain for certain features like hills or mountains and use them in some kind of "meta-tile", or collection of tiles wherever there''s a large terrain feature. All that in addition to the regular use of repeatable grass, sand, ground, etc. What thinketh thou O fellow coders? Meanwhile, check out my progress over at: http://www.knology.net/~heaven/rts.htm Care, Chris Rasmus Florida, USA

Share this post

Link to post
Share on other sites
Using tiles at different resolutions is a great way to maintain diversity while saving memory. The later Ultima games worked in a similar way: individual tiles were 8x8 pixels (on a 320x200 screen), but the map was constructed out of larger tiles that were defined as sets of the smaller tiles.

Imagine the following ''smaller tile'' set:
A B C D E 

And here are 2 of the potential larger tiles you can make out of them:

Note that these two large tiles will tile seamlessly, because you can change the insides of the larger tile without affecting the edges: thus breaking up the monotony (and hence, the "tiled" appearance) without costing yourself much more in graphics size. This is a routine commonly used in file compression: instead of storing everything explicitly, find the common patterns (in text, this might be words, in this case, it is the larger tiles) and store references to the patterns instead. This works for anything that can be constructed of component parts.

[ MSVC Fixes | STL | SDL | Game AI | Sockets | C++ Faq Lite | Boost ]

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!