Why are my sprites not showing up ingame?
I am making a game(trying). I handmade all of the sprites, including the duck,the frog, evil frog, background and portal. The duck,frogs, and portal are not showing up even if I add them, and there are no errors saying that the code is wrong.
why are they not showing up?
p.s., even though it says I used JS, I used Kaboom.js
sprites/ to the front of your paths in the
Right now, your paths are searching for the sprite name inside of the
main directory, but main is located inside of
script.js main │ └ froggyminion.png
..needs to be...
script.js sprites │ └ main │ └ froggyminion.png
I'm not sure if kaboom automatically detects for the
sprites folder so this may not work
@xMisbahx did a little research (not much) but why are you creating a sprite animation for your sprites. The images you have aren't in an atlas for animations.
Example of texture atlas for animations
So far I got it to display by removing the animation declaration from the
loadSprite function (basically everything in the curly brackets) and changing the scale back down to 1.
Kaboom seems to expand the sprite from the top left corner, and as your image has a lot of whitespace around it, at large scales it disappears completely.