Skip to content

Documentation on tiles.png? #109

Closed Answered by KilledByAPixel
ablakey asked this question in Q&A
Discussion options

You must be logged in to vote

Thanks for checking out LJS! So the first thing I would do is search on "tiles.png". You will find that it is passed as the default image name to engineInit, which is why the examples don't reference it.

You can pass in any image name though, or even multiple images to load. In the platformer example it actually does pass in two image names ('tiles.png' and 'tilesLevel.png') to demonstrate how multiple images are supported. In practice you can fit a ton of sprites on one tile sheet so most games won't need that. It is good to put all sprites on one sheet because then it can render them all with the same draw call which is much faster.

Your tiles can vary in size even on the same sheet, so…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@ablakey
Comment options

@KilledByAPixel
Comment options

@KilledByAPixel
Comment options

Answer selected by ablakey
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants