Closed Silba93 closed 2 years ago
My bad, will be fixed with new update. Sorry about that.
My bad, will be fixed with new update. Sorry about that.
Awesome thank you, I just tested this and yes all frames are now there however my rotworms are still animating way too fast. I did some more testing and here's what I found:
2-frame is a little bit slow compared to cip (bat, wasp, fire elemental etc) 3-frame is good, i can't tell the difference to cip (deathslicer, beholder) 4-frame and 6-frame animate way too fast (butterfly, slime, rotworm)
Frames duration in Object Builder are correct?
Frames duration in Object Builder are correct?
Unmodified spr/dat so I'm going to assume yes? I don't see reference to frame duration in object builder. I believe that is a feature when compiled with "enhanced animations".
So is there like a formula for frame duration on older protocols? Anything based on total number of frames? I have no knowledge about old Tibia so you will have to help me with all the information.
I'm just saying what I see, got no technical knowledge at all about this. Sorry >.<
So is there like a formula for frame duration on older protocols? Anything based on total number of frames? I have no knowledge about old Tibia so you will have to help me with all the information.
I think I've 'solved' it. Finally got the dev version to work so I could mess around :D
Regarding frame duration, I noticed all creature animations have the same "ticks per frame" on cip client so a 2-frame bat would complete 3 rounds of animations in the same time it takes a 6-frame rotworm to complete once. Animation speed is client side at a set speed and not based on number of frames as far as I can tell.
In OTCV8 the "ticks per frame" is in outfit.cpp
line 98 ticksPerFrame = 1000 / phases
which explains why:
Bats are slow (2-frame, 500ms ticksPerFrame) Beholders are ok (3-frame, 333ms ticksPerFrame) - cip client appears to be somewhere around this 300ms range Rotworms are fast (6-frame, 166ms ticksPerFrame)
I have compiled and used ticksPerFrame = 330
and it's very close but not perfect, I have tried anywhere between 300-350 and nothing seems perfect. However close enough(330) is probably acceptable.
I don't know how to implement this properly but hopefully I have enough information here so a proper fix can be implemented.
Comparisons:
LEFT SIDE IS CIP
RIGHT SIDE IS OTCV8 ticksPerFrame = 330
LEFT SIDE IS CIP
RIGHT SIDE IS VANILLA OTCV8 ticksPerFrame = 1000 / phases
Fixed
Tested and confirmed on unmodified latest otcv8, clean 7.72 dat/spr and unmodified nekiro 7.72 tfs On cip client the animations are fine
Happens while idle and also while walking
2-frame animations work fine, outfits and monsters such at fire elemental 3-frame animations skip the 3rd frame entirely and only frame 1 and 2 are shown 6-frame animations do not skip any frames but animate very fast
Here swapped the sprites to make this more clear