-
Notifications
You must be signed in to change notification settings - Fork 32
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
Add MVP boss fighter #108
Comments
How should I go about defining different attack types? Should each fighter have its attack type or maybe just a wholly different attack logic in the case of bosses. If so, how should this be set in the yaml assets? |
Interesting question, in particular because scripting is in development, which I think it will affect the overall design of the behavior. Considering that:
I'd just define separate logic (systems) for the boss, and in the next milestone, make the attack behaviors customizable (YAML and stuff). |
Yeah, for now since it's MVP and attacks will probably be defined in scripts if we can get that working, I'd say just make the boss essentially the same as the other fighters at this point as far as the YAML definition goes. Any extra logic for attacks should just be defined in plain Rust and we can try to migrate later once we have a better idea of what scripts will be able to do. |
@edgarssilva For the boss attack you can define it similarly to how the |
Re: discussion in discord it seems this may be blocked on sprite assets for the big boss being finished, is that accurate? Do we want to push this off to v0.0.4 @erlend-sh @edgarssilva? |
Since @erlend-sh said in discord that looks fine, as he mentioned, it will spread out the visual updates. |
Ok moving to v0.0.4 |
@edgarssilva are you still working on this? if you have some code sketched, I'll check it out, and try to complete other boss-related tasks in parallel, in a way that it's compatible with your code. |
Yeah just waiting for the sprites, the jump is a bit junky. But didn't worried much sense it would be refractored later. |
A PR from your fork probably make sense. For the most part we haven't been opening branches in the project which IMO feels best so far. That should still allow @64kramsystem to push to your branch if you guys want to work like that on it because of the "allow edits from maintainers" feature in GitHub on pull requests. Not to answer for @64kramsystem on what he wants to do of course! :) |
I'll work in a parallel branch, as I'll work on different tasks (otherwise, I'd step onto @edgarssilva's work). Having a PR is actually convenient, so that if he pushes a new version, I'll be notified, and can rebase. |
With #222 I think this could be done, but there's one more thing we might need to fix: You're able to stand on the boss. 🙃 Also his sound effect for attacking isn't playing. That should be an easy fix, though. |
Also I think the attack hitbox is not right |
We might be able to tweak the attack hitbox easier once #221 gets in, so we should probably rebase + merge that and then do the remaining tweaks for the boss. |
We probably need to load character Hurtboxes from YAML as well, they all use the same sized one currently. |
Yeah, that should fix the fact that we can walk on the boss. More than just determining the Z from the bottom, though, maybe we need to determine the player position from the bottom, too. Because right now the boss attacks with his middle, and that's also how he targets players, so he is essentially trying to cover the player instead of walk up to them. Maybe we need to spawn the sprite bundle as a child of the figher with an offset? I'm not sure if Bevy sprites have a built-in offset option. |
Agree, I was going to say we can also offset hitboxes/hurtboxes which is already in place for attacks, but the targeting point is relevant. |
I feel like Anchor would work perfect. |
Just added the Anchor but now I got some empty space from the sprites so we probably would need to obtain real size values from the assets. |
Oh, good point, maybe we do need to do manual offsets. |
I'm thinking of offsetting the z in the y_sort by half of the sprite height, and probably introducing some Size component or just adding it in the fighter meta. Edit: Just noticed that all colliders sizes are from a constant :/ |
Yep, characters colliders should be moved to loading/defined in YAML but havent yet, thats the Hurtbox I mentioned above. |
Btw found a bug with the hitbox offset where the Y is also reflected based on the facing. I fixed it in this, also should I add the hurtbox in here or leave it for another PR? |
What was causing it?
Up to you, but it should include hurbox offsets for all fighters not just the boss. |
The entire vector was multiplied by -1 instead of just the x. |
I'm thinking of adding a ColliderMeta that can also be reused for the attacks and other cases. Right now I will just assume it's a cube but maybe we can add support for different shapes. |
oops lol |
Unsure if it would be useful. Its extremely common in most 2d/2.5d fighting games/beatemups to use boxes only, although I do think eventaully we will want to be able to define multiple different boxes for a single attack. |
for stuff like this |
Haha that looks cool like that. |
Just submitted #229 to fix the sorting problem and allow to customize the colliders. |
I edited out the image above because one of the character's artwork was not dressed properly. I'm really strict about that kind of of stuff, so it's important for my participation to keep communication channels clear of anything in that direction. |
That's good, thanks. 👍 |
235: Re-enebled boss ai, unique groundslam attack r=odecay a=odecay Continued work for #108 Includes bugfix for the boss' disabled AI as well as some tweaks to the boss attack. Co-authored-by: otis <[email protected]>
235: Re-enebled boss ai, unique groundslam attack r=odecay a=odecay Continued work for #108 Includes bugfix for the boss' disabled AI as well as some tweaks to the boss attack. Co-authored-by: otis <[email protected]>
I noticed that the boss often walks offscreen, any ideas why? I cant remember if we moved fighter positions to be determined at the bottom of sprite or not. |
@edgarssilva did you change fighter positions to be based at the bottom of the sprite? I know we did something to fix the y-sorting and walking on top of the fighter, but I don't remember if we ended up changing the sprite anchor or not. |
We ended up just taking the sprite height in account while doing the y-sort. Basically sorting on the y based on their feet position. |
Ah, I feel like we should be positioning the fighter relative to the bottom of the sprite as well right? That means we are currently positioning based on the center of the sprite which is default bevy, so the boss who is huge can get a big chunk of his body offscreen when moving around. Unsure, but I guess this could cause problems with with how collision boxes are placed currently. Other option might be like setting up some kind of offset based on character sprite size for targeting? Seems less ideal 🤷 Any other ideas? edit: I guess this is almost verging back into the 2d/2.5d/3d discussion again, I guess what is the best solution for now without making a decision on that? |
Yeah, I'm feeling like setting the sprite anchor so that they are rendered above position is the cleanest solution for now. Logically they position themselves with their feet, so I think it makes sense and is easy to do. |
It also causes weirdness with the item pickups it seems. |
It seems like it could be simple to translate the colliders up by half the fighter height, right? |
I think we would have to move hurtboxes to a child entity so they can have their own transform. Could already do that with attack hitboxes since they are already a child entity. |
Yeah, that is why I chose not to move the anchor since it would influence all the collisions. |
Threw a PR up #241 would appreciate eyes |
I think this is complete for now, #242 also came up during boss implementation but its not strictly related to the boss so leaving it for the future. |
MVP Boss fighter should be essentially like any other fighter we currently have with the following changes:
The text was updated successfully, but these errors were encountered: