Run, Walk, Jump, Idle of a Sprite

I have a small dino figure I’m using for a game. The collection of images offers multiple actions for the little guy. What I’m trying to understand is how to add these all in and categorize them correctly. From what I can tell I’m looking to first create a sprite type of Dino and then I want to add sprites for walking running… How do I switch from one action to another? How do I switch from idle to walking? I’ve found some helpful videos on YouTube that have gotten me to move the dino but I can’t figure out how to change from the collection of images.

Use a timer. Each time it fires change the image from walking to running to walking to running and so on.

1 Like

Yes, I’m using a timer and that works perfect for things so far. But should I have a sprite type of dino with different collections of images below it like running and walking?

Yes. Have at least two, one standing still and the other in motion.

Then you can switch between them each time the clock fires. This will give the illusion of motion.

You can have more than two as well, each one should be of the dinosaur in a different movement state. This will make it appear even more realistic.

1 Like

Do you have an example I can look at? I’m having a hard time understanding how to add the images correctly.

Actually, we might not be talking the same thing. I already have multiple images uploaded for when dino walks. When a button is pressed I cycle through the images with a clock and he looks like he is walking. What I’m trying to figure out is how to switch to another action. How do I switch from the walk collection to the run collection?

I must be missing something here so let me post some pictures. Right now what I have is two different sprite types. One for walking and another for idle. I’m pretty sure this is not the correct way to do this but I’m giving it a shot in hopes that someone can correct me. As the walk sprite type moves I’m updating the idle one in hopes that they will be in sync.


What you are looking for is this:

image

With this block, you’ll only need one sprite. However, the sprites have to have different modes.

So your sprite can be idle at the beginning. After one second, it could go to a walking position. After one second it could go to a running position. Of course, this is just an example, so you can build upon this idea.

image

I think I’ll have to record a video to explain what I’m trying to do because it is not coming across correctly to everyone. Before I do, let me list the page where I got my images from.

Please look at this link. Notice that there are many images for each action. So when the dino is in idle state there should be 10 images cycling to have the dino look alive while standing.

Now when I press the left or right buttons I need the walking images to be used. Same thing for running and dieing.

Does this make more sense now?