finalburnneo / FBNeo

FinalBurn Neo - We are Team FBNeo.
http://neo-source.com
Other
917 stars 362 forks source link

Can't perform half circle forward and half circle back in some game #1769

Closed theanhlk95 closed 1 month ago

theanhlk95 commented 4 months ago

Whern I'm using Daimon, Clark or the charaters which have these command, the super moves doesn't come out as I expected, always miss input in some games like KOF 2002, SFA3 and SVC Chaos.

kounabi22 commented 4 months ago

try them with keyboard and see if the result are same.

theanhlk95 commented 4 months ago

try them with keyboard and see if the result are same.

Already tested on my keyboard and hitbox.

barbudreadmon commented 4 months ago

I was having an interesting discussion on discord, it seems those games won't accept half-circles if you go directly from down-left to down-right, down must be the single key pressed in between. Kinda similarily to 4-way controls ?

barbudreadmon commented 4 months ago

Ok, so it turns out a "hitbox" is actually a keyboard.

@crashGG this regression is happening on all keyboard devices due to the change you requested in https://github.com/finalburnneo/FBNeo/pull/1623, the old code where left & right were cancelling each other was making things easier for having a "singled-out down"

crashGG commented 4 months ago

what is "singled-out down" ?Can you explain it a little more clearly?

barbudreadmon commented 4 months ago

"only down" ?

crashGG commented 4 months ago

Whern I'm using Daimon, Clark or the charaters which have these command, the super moves doesn't come out as I expected, always miss input in some games like KOF 2002, SFA3 and SVC Chaos.

Whern I'm using Daimon, Clark or the charaters which have these command, the super moves doesn't come out as I expected, always miss input in some games like KOF 2002, SFA3 and SVC Chaos.

Can you please specify which move for which character? As far as I know, some series of kof, such as kof98 and kof2002, have very strict judgment on moves. Optimize code has indeed improved some moves after testing, but it is not omnipotent. Maybe you can try changing the emulator to an old version of fbn, or mame, and compare the result which before adding Optimize code.

theanhlk95 commented 4 months ago

Whern I'm using Daimon, Clark or the charaters which have these command, the super moves doesn't come out as I expected, always miss input in some games like KOF 2002, SFA3 and SVC Chaos.

Whern I'm using Daimon, Clark or the charaters which have these command, the super moves doesn't come out as I expected, always miss input in some games like KOF 2002, SFA3 and SVC Chaos.

Can you please specify which move for which character? As far as I know, some series of kof, such as kof98 and kof2002, have very strict judgment on moves. Optimize code has indeed improved some moves after testing, but it is not omnipotent. Maybe you can try changing the emulator to an old version of fbn, or mame, and compare the result which before adding Optimize code.

That's the command of double half circle forward and double half circle back. I'm already tested on old version of FBNeo and MAME and I have no problem performing these moves. Only after Optimize code was added, I can't perform these command anymore. So the code work well for stick but I'm having problem for keyboard or hitbox.

barbudreadmon commented 4 months ago

Maybe you can try changing the emulator to an old version of fbn, or mame, and compare the result which before adding Optimize code.

He did it already, it was discussed on discord.

What happened before your change is that the following movement was working :

Now it became the following which doesn't work :

I'm considering removing that change you requested if we can't find a better solution, especially after learning that what you requested has been forbidden in competitive versus fighting (source)

taoenwen commented 4 months ago

(source)

Just to address this point from Capcom, I think Capcom is trying to justify itself, the keyboard or hitbox was born before sf6, unless sf6 developers know nothing about sf, or sf6 developers know nothing about keyboards or hitboxes, sf6 developers should have addressed this shameful issue from the end of the program they developed themselves, instead of blaming users for purchasing the device in advance, and letting Capcom think that it's a belated cheat after the release of sf6, and that everything is right or wrong, but also prioritized.

taoenwen commented 4 months ago

It seems like this problem shouldn't happen, and even if it did (left + down + right) being pressed at the same time, only the opposing vertical keystrokes would be canceled, and (down) would be preserved, rather than all inputs being canceled.

N = unprocesse; C(x) = cancel L/R or U/D;

[Input] L > L+D > L+D+R > D+R > R

[process] N N C(L&R) N N

[return] L > L+D > D > D+R > R

The only situation I can think of that would produce a loss of the (down) input would be if the (left+right+down) input occurs without retaining the (down) input. Clear only the opposing key inputs that were pressed at the same time, while retaining the only other input (and only one possible).

barbudreadmon commented 4 months ago

I agree capcom's decision might be biased, hence why i'd prefer improving this feature instead of removing it.

The perfect solution might be this :

dinkc64 commented 4 months ago

Off topic rant: I just want to let you all know, that all of these bug reports are getting me down (not this one specifically), and there is nothing I can do for 99% of them. I can't make everyone happy, its impossible.

barbudreadmon commented 4 months ago

@dinkc64 don't worry about that clear opposite thingy, it's on my todo list since i wrote the current impl.

dinkc64 commented 4 months ago

Oops, I meant regarding every other bug here, the fact that I replied to this bug was an error on my part

crashGG commented 4 months ago

s4-240510-210507

Yes, play samurai shodown IV neogeo CDz version,enter practice mode ,Can print keyboard input on the screen.

crashGG commented 4 months ago

After checking and improving the code, the issue was fixed.

s4-240513-123552

Now, when I press L+D+R simultaneously in a semicircle,no longer lose any key.

barbudreadmon commented 4 months ago

It should be ok with https://github.com/finalburnneo/FBNeo/commit/6cb160d68e5cc5bd3a141dfed610315b2962143e

crashGG commented 4 months ago

After testing, the main problem was indeed solved. However, I found that when typing quickly L-D-R, there is still a certain chance that the D key will be lost. s4-240513-193657 On 05-13-2024, GSC2007 updated the latest keyboard optimization code in ppxclub.Its purpose is to solve the problem of key loss caused by direct switching in oblique directions in some cases. (for example when the arcade joystick is switched from ↙ to ↘, it will definitely be ↙-↓-↘, but there is a certain probability that the keyboard input may be ↙-↘). This way keyboard players can further improve their success rate. I paste the code below for reference.

crashGG commented 4 months ago

inline static void NeoClearOpposites(UINT8 nJoystickInputs,UINT8 nJoystickInputs_previous,UINT8 nJoystickInputs_previous_lr,UINT8 nJoystickInputs_previous_ud) // GSC2007 add { //*****GSC2007*part1** if((nJoystickInputs & 0x0C) == 0x0C) { nJoystickInputs &= nJoystickInputs ^ nJoystickInputs_previous_lr;//press left+right,remove the interference in nJoystickInputs_previous_lr to obtain the actual required corrective input } else if(nJoystickInputs & 0x0C) { nJoystickInputs_previous_lr = nJoystickInputs & 0x0C; //Only record the input when left and right are NOT pressed } if((nJoystickInputs & 0x03) == 0x03) { nJoystickInputs &= nJoystickInputs ^ nJoystickInputs_previous_ud; //See above } else if(nJoystickInputs & 0x03) { nJoystickInputs_previous_ud = *nJoystickInputs & 0x03; //See above } //*****GSC2007*part1**

//origin code if ((nJoystickInputs & 0x03) == 0x03)
nJoystickInputs &= ~0x03; if ((nJoystickInputs & 0x0C) == 0x0C) nJoystickInputs &= ~0x0C;
//origin code

//*****GSC2007*part2** if (((nJoystickInputs | nJoystickInputs_previous) & 0x0C) == 0x0C) nJoystickInputs &= ~0x0C; //When switching left and right, the first frame is mutually exclusive if (((nJoystickInputs | nJoystickInputs_previous) & 0x03) == 0x03) nJoystickInputs &= ~0x03; //When switching up and down, the first frame is mutually exclusive

//*****GSC2007*part3**fix direct switching in oblique directions

            if (((*nJoystickInputs & 0x0F) == 0x06)        &&((*nJoystickInputs_previous & 0x0F) == 0x0A))
                    *nJoystickInputs &= ~0x0C; //when direct switching ↙ - ↘. fix to  ↙-↓-↘
            if (((*nJoystickInputs & 0x0F) == 0x0A)        &&((*nJoystickInputs_previous & 0x0F) == 0x06))
                    *nJoystickInputs &= ~0x0C;  //See above
            if (((*nJoystickInputs & 0x0F) == 0x05)        &&((*nJoystickInputs_previous & 0x0F) == 0x09))
                    *nJoystickInputs &= ~0x0C;  //See above
            if (((*nJoystickInputs & 0x0F) == 0x09)        &&((*nJoystickInputs_previous & 0x0F) == 0x05))
                    *nJoystickInputs &= ~0x0C;  //See above

            if (((*nJoystickInputs & 0x0F) == 0x05)        &&((*nJoystickInputs_previous & 0x0F) == 0x06))
                    *nJoystickInputs &= ~0x03;  //See above
            if (((*nJoystickInputs & 0x0F) == 0x06)        &&((*nJoystickInputs_previous & 0x0F) == 0x05))
                    *nJoystickInputs &= ~0x03;  //See above
            if (((*nJoystickInputs & 0x0F) == 0x09)        &&((*nJoystickInputs_previous & 0x0F) == 0x0A))
                    *nJoystickInputs &= ~0x03;  //See above
            if (((*nJoystickInputs & 0x0F) == 0x0A)        &&((*nJoystickInputs_previous & 0x0F) == 0x09))
                    *nJoystickInputs &= ~0x03;  //See above

}

barbudreadmon commented 4 months ago

Well, my goal was only to fix the regression from the previous change you requested, the user still has to press either D (or L+D+R) as it used to be. As for further facilitating keyboard usage, i'd rather not, i'm still wondering if capcom is wrong and the change you requested a few months ago is fine, it seems to give an unfair advantage for charges to keyboard users.

taoenwen commented 4 months ago

i'm still wondering if capcom is wrong and the change you requested a few months ago is fine, it seems to give an unfair advantage for charges to keyboard users.

The biggest cheat that exists with the keyboard or hitbox is the two opposite arrow keys being pressed at the same time, which may help some Charged type characters gain extra Charge's time in the game. This is exactly what you have already done, and in our emulator these cheats will not be possible, so you have done a very good job.