Jump to content
  • Advertisement

Archived

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

Laroche

Tile Help

This topic is 6223 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

Im working on a simple 2d-tile engine with directX but im having a bit of difficulty understanding a few concepts.. 1) i dont understand how you should arrange your tiles when you make a tileset.bmp or something similar. How many tiles across and down should it be? 2) what file format should you use? bmps are humongous, and it seems as if even the smallest program will be 15 megs or something.. 3) Is there any very-indepth explanation of tiling with directX anywhere on the net? ive read a few in gamedev but the ones on tiling were lacking explanations with a lot of stuff thanks for your time

Share this post


Link to post
Share on other sites
Advertisement
1) In fact you don''t *have* to use one file. You can create one file for each tile if you want. There is no "magic rule". Choose what seems easier/more convenient to you.

2) No "magic rule" again. However, be aware that lossy compression (like JPEG) will mess up your color key if you use one.

3) Don''t know, sorry.

Share this post


Link to post
Share on other sites
1) Same as prosper, if you decide to make just one file for all the tiles there are many aproaches, you can eighter make a huge row of all the tiles, or make a huge column of all the tiles, or set them as a variable matrix of tiles, that is maybe 5X5? or maybe 5X6, it all really depends on the Algorithm, I think working with one column or one row is the most eficient if you are using a single file (because you only have to calculate one offset isntead of 2) but actually working in the tiles (drawing em) might be a mess. A friend used an aproach were he had one file/surface with a stagered map of all the iso tiles, then he used a mask to cut em out as needed, a memory saver! but would only work on Layer 0 tiles

2) Personally I use PCX, Impelemted the read/write functions myself, it gives you all the functionality of BMP without all the extra space, I might start using PNG with libpng when I get something worth alpha blending

3) dont know eighter, tiling and DX are 2 different things, one is a concept the other is a tool, you gotta learn how to do one, learn to use the other and then use one to implement the other.

Share this post


Link to post
Share on other sites
Isn''t there some restriction limiting the width of an offscreen surface? Maybe this is just in older
versions of DX, but I seem to remember something about this. I don''t remember if it was limited to
the width of the primary surface, or to some maximum number.

Share this post


Link to post
Share on other sites
quote:

2) what file format should you use? bmps are humongous, and it seems as if even the smallest program will be 15 megs or something..



Er...not necessarily, if you use the tiles wisely. The idea of using tiles is that you can re-use tiles in different locations and therefore save on HDD and memory space...

My 2c (NZ)

---------------

I finally got it all together...
...and then forgot where I put it.

Share this post


Link to post
Share on other sites
For instance, in a bmp, you could have 144 32x32 tiles and it would use only 500kb space. Seems ok 2 me...

(if u dont believe me, try it on MS Paint)

---------------

I finally got it all together...
...and then forgot where I put it.

Edited by - AdmiralBinary on November 26, 2001 3:08:31 PM

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!