Jump to content
  • Advertisement
Sign in to follow this  
wicked357

Drawing the game map?

This topic is 3002 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 am making a Pac-Man clone, and I have been working on putting it all on paper, how would I go about doing the map drawing and collision based on the map, I am not looking for something complicated, more or so the easiest way to achieve this by creating a hard coded level.

Share this post


Link to post
Share on other sites
Advertisement
Use a 2d array of tile indices.

11111111
10000001
10111101
10100101
10110101
10000001
11111111

Share this post


Link to post
Share on other sites
Here is the problem I have with tile, is that the Pac-Man map has many different tile sizes and if you were to set up a tile size the map wouldn't fit together right at all, or you will be testing collision with 4*8x8 tiles for every single tile based on apperance, I thought about tile but don't see how I could efficiently implement this in, and thinking there has to be another way this was accomplished. Thanks for the idea though and anymore is greatly appreciated.

Share this post


Link to post
Share on other sites
It's just tiles. Break the tiles up so that there is a single common tile size. Some tiles will occupy more than one tile space. You can have variations of the same tile such as a corner piece, to make things more reusable.

For a more complicated game you could use line and box primitives to define the world. But i seriously recommend just tiles.

Share this post


Link to post
Share on other sites
thx for the suggestions I have yet to actually program a tile based game yet, you know of any good links to get me started I am using C++ for this venture and possibly SFML or SDL not sure which I would prefer SFML though.

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.

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!