Is it possible to use multidimesional areays to set the movement animation for a sprite sheet? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

Is it possible to use multidimesional areays to set the movement animation for a sprite sheet?

c++. thinking of setting each image in my sprite(3 by 5 images) to and array to show animation while walking. anyone done this or is it possible?

23rd Jan 2017, 3:54 AM
Joey
Joey - avatar
1 Answer
0
You could simply make a standard array to hold images and the increment/loop the array to play the animation. Though, when I gave it some thought, you COULD make a 2D array to store your different animations as: array[animation to call][animation to play] So you can have "walking", "running", and "jumping" for example set for the first array and have the second array filled with the animation. Hope this input helps, #gamedevforlife
11th Feb 2017, 6:33 AM
James Burton
James Burton - avatar