Replies: 1 comment
-
Hi, 25 is the number of tiles in the source texture palette. This is used to calculate the source rectangle when drawing tiles. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi I am playing around with tiles right now. And I am using the tile example to learn from.
I found that
tileXNum
is a constant which is used to draw the tiles in the right coordinates.I made the tiles 16 px, and the
tileXNum
is 25. The game is 30 tiles wide. And there is no problems. Everything is drawn perfectly. But if I change the `tileXNum then things starts messing up.I understand that
tileXNum
is used to reset the pixel counter after every 25 tiles. But I have 30 tiles. And the example provided by ebiten has 15 tiles. So why is the number 25??Thank you in advance :)
Best regards Martin
Beta Was this translation helpful? Give feedback.
All reactions