Anila v0.03 - Devlog - Displaying Ennemies


FR Version française sur mon blog, cliquez içi!

Some news! I am now working on the ennemies. Well, the first ennemy actually. So its width is 1 tile and his height is 2 tiles and his name is Shuldar. Say hi, Shuldar!

Shuldar is presently not moving, but it has a looping animation, and it can be spawned multiple times at multiple locations!

I tried to write something somewhat modular for the animation, based on what I did on the player. I wrote the animation function on a basis of a looping timer called "d" for delay and defining a minimum and a maximum sprite number value, respectively smin and smax. snum is the actual sprite number, changing for animation frame.

Each loop increments the mob's sprite number by 1. If the sprite number is greater than smax, then  it returns to smin so the animation can loop, and so on:

if n.snum>n.smax then

For placement, I pass the x and y coordinates when calling the creating function, something like this:

create_shuldar(10, 14)    ---> this will create a Shuldar at tiles  coordinates 10, 14

Also, this was a first time handling for loops in Pico8 until obtaining something I can really control. It took some time, and I'm sure that it can be perfected, but I'm satisfied with the results for now!

Stay tuned for the next update!

Leave a comment

Log in with to leave a comment.