Jump to content
  • Advertisement
Sign in to follow this  
chuiy

creating a tilemap in allegro

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

Hey guys, I'm just now getting back into programming. And I had beendoing allegro for about a month, maybe two before I dropped it for a few months. Now I'm back! And I was wondering how could I create a tilemap in a allegro? I knwo you have to create an array and iterate through it, drawing each tile seperately, and I was wondering if anybody could make some sample code for me o go by, or maybe.. possibly.. explain it to me =) I'm not worried about scrolling quite yet, as I want to start from the ground up, make sure I get it right the first time =D thanks for reading, hope you guys can help!

Share this post


Link to post
Share on other sites
Advertisement
Take a look at Pixelate 11's example. You're pretty much spot on, you create an array and use different values to represent different tile types, when drawing or colliding with the map you can use this to draw a different graphic or stop the player moving (eg: a wall or tree).

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!