Log In  


I just got Picotron and for my first project i wanted to do a Mother-ish movement and look test, so I got movement done and some Ninten sprites, but i just can't seem to figure out how to make the sprites animated. I've tried tables and a bunch of other stuff. Any help would be appreciated, I would recommend for it to have very simple logic and syntax. Thank you!

1


Hi! Do your animations loop? If so:
Have a table of frames anim_frames={12,13,14,15} and draw one of them depending on the time() since game start. Modulo that time by the length of your table and add 1(1-based tables) and voila, ypu have a way to draw those animated frames.
I've written a function that allows you to draw a set of frames with a given speed without keeping track of animation timers by using that principle.



[Please log in to post a comment]