Jump to content
  • Advertisement
Sign in to follow this  
jagguy2

tileGrid confusion

This topic is 3626 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 making a 2D game in silverlight. I have the screen made up of 32X32 tiles. I read in a 2D array of numbers which are rows and columns on the screen. Each row and column has a number which represents the tilenumber. THis is how my screen is constructed. I also have an array object of every tilenumber which stores extra details for each tile eg the image , the image path location, can you move on it etc I need also to have globally the 2D array of the screen tile map which I read in but an additional 2D array copy of the screen with extra details like is the image visible or has the static image has changed like it has been bombed etc I have 3 big data structures with the 3rd one global throughout the program. IS there an easier way?

Share this post


Link to post
Share on other sites
Advertisement
The first thing I do with tile based games is define what a "tile" actually is.

Is a tile just an index to an image on a texture or is it more? Perhaps each tile in my map is it's own micro environment that displays a particular image based on it's attributes and the images are just there to display the state of the tile to the user.

I prefer the second definition myself as separation of image and tile makes my life a lot easier. Your mileage may vary but I think asking yourself what a tile is to your game may make things a bit easier for you in the long run as well.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!