creating a tilemap in allegro

Started by
1 comment, last by evolutional 14 years, 11 months ago
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!
Advertisement
Moving to Alternative Game Libraries.
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).

This topic is closed to new replies.

Advertisement