Thread Rating:
  • 5 Vote(s) - 3.8 Average
  • 1
  • 2
  • 3
  • 4
  • 5
The A-Engine: A new Beat 'em Up game engine
#8
(06-02-2014, 03:25 AM)Bat Tamer Wrote:  I just have one question: Will players be able to mash buttons to speed up an animation or through set of moves? If you want a clear example, imagine when you get dizzy in a fighting game... the player has to mash buttons to get out of dizzy faster. Will something like that be able to be programmed in? It's the only thing I am curious about that hasn't been brought up yet.
Yes, definitely. This is how you're going to do it:
    C++-Code:
[f=9] #dizzy start
img=233 delay=3
set_reg=$d$,6   #6 clicks should get you out of the stun
[/f] #goto=9+1
 
[f=10] #dizzy
|FLUSHCOMBINATION|  #this switch clears the input buffer. We need to do this every time we have a combination of only one key.
img=234 delay=5 loop=10, 11, 0 #after ten loops, go to frame 0 if and only the previous frame was 11.
set_combination[
seq=(c<a>) set_reg=$d$, ~$d$>0?($d$-1):0; #decrement d every time attack is clicked until it reaches 0
goto=4321    #4321 is a magic number as I've said before. It basically means go to nowhere if Attack is clicked.
]
[/f] #goto=10+1
 
[f=11] #dizzy
|FLUSHCOMBINATION|
img=235 delay=5 
goto=~$d$==0?0:10;     #check if $d$ is equal to 0. if true, get done with the stun. else, continue until the loops gets you out instead 
set_combination[
seq=(c<a>) set_reg=$d$, ~$d$>0?($d$-1):0; #decrement d every time attack is clicked until it reaches 0
goto=4321    #4321 is a magic number as I've said before. It basically means go to nowhere.
]
[/f]

More elaborated explanation:
The original dizzy state is basically 10 loops going between 10 and 11. You can, however, get out of it by pressing Attack five times. We first start by defining the register $d$ (or any other register) and set it to 6. At the loop itself, we're gonna make a "set_combination[]" tag that takes you nowhere (its goto is 4321), but just decrement the value of $d$ whenever the combination happens. The problem of using a combination component with only one key is that the time interval between the click and itself is always 0; therefore we make sure we clear the key clicks buffer every frame.
You can also see that the goto in frame 11 got a conditional statement: "~$d$==0?0:10;"; if 6 clicks where done and $d$ was down to 0, escape the dizziness and goto frame 0. Else, continue with the loop.
I know it looks a bit complicated now, but it really isn't as complex as what you guys do with the ik8 stuff lol. Remember that you don't have to go through these stuff if you want to do anything within LF2's scope. Once you get used to this, you will see how the A-Engine can be a real beast XD.

I am planning to do a little project here where I am going to work on an A-Engine character and an interactive stage and walk with you guys step by step in the process. I am quite busy nowadays, but I will try my best to start that ASAP.


Also, I was thinking of changing the "set_rect[]" (itr) component and renaming it into set_box[]. After that, I can do some other identical components, "set_ellipsoid[]" and "set_cylinder[]", which instead of having the collision detection range rectangular, can have it in and egg shape or a cylinder. This can get really convenient when tracing platforms which have curved shapes; a hill for example. Ideas? Suggestions?
[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: Rhino.Freak


Messages In This Thread
RE: The A-Engine: A new Beat 'em Up game engine - by A-Man - 06-02-2014, 05:11 AM
A-Engine Supports 3D! - by A-Man - 11-23-2015, 07:40 AM
The A-Engine: Naming Conventions - by A-Man - 01-04-2016, 07:16 PM



Users browsing this thread: 5 Guest(s)