tile maps....

i am really lost,can anyone explain to me how tile maps work and how i can use one in my game ? https://github.com/raysan5/challenges/tree/master/02_challenge_dungeon2d this is the only example i found and i coudent understand it D:

thanks in advance , ^^


  • Well, it's a wide topic, lots of things to explain... actually, the challenge you share has some good explanation on the topic...

    Basically you have an image that contains small pieces that are used like bricks to build a level with them. Every piece (brick) of the image gets a number assigned and you can draw a full level just definning those numbers as a 2D matrix. When drawing the level, every number is checked and the corresponding piece of the image is drawn.

    The example you link doesn't use raylib strictly, it actually uses only rlgl, a lower level library used internally by raylib.
  • everything makes sense now, thank you for the help :smile:
  • edited January 19
    Yes, I can agree with you here
Sign In or Register to comment.