Closed hkiame closed 4 years ago
Hello @hkiame, great find. I can see how that can be confusing.
@marijnh has a larger version of the image that is used to showcase what the sprite looks like and the actual image.
The large image /img/player_big.png is 480px × 60px
, but the image the code uses is /img/player.png, which is 240px × 30px
.
Maybe @marijnh uses the 480px × 60px
in both examples to save from confusion.
The picture containing the game character is of deminsion 480 x 60. Each subpicture is 48 pixels wide and 60 pixels high. So spriteW should be 48 and spriteH should be 60.