* *
Welcome, Guest. Please login or register.
Did you miss your activation email?
January 22, 2018, 09:09:02 AM

Login with username, password and session length

problem with fastattack 1

  • 7 Replies
  • 438 Views
*

Offline brikinhos

  • Jr. Member
  • **
  • 9
problem with fastattack 1
« on: December 14, 2017, 09:51:22 AM »
Hi all, I'm moding and improving an OpenBor game that uses fastattack 1 in every attacks. When two players hit an enemy at the same time with a normal attack both players deal 10 or more hits each one, but if I delete fastattack 1 only one player can hit an enemy when they attack at the same time. I want both players can hit the enemy at the same time without stop normal combo but not dealing tons of hits.

Can anyone explain to me how fastattack works and how to fix it? Thanks too much.

*

Online Damon Caskey

  • Administrator
  • Hero Member
  • *****
  • 1837
    • DC Current
Re: problem with fastattack 1
« Reply #1 on: December 14, 2017, 11:41:23 AM »
Can anyone explain to me how fastattack works and how to fix it? Thanks too much.

To explain this properly, I need to get a little technical.

The OpenBOR engine updates itself ~250 times per second. That's GAME_SPEED.

When an attack "hits", all that really happens is during an update the engine discovered the coordinates for an attack box were overlapping with coordinates from the target's body box. A "hit" is registered and depending on various other factors the target loses hit points, goes into a pain animation, and so on. You can probably already see one issue - for good reason, most animations are much slower than the engine's update speed. There might be 50 or more engine updates before a punch retracts from someone's face, and if the engine registered a hit on each one, the target would almost always die instantly from every little jab.

To solve this, each hit detection is given an ID which is then used with a complicated series of checks to ensure one hit is one hit. The target is also given a small amount of invincibility (Game Speed / 5), meaning that for around 50 updates, the target is safe from another hit. However, if you have an animation that has multiple hits in it, and the animation is very fast, some of the hits might miss. To allow quicker consecutive hits in the same animation, Fastattack reduces the invincibility time of the target on hit to (Game speed / 20), that is to say, about 12 updates of invincibility. That's about 0.05 of a second in real time. If you like, you can adjust this manually to make it even faster.

Quote
I want both players can hit the enemy at the same time without stop normal combo but not dealing tons of hits.

Technically you can't. Unless an application is multi-threaded, it processes one event, at one time, and that's it. When you see simultaneous hits in games, it is from programing or other tricks made to create that effect by putting the single events together as one on screen occurrence after they happen. OpenBOR can do this too, but we need to know exactly what you're trying to pull off first.

DC
Projects in progress are now available here: https://github.com/DCurrent

*

Offline brikinhos

  • Jr. Member
  • **
  • 9
Re: problem with fastattack 1
« Reply #2 on: December 15, 2017, 09:02:18 PM »
Thanks so much! Your info has been usefull, I changed the time of delays of attacks to 6 and it works, and using fastattack 1. If I attack with 3 players at the same, just 3 attacks are dealt, not 20 like before. Thanks again!.

*

Offline nestoracebo

  • Jr. Member
  • **
  • 3
    • Con 5 Duros
Re: problem with fastattack 1
« Reply #3 on: January 10, 2018, 06:25:09 PM »
Can anyone explain to me how fastattack works and how to fix it? Thanks too much.

To explain this properly, I need to get a little technical.

The OpenBOR engine updates itself ~250 times per second. That's GAME_SPEED.

When an attack "hits", all that really happens is during an update the engine discovered the coordinates for an attack box were overlapping with coordinates from the target's body box. A "hit" is registered and depending on various other factors the target loses hit points, goes into a pain animation, and so on. You can probably already see one issue - for good reason, most animations are much slower than the engine's update speed. There might be 50 or more engine updates before a punch retracts from someone's face, and if the engine registered a hit on each one, the target would almost always die instantly from every little jab.

To solve this, each hit detection is given an ID which is then used with a complicated series of checks to ensure one hit is one hit. The target is also given a small amount of invincibility (Game Speed / 5), meaning that for around 50 updates, the target is safe from another hit. However, if you have an animation that has multiple hits in it, and the animation is very fast, some of the hits might miss. To allow quicker consecutive hits in the same animation, Fastattack reduces the invincibility time of the target on hit to (Game speed / 20), that is to say, about 12 updates of invincibility. That's about 0.05 of a second in real time. If you like, you can adjust this manually to make it even faster.

Quote
I want both players can hit the enemy at the same time without stop normal combo but not dealing tons of hits.

Technically you can't. Unless an application is multi-threaded, it processes one event, at one time, and that's it. When you see simultaneous hits in games, it is from programing or other tricks made to create that effect by putting the single events together as one on screen occurrence after they happen. OpenBOR can do this too, but we need to know exactly what you're trying to pull off first.

DC


Hi, I am working with Brikinhos in the same game, First of all I have to say that the solution that we tried changing the delay of the attack did not work.

The main problem is that we don't quite understand how Hitboxes work in openbor. For example when I attack an enemy playing 1P with a maintained attack that last 20 frames, it only hits enemy once (this is correct), but our problem is that if 2 players (or more) are attacking at the same time, and if we use these kind of attacks (with Fastattack Activated) the same attack (same hitbox) hits the enemy several times, it is like if the hitboxes did not have an unique identifier.

 The enemy that takes damage only can "know" wich attack hitbox has been the last one hitting him, what we would want to achieve is that even if another player hits an enemy, the previous hitbox that has already hit it should not be able to hit the enemy again.

Is this possible? And if nowadays this is impossible, which part of Openbor Code Should we check in order the reprogram it, and compile a new modified Openbor version?

Thanks in advance!

*

Offline O Ilusionista

  • Global Moderator
  • Hero Member
  • *****
  • 5138
  • >> I WILL BE AWAY FOR SOME TIME <<
    • BMT - Brazil Mugen Team
Re: problem with fastattack 1
« Reply #4 on: January 10, 2018, 07:23:30 PM »
Quote
which part of Openbor Code Should we check in order the reprogram it, and compile a new modified Openbor version?
This is not how things works here. You can't simply jump into the source, change it and compile a "custom version" (and I am aware you like to do "custom versions").

Any change in the engine needs to be discussed with the devs, and approved by Damon Caskey.
« Last Edit: January 10, 2018, 07:29:30 PM by O Ilusionista »

*

Offline nestoracebo

  • Jr. Member
  • **
  • 3
    • Con 5 Duros
Re: problem with fastattack 1
« Reply #5 on: January 11, 2018, 10:28:48 AM »
Quote
which part of Openbor Code Should we check in order the reprogram it, and compile a new modified Openbor version?
This is not how things works here. You can't simply jump into the source, change it and compile a "custom version" (and I am aware you like to do "custom versions").

Any change in the engine needs to be discussed with the devs, and approved by Damon Caskey.

I don't know what is exactly your problem I already told you that I contacted Pierwolf before I released Super Final Fight Gold Plus LNS Edition, and that he has no problems with it, not a strange thing taking in acount that this MOD is simply the Best Openbor ever made, maybe you prefer to fight against haundred of Kim Kapwhans with the worst control that you can ever imagine, bus that's your problem.

And if Openbor is opensource, you can say what ever you want but I can modify and compile what ever I want, we are not here to make any money, we are just trying to create the best game that we can in order to let the community enjoy it. Maybe the problem is that you don't really enjoy good games, but please that's only your problem, do not make all the community to suffer for it.
« Last Edit: January 11, 2018, 10:30:31 AM by nestoracebo »

*

Offline O Ilusionista

  • Global Moderator
  • Hero Member
  • *****
  • 5138
  • >> I WILL BE AWAY FOR SOME TIME <<
    • BMT - Brazil Mugen Team
Re: problem with fastattack 1
« Reply #6 on: January 11, 2018, 11:33:36 AM »
Nestoracebo, let me be plain direct:

1- “I don't know what is exactly your problem I already told you that I contacted Pierwolf before I released Super Final Fight Gold Plus LNS Edition, and that he has no problems with it” I HIGHLY doubt about this information, but if he has nothing against it, neither I do. But I will wait for his reply before putting that topic back. Do not post it again, please.

2- “ that this MOD is simply the Best Openbor ever made” I so agree with you.

3_ “maybe you prefer to fight against haundred of Kim Kapwhans with the worst control that you can ever imagine, bus that's your problem.”

“Maybe the problem is that you don't really enjoy good games, but please that's only your problem”


Please, take note that I never had disrespected you, so I would like to ask you to watch your tone. Attacking people from the Core Team (as I am) can results in banning. I would hate to do it, but I will if it’s needed to, so consider yourself warned.

4- “And if Openbor is opensource, you can say what ever you want but I can modify and compile what ever I want” Of course. But we like to work as a TEAM here, not “I do things whatever I want to”. You are not the first person to try to jump at the source code, “improve it”, release a fork by personal reasons instead of helping people to improve the whole thing.

5- “do not make all the community to suffer for it.”  Is exactly what I am trying to not let happen. As I said above, we are a team here. Almost a family. So we like to help each other - instead of “I do whatever I want to”. Like one of the Devs said, “People doing right get full community support. People doing wrong get nothing. If someone from the community jumps in I won't stop them, but I'm not lifting a finger.”

And I agree with him 110%.

So, to make things short: if you are here to work as a team, helping the community to grown and to improve things for everyone, you are more than welcome here, really. Otherwise, your boat won’t float here, sorry.

*

Offline Don Drago

  • Full Member
  • ***
  • 51
  • LOLWTFHITS?
Re: problem with fastattack 1
« Reply #7 on: January 11, 2018, 07:42:18 PM »
I don't know what is exactly your problem I already told you that I contacted Pierwolf before I released Super Final Fight Gold Plus LNS Edition, and that he has no problems with it, not a strange thing taking in acount that this MOD is simply the Best Openbor ever made, maybe you prefer to fight against haundred of Kim Kapwhans with the worst control that you can ever imagine, bus that's your problem.

And if Openbor is opensource, you can say what ever you want but I can modify and compile what ever I want, we are not here to make any money, we are just trying to create the best game that we can in order to let the community enjoy it. Maybe the problem is that you don't really enjoy good games, but please that's only your problem, do not make all the community to suffer for it.

Oh  :-\ .

Well, I'll have to scrap the idea I would give to Pierwolf to let me add one boss to complete Final Fight 1~2 roster (Belger), add Evil Ryu and Violent Ken (so the game matches Ultra Street Fighter II), fix memory issues and Rename it to Ultra Final Fight Gold, then   :-\ .

 

Recent

Members
  • Total Members: 6914
  • Latest: xjlvcx
Stats
  • Total Posts: 48030
  • Total Topics: 3296
  • Online Today: 38
  • Online Ever: 316
  • (January 04, 2013, 09:43:02 AM)
Users Online
Users: 2
Guests: 24
Total: 26