I was fiddling around with pulp and wanted the player character to animate a little better in the demo project first given. I got it working sort of how I wanted it to and thought it might be nice to upload if anyone wanted to see how I did it: Player_animation.zip (28.2 KB)
A brief explanation: Up/Down movement is basic, I simply keep track of the direction they're facing and then swap left leg for right leg frames.
Left/Right is a bit more involved in order to make it look like the legs are moving. I put in a very short wait and then swapped out frames that way when movement stops the animation stops as well (unlike when your tile has an animation built-in)
Hey SinHal,
can you share the .json? i can only find the option to import .json into pulp. I was also toying around with character animation and would like to compare your solution! Thank you!
I like how the player's legs change each step when moving on the y-axis!
for the x-axis animation, there is an alternative approach: you can also use an animated tile (10 fps=0.1sec per frame as you have) and have the script "play" it and then draw the static one again. This will effectively play 1 cycle of the animation tile. (See neven's script in the "two-tile-tall-player tutorial")
Keep at it! I'm only just starting too and so far it's great fun to tinker with pulp, even though there are lots of script commands i can't find in the documentation and only stumble upon in this forum here
My battle with devving on pulp is that the language is so paired down compared to everything else I've used up until now. Like I would've totally stuck one of the animation cycles in a method to reuse .