helper based command buffer.

Started by Bastard Mami, August 07, 2008, 08:12:38 PM

Previous topic - Next topic

Bastard Mami

so, basically after a few other gameplay related bugs caused because the way mugen handles input I think a helper based command buffer is needed. Stuff, like reversing, bufering and proper triggering should be supported by it.

Reversing: in kof and maybe other fighting games when p2 is behind you, your commands get reversed, while in mugen you have to wait until your character turns.

Buffering: there are two sides to this, one is that once a command has been inputed it does not trigger immediately, but rather, N amount of ticks pass before the command actually triggers. the other side is that mugen buffers commands in hitpause, while that is fine and dandy, the problem comes when you let go the command and mugen still wants to buffer it.

In my cmd files, I normally use the command as the triggerall, as I believe it to be the best practice.

triggerall = command = "x"

now for ai I implemented something like this:

triggerall = (ai=0 && command = "x" ) || ( ai=1 && helper(X), stateno ="x" )

which works dandy.

Right now I am just posting the general idea, I will try to keep on posting more about this later (especially code) but contributions are very apreciated, because of other problems/options that you want to solve via command buffer.

PotS

The only issue I've ever had with letting a helper handle inputs, as I told you just a while ago, is letting such an important part of the char be handled outside of its own coding.  A workaround for that could be only letting it up to the helper if it is indeed present in (numhelper) and use Mugen's own command buffering otherwise (!numhelper), to ensure your char does not lose the ability to react to commands for whatever reason.

Still, handling commands by helper is something I'd only trust if it were absolutely vital to gameplay.


Quote from: Shinra Sama on August 07, 2008, 08:12:38 PM
Reversing: in kof and maybe other fighting games when p2 is behind you, your commands get reversed, while in mugen you have to wait until your character turns.
True for the Capcom family as well.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.

Bastard Mami

I see, so one of the requisites is to put the helper creation code in st-2, so whenever the helper gets killed it just appears again.

Bastard Mami

boring.


in the cmd commands
Quote
Triggerall    = command = "a" && (helper(100000),command != "holddown")

right where the cmd starts

Quote[statedef -1]

;helper for command check

[State esp]
Type = Helper
Trigger1 = !NumHelper(100000)
helperType = normal
name = "command check"
ID = 100000
pos = 0,0
posType = p1
facing = 1
StateNo = 100000
keyctrl = 1
ownpal = 1
supermoveTime = 65535
pausemoveTime = 65535
size.xscale = 1
size.yscale = 1
size.ground.back = 21
size.ground.front = 14
size.air.back = 16
size.air.front = 18
size.height = 1
size.proj.doscale = 1
size.head.pos = -6,-5
size.mid.pos = -5,-62
size.shadowoffset = 1

in the end of the cmd file, as to edit the less amount of files possible:

Quote[statedef 100000]
anim = 100000
ctrl=0

;helper for command check

[State esp]
Type = null
Trigger1 = 0

in the air file to avoid clonning.

Quote;helper for command check

[Begin Action 100000]
-1,00, 0,0, -1

I still need to test in a gamepad, in the keyboard ir works properly.

PotS

I think it just needs a Turn sctrl in the helper's state to make it always face the same direction as the player, so that holdfwd and holdback mean the same for both.
Could also do like Winane did in his AI code and add a changestate in the cmd that locks the helper to its proper state, just in case.
You can help with Ikemen GO's development by trying out the latest development build and reporting any bugs on GitHub.
My Mugen and Ikemen content can also be found here.

-SyLar-

sorry to revive a month old topic but how exactly did you plan on sorting out that reversing problem?