Sign in to follow this  
twoaterisn

2D maps

Recommended Posts

hello y'all :) I was thinking of making a game containing a destructable 2D map, type worms/lemmings. All i've done untill now are tile-based games, for this should I consider the map as being tile-based, with each pixel being a tile? This way I have to keep track of every pixel, what would be quite slow I think. Is there a better way of doing it? Just tell me what to google for :) thanks, TH

Share this post


Link to post
Share on other sites
Any other way of storing it will take a chunk of CPU work each frame to handle. I'd store the terrain as a 2d array of bytes and use a palletized color source. I think that's how games like Worms where done. A 640x480 map would still be under 300k.

Share this post


Link to post
Share on other sites
If you want pixel perfect destruction, you'll need pixel perfect information. You could do a true-color map and use alpha channel for handelling destruction.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this