Open NeonSRB2 opened 3 months ago
Note that I originally wanted to add the Bloominator, but the only reference for how that object works is the skdisasm, and I'm far too stupid to understand largely undocumented assembly code.
An extra thing in that last commit was a small typo fix in Corkscrew.gd, "implament".
Hopefully that's fine to do here despite the much more specific focus.
heh, sorry about that. I had started this branch and started working on this with the intention of making a very malleable caterkiller but then I didn't get as deep into it as I wanted. I'll give this a look and approve as long as it meets the level of accuracy I'm expecting and passes some tests I intend to run on it.
I'll give this a look and approve as long as it meets the level of accuracy I'm expecting and passes some tests I intend to run on it.
Big stuff is the lack of a table for the vertical animation (not just linear animation!!), and that all the segments bounce in sync upon scattering, unlike testing I had done in a small romhack I did, I'll post a comparison soon but there's general inconsistency and I can't really use blastem's debugger good enough to extract nice info like this.
Smaller stuff is the segments, which detect floors by themselves instead of a table, on one hand Sonic Retro lists this as an optimization, on the other hand every segment turns as soon as they leave ground, so if a floor is somehow removed... they'll probably start having all the segments facing the other way and move backwards or something.
An interesting quality of Caterkiller in OG Sonic 1 is that if it hit a moving platform or something there actually was a real possibility of its segments splitting up when some of them hit a wall after the head didn't.
Honestly not 100% sure how desirable that is, but that's probably how it should work since I can't think of a better way to resolve that issue off the top of my head.
So, testing this, I have a couple of issues out of the gate. Depending on when you jump on or roll into the caterkiller, you still take damage even if hitting the head perfectly. Secondly, the caterkiller doesn't interact with floors at all unless it's put right on one from the start. Ideally, it would fall to or snap to a floor instead or potentially floating in the air.
caterkiller branch doesn't contain any caterkillers 0/10
Self-explanatory name, and he's placed in Base Zone Act 2.
The separate segments are put into the same space as the parent node as separate objects entirely, since the segments can't be animated horizontally just using an AnimationPlayer node, and therefore vertically since you can't only animate one axis. Ideally it could still be attached to the parent and move via script, but since all of the sonic retro docs pretend I can't do that i might as well not.
One actual change though outside of just the enemy is making Hazard.gd a class (named Hazard), since the segments need to modify that logic a little to activate the scattering. I feel like it's important to say this here since it technically affects Orbinaut's code, but nothing had to be changed to support this new class.
The Caterkiller's motion and velocity values are not adjusted for delta, since I can't be bothered when it's supposed to be stuck in _physics_process() anyway. Regarding
the AnimationPlayer again, to move the segments it uses a "state" system to determine which set of speeds to use from Sonic Retro, unfortunately the states are animated outside of the script for now, and are placed slightly before they're supposed to to prevent desynching the parts. I'll probably be replacing this behavior soon.The node in question is gone and state timing is handled in-script.One more extremely minor thing, there's a big fixed when the Caterkiller is killed before scattering that removes the previous segments the frame after it dies, usually resulting in the player getting hit trying to kill it. This is technically fixed in this implementation, but another issue seems to have similar behavior originating from the badnik code itself anyway.