Thread: Target Renegade
View Single Post
Old 27 August 2021, 20:08   #24
Havie
Registered User
 
Havie's Avatar
 
Join Date: Mar 2012
Location: UK
Posts: 1,895
Update 2

After lots of back and forth, managed to align the punching and kicking frames. I tried getting Blitz to flip them horizontally but as they are of different widths, this doesn't work, so did it manually in DPaint. Also, I can use the animation function in DPaint to check them.

Punching and kicking now in the game but overnight had a thought about how to implement it more efficiently. Originally, I just had the correct frames in order as shapes and played them sequentially, adjusting their position as needed. But as some frames repeat, either I was wasting space having identical frames of tying myself up in knots using if statements to test which frame needs to be printed.

Instead I have decided to store each sequence of frames as numbers in a 2d array and link the array to the variable p_state (which holds the current state of the player i.e. 0=standing still, 1=walking, 2=punching etc.). If needed I can also add a variable to control the speed of the animation at the beginning of each array (Swainy is my guide in this).

So tonight, I will re-implement this animation system and see how it goes.

Just in case you are interested, Swainy completed an animation guide for me 15 years ago and you can see it below. Pretty sophisticated amount of graphics for a Speccy!


Last edited by Havie; 28 August 2021 at 00:39.
Havie is offline  
 
Page generated in 0.05288 seconds with 11 queries