Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


tile engine

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

Pretty broad question but here goes (this might be a newbie way, btw )

The first thing I would do is make a multidimensional array and fill it with numbers. Each numbers would represent a tile. I would then read each element of the array and pass it to a function to draw the tile. This function would use two "for" loops. It would loop through the y coordinates, drawing row by row.

I think it would go something like this:

int map[3][3] = {{1,1,1},

for (int y = 0; y < 2; y++)
for (int x = 0; x < 2; x++)

That''s just the main idea. Play around with it and see if you can get a simple maze working or something

Share this post

Link to post
Share on other sites

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