NokiMo
Megan Fox
Megan Fox

patreon


Falling Down In December

Ok, if you want the general dev update, just scroll to the bottom. For now, let's talk about safely falling!

Falling Down

One of the oddest problems in a skateboarding game is safely transitioning from being a skateboard, to being a body rolling around on the ground. Running your skater as a live ragdoll really isn't an option due to the jitter it introduces, and as a replacement to that, you're likely doing a lot of stancing logic that leans your skater around to try and avoid obstructions. As a direct result, your skater can be in a position where they're still skating and visually ok, but if you popped them off the board, their collisions would be inside a wall. This way lies ragdolls with legs stuck in fences that then jitter and explode.

This is an even more severe problem with SkateBIRD, because we don't have a ragdoll. We dropped that (because exploding bird ragdolls were horrifying) in favor of 2 rolly-polly colliders. Fewer colliders mean that if even one ends up in an invalid position and falls out of bounds? You're probably toast. Then add on there that Unity's PhysX collisions have a quick that if you enable a collider inside another collider, that collision is just ignored. It doesn't push the collider out, it just... ignores it.

So! How do we solve this? We do it proactively. I run a constant collision sweep around the bird, which if visualized turns the bird into a pingpong ball. Based on that, I determine if the current space is a safe space. If it is, I save it as a valid bail point. If it isn't, I run a second pass where I nudge the pingpong ball forward or back (relative to bird facing), because the most common collision case involves the bird's belly or butt scraping a wall. If moving it there gives me a safe space, then I save that spot as a valid bail point - which means there will be a slight discontinuity if I bail right then, but you tend not to notice.

If NONE of these spaces are valid, then I just don't update the bail point. The bail point is actually a literal transform that follows you around, that I can visualize. When you bail, you teleport there, wherever it is. It isn't childed to the skateboard, it's just an absolute position, which means I can smoothly bail at any time, no matter what the skateboard is doing, and at least in general, it'll look good.

Of course all of this logic stacks on top of the bird leaning I'm already doing. The sphere is centered on wherever the bird is leaned at the time, so if the bird is leaning away from the wall already, then the check-sphere starts leaned over like that, which makes all of this that bit more likely to work. It's... a lot. Just glad it works now!

Oh, and one last trick: because it's a disconnected sphere, you run into an issue where it's possible that the sphere ends up entirely INSIDE something. Trimesh doesn't know what inside or outside is, so if it isn't colliding with the surface, it thinks it's clear. To get around this, I plan to run an additional raycast check between the target bail point and both trucks on the skateboard. That is, where the wheels mount, the 2 pieces of metal down there. There should absolutely never be a valid skateboarding case where something solid can be between the skateboard and the body, so, that covers for the remainder of cases. Hopefully! We'll see.

Oh and I forgot to mention that this whole process applies going the other way too. Guessing if there's room where your rolly-polly skater is to pop a skateboard down and throw you on it is... a whole other problem. The literal corner cases are horrible. Heh. We solved it the same way though, with a literal trailing transform that just sits wherever, until a new safe-spot is found. So worst case, you pop back somewhere you weren't expecting. Best case, you get back up RIGHT where you are.

General Dev Update

It's the end of the year, so we're just kind of churning along  quietly now. There's all the big games doing their things, so not really  a time for trying to make waves as a tiny birb, heh. You'll see more  Cool Stuff next year. :D

This last month was a lot of level design and bug hunting. We'd been  to graybox on Server Room for a while, but this month saw that brought  up to essentially final art, and I've now done the first actual  playthrough of a finished level's worth of content. Still needs some FX  work to make it pop, there's bugs of course, but we're THERE. It's  exciting!

Also making a lot of clothing lately. Lots of it is jiggly. Sara (our new artist) has been getting a lot of calls for this or that decorative item, because we had to finish up a lot of new mission-giving NPCs. We're trying to give them each one or two items that are unique to them, so they each have a recognizable silhouette. If you pile too much onto a bird, it gets a bit silly - which is fine for a player, but the NPCs need to be recognizable. We also try to make the species unique for each, and we're still adding more of those.

Oh and Sara's also making a lot of level design systems for making pieces of furniture. These things are huge time savers, and will mean we can throw the remaining levels together much faster, and hit a higher visual bar as we do it. They're all in Houdini, if you're curious. Since they're  systems instead of static mesh, it means I can do things like slide the  drawers in and out, decide if a slot is a drawer or a shelf, choose the  number of drawers/shelves, set the dimensions, etc. Makes them flexible,  and very agreeable to being tweaked in place to provide fun gameplay. The game doesn't look drastically different at the new final art level, it's just that step above where it used to be. It's cool!

As we're getting down to the nitty gritties, there's also a lot of UI work happening. I'm hitting lots of little tasks that tend to get shuffled  off to the end, and they bubble up unexpectedly. Just kind of knocking  them down as they pop up.

One of the weirdest tasks was overhauling how you fall off a board. I  know it sounds weird, but the collisions involved in determining how  and where the bird can fall off the board, and (most especially) where  it's safe to get back onto the board, is INCREDIBLY weird.  It still isn't perfect, but we're finally close to shippable. Now bird  generally can't be forced off the board in a way that causes bird to  fall into the void, and you tend to get back up onto the board roughly  where you'd expect. It's that "where you expect" that was the weirdest  bit. That work then dovetailed nicely into getting an actual  reset-to-a-point-you-choose system working, and now we can safely let you roll around and control your bailed bird, and it all works nicely together. There's even mission types that require it!

Anywho, happy holidays folks!



Related Creators