Jump to content
  • Advertisement

Archived

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

Jedyte

Help: tiles and their images

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

I''m currently building a tile-based engine (not iso, but that doesn''t matter much). Now I''m constructing a Tile object, but I''m doubtful if I should include the actual Tile image too, because I already have a TileSet class wrapper that reads in and segments a bitmapfile in tiles and stores them in an easy to access array. This approach seemed better than searching for an Tile image in the complete bitmap eevery time it needs to be drawn. Does putting your image in the Tile itself has any advantages?

Share this post


Link to post
Share on other sites
Advertisement
quote:
Original post by Jedyte
Does putting your image in the Tile itself has any advantages?


I didn''t see any reason to do so in The Scrolling Game Development Kit. Whenever I needed a tile image I simply called a function on the tile object to extract the image at the moment I needed it.


"All you need to do to learn circular logic is learn circular logic"

Share this post


Link to post
Share on other sites
When I put together a TileSet class, I tend to make it a collection of image objects (with image objects knowing how to render themselves). I can then use pointers or references to image objects in other things that need to be displayed. Only the image class actually has the rendering code, so those things that need to be drawn simply delegate the responsibility to the image objects.

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!