Jump to content
  • Advertisement

Archived

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

minderaser

tiles in wrong place

This topic is 5398 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 made a map but i have a problem where my bottom tiles are at top instead of on bottom i intialized in something like this map sizeX = 10; map sizeY = 20; i have them located in the proper place in... map[10][20] { {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,}...... ................................................ } tile 1 actually shows up on bottom instead of on top; i call it later on when i draw... draw { ...code to tile map map[y][x]; ...code that draw map } i''m wondering if i switch the y and x will it work?

Share this post


Link to post
Share on other sites
Advertisement
Switching X and Y won''t do it. You need to change the way that Y increments (or decrements). Try modifing your drawing loop so that Y decreases from the map height to 0.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!