-
Notifications
You must be signed in to change notification settings - Fork 454
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enemy knockback #1860
Enemy knockback #1860
Conversation
Hmm, I like what you've got so far. Definitely very crude, but it's still improving our boring enemies by a lot. |
I'll work on adding a fluid 'jump' motion for enemies this afternoon. I also want to vary the knockback somewhat so it doesn't end up being too boring and predictable. As far as variation, should we have different weapons inflict different amounts of knockback, or should we have different enemies react to being knocked back differently? Both? |
I think both would be pretty cool |
Different weapons inflicting different amounts might cause slight problems though. If we're considering 'heavier' weapons to inflict more distance, the player will just be able to button mash enemies again since the main disadvantage of those weapons is the slow speed. On another note, maybe we can consider having 'combo' attacks? If the player hits them twice in a row in a certain time interval, the enemy is knocked back further? That might be a bit too complicated though, so just spitballing ideas here. |
@didory123 I'm thinking it would be better for weaker weapons, like the switch and projectiles, to have a smaller knockback than normal, rather than stronger weapons having a bigger knockback. |
The updated version has a significant delay after damage before the knockback effect, which I don't want but can't figure out how to eliminate. Someone with more experience working with the animation code mind taking a look? The 'combo' effect that @didory123 mentioned ended up being included as an unintended side effect. Double punch some hippies and watch them go flying! |
Knockback on flying and falling enemies behaves as midair horizontal motion. I made a separate issue, #1886, to track the problem with hitting enemies midair since this bug is also present in the master branch. |
LGTM |
Actually, with this pull, it's almost impossible to be killed by enemies when you have a weapon. Since our attacks have almost zero delay between then, you can just button mash and push the enemies away and let them come to you. |
I halved the default value of the weapon knockback, added the option to set each weapon's knockback, and removed the combo effect from enemies. I also set the punch knockback to trigger only when player.punchKnockback is true. I figure we can use that for an item like a kickpuncher glove to give punches the power of kicks. This should be ready to merge, as long as @didory123 approves of the new knockback values. |
Just a few minor things: I think that we should increase the weapon knockback value a tiny bit more. Hopefully when #1895 is fixed, it'll make the knockbacks smoother and better. Also, when attacking an enemy from behind, the enemy should turn around to face the player and then get pushed back. Otherwise, everything else looks really good and ready to merge. Awesome job! |
It's pretty clean as is. Only question: do all weapons currently give the same knockback distance? |
Currently, all weapons use the default knockback (I'm going to boost it again slightly from 10 to 12) If the weapon has a knockback property, it will use that value instead. |
@bucketh3ad Any more headway on this? |
I call merge as we're at the stage of messing around with slight number changes just to get some physics. Most of all the code we'll likely need is in. As for the enemy turning around... why? When you push someone from the back do you expect them not to fall on their face??? Edit: Jumpkill might need some tweaking to not just trampoline an enemy. |
@daniwa bucket actually convinced me of not doing the turning around thing way before, so I'm fine with not having it. As for the values, I'm actually not too passionate about it either I just want to get this thing in soon. Merge? |
jumpkill knockback? or would that be weird. |
@daniwa bucket says it looks weird, so he didn't do it. We can change individual enemy behaviors when being jumpkilled though |
Then merge it! |
I played some more, and I think 10 works fine as a default. We can always adjust it later if we want. This is ready to merge. |
Closes #1800
To do before merging: