Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
frame skip values
#1
Today at work i was thinking about difrent styles of animating attacks hits etc. theres basically two ways of animating in lf2 faster which bassically has less frames, used proper this way can put some force to an attack wchich give it lil more powerfull look. and theres ofcourse smoth animating which requires more frames more effort to end up with sweet smoth animation that impress by just its looks. But prehabs we coulld mix those? if only it would be possible to code more, faster frame skipp values like 0.1, 0.2, 0.3 etc so with faster animation we could add some extra smothnessbetwean frames. im preaty sure it can be done with current frame skip values but im preaty sure it would be way less effective so my question is is that even possible?

Reply
Thanks given by:
#2
Assuming I understood you correctly, you would like to enable float values for the "wait:"-value, right? I am afraid that that's not possible. The reason behind that is fairly simple. LF2 is frame-based. Means: it'll evaluate everything at one frame. In the next frame, it will, once again evaluate everything. There is no inbetween possible, so it wouldn't make much sense to place float values in there at all (not to mention that that's nasty work as well, as the float-type takes up more space than int (usually), so all kind of behind-the-scenes-magic would've to be adjusted as well).

The only thing that would be somewhat helpful is to increase the overall framerate. I.e. 60 fps would allow you something like "half frames". Then again, you can't crank that up too high because at some point, your cpu will probably fry :p


@below: I AM RUNNING ON A 16 BIT PROCESSOR YOUR ARGUMENT IS INVALID
@below's edit: I HAVE PUT TWO PROCESSORS TOGETHER TO MAKE IT 16+16 BIT AND I THINK IT IS TOO OBVIOUS THAT I LIE
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by: hell fightter
#3
(07-03-2014, 03:04 PM)Blue Phoenix Wrote:  as the float-type takes up more space than int (usually), so all kind of behind-the-scenes-magic would've to be adjusted as well).
Not really. 'float' and 'int' both use 4 bytes, across all current systems.
Everything else you said is correct though, so if this is desired, the best bet would be to completely rewrite the engine from scratch (which would be way easier).
Also it would ruin the beautiful cinematic 30fps experience.
Also I think, I broke your fix for the [inv]-tag BP.

Damn you BP!

@bp: Pretty sure that LF2 just wouldn't work on a 16-bit processor, because it is compiled with 32-bit assembly.
Age ratings for movies and games (and similar) have never been a good idea.
One can learn a lot from reinventing wheels.
An unsound argument is not the same as an invalid one.
volatile in C++ does not mean thread-safe.
Do not make APIs unnecessarily asynchronous.
Make C++ operator > again
Trump is an idiot.
Reply
Thanks given by: hell fightter
#4
As BP said, it is impossible to have a 0.5 wait value. The only solution is to increase the FPS. Increasing the FPS, however, can get you into more trouble than you'd imagine:
1-All dvxs, dvys and dvzs will need to be multiplied by a factor (oldFPS/newFPS) for them to work normally.
2-Gravity, friction or any kind of acceleration will need to be multiplied by a factor of (oldFPS/newFPS)^2.
3-All the wait values will have to double (actually added to 1, double, then subtracted by 1).

30 FPS, IMO, is enough for any animation one would do in LF2 styled sprites. A single reason one would want to raise the FPS is to have moving around looks less solid. With the A-Engine, you can change such stuff pretty easily :P (watch out for the release). The game I am currently working on (the one in my signature) works at 60 FPS as well.
[Image: signature.png]
A-Engine: A new beat em up game engine inspired by LF2. Coming soon

A-Engine Dev Blog - Update #8: Timeout

Reply
Thanks given by: hell fightter
#5
(07-03-2014, 03:04 PM)Blue Phoenix Wrote:  Assuming I understood you correctly, you would like to enable float values for the "wait:"-value, right? I am afraid that that's not possible. The reason behind that is fairly simple. LF2 is frame-based. Means: it'll evaluate everything at one frame. In the next frame, it will, once again evaluate everything. There is no inbetween possible ...

Wrong.

Three wait: 0 frames equate one wait: 1 frame.
Thus there is an in between possible.

edit: might only be one ("0.5") and that would only help half the amount of frames required for that time whenever needed.
Reply
Thanks given by: hell fightter
#6
(07-03-2014, 06:00 PM)YinYin Wrote:  
(07-03-2014, 03:04 PM)Blue Phoenix Wrote:  Assuming I understood you correctly, you would like to enable float values for the "wait:"-value, right? I am afraid that that's not possible. The reason behind that is fairly simple. LF2 is frame-based. Means: it'll evaluate everything at one frame. In the next frame, it will, once again evaluate everything. There is no inbetween possible ...

Wrong.

Three wait: 0 frames equate one wait: 1 frame.
Thus there is an in between possible.

edit: might only be one (0.5) and that would only help half the amount of frames required for that time whenever needed.

I've had significant trouble with wait: 0. opoints may not be triggered, for example. That's why I try to refrain from it as much as possible. If it's just for smoother animations, it might be an option. I still don't like it :p
Silverthorn / Blue Phoenix
~ Breaking LFE since 2008 ~

"Freeze, you're under vrest!" - Mark, probably.

» Gallery | » Sprites | » DeviantArt
Reply
Thanks given by:
#7
(07-03-2014, 06:00 PM)YinYin Wrote:  Three wait: 0 frames equate one wait: 1 frame.
Thus there is an in between possible.
What? How?
I believe here is how it works in terms of code:
Code:
void UpdateFrame(){
    if (delaycounter==Frame[current_frame].wait){
        delay_counter=0;
        current_frame=Frame[current_frame].next;
    }else{
        delay_counter++;
    }
}
Correct if I am wrong.
[Image: signature.png]
A-Engine: A new beat em up game engine inspired by LF2. Coming soon

A-Engine Dev Blog - Update #8: Timeout

Reply
Thanks given by:
#8
simple,
wait: 0 isn't interpreted as an actual 0
Reply
Thanks given by:
#9
So what wait: value will have a frame wait for exactly 1 second?

Edit: http://www.lf-empire.de/lf2-empire/data-...characters
Got my answer (wait:29 makes a frame last one second as I thought).

Then either, wait:0 ==1/30th of a second, or LF2 doesn't run at 30 FPS. Supposing its the first, then a (1/30)*3 != (2/30), right?
[Image: signature.png]
A-Engine: A new beat em up game engine inspired by LF2. Coming soon

A-Engine Dev Blog - Update #8: Timeout

Reply
Thanks given by:
#10
I think 3 - but I'm highly unsure about real time relations.
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)