I use modulo with just one line of code: spr(first frame position + (T()*(frame per second)%number of frames +1), posX, posY). For exemple: spr(1+(T()*10%5), 64, 64)
@Walbertkyle3 ай бұрын
You can also use a function for this, so it would lessen the tokens used and look more readable
@caittastic11 ай бұрын
if you have sprites that arent all in a row, you can use an array of sprites and index it using time*something, modulo amount of sprites
@TonyoPet11 ай бұрын
That fire animation tho! Great code tips, but I'm totally going to use that animation method for fire going forward.
@spacecat8811 ай бұрын
Ahhh yeah! Works great for liquids and smoke too!
@TheHotEgg11 ай бұрын
I’m still gearing myself up to actually start making something but I always find your tutorials so interesting and reassuring as a complete beginner. Hopefully this year I’ll actually start!
@spacecat8811 ай бұрын
You can do this! Make a really simple game!
@SMABEM10 ай бұрын
Just bought Pico-8 looking forward to starting to make games. So it uses an 8x8 sprites. If I want a 32×32 sprite do I need to combine smaller sprites? How does that work?
@spacecat8810 ай бұрын
I have a vid on 16x16. It's similar to that
@SMABEM10 ай бұрын
@@spacecat88 will definitely check it out! Love your stuff.
@JonM00n5 ай бұрын
im following this to a T and its great. but i cant seem to figure out how to animate when walking a direction. for example left and right walking animations. im super new to this :S
@Woog_Lord3 ай бұрын
SPR function has size and horizontal flip and vertical flip as parameters, so you can make a bool for facing left/right and just set it to true/false based off what button is pressed
@maewilkes88837 ай бұрын
I was hoping for help with coding. I also got a great trick for drawing animations!