Speed cap? Where we're going, we don't need a speed cap.

In case the text is too small, I tapped out at about 132,000 subpixels/s which is about 88x sonics traditional running top speed.

#sonic #godot #gamedev

Lots of little bits done today.

I think a refactor is in order to streamline the reaction lifecycle.

There's a lot of cross-talk in the nodes right now, especially when overriding sonic's animations and when taking damage.

Need to make the programming pattern more consistent if I potentially expect other people to use this.

#sonic #godot #gamedev

This is all starting to come together. Not much on the actual features side done tonight, I spent most of my time working out a better flow pattern for delegating calls

Each ability gets passed a state object to modify and can either pass it on to the next in the chain, or return a final state

For example the hitbox might care about flashing when invulnerable and then let another ability decide what animation to play

It's similar to how .net core handles middleware

#Godot #Sonic #GameDev

Few days since the last update but it's mostly been engine things. Abilities are now able to interrupt key lifecycle events like input and animation.

The playing Animation drives whether the hitbox is in normal or crouch mode, and if it's attacking or not.

I've also started adding in interactive elements like breakables and enemies, and environmental areas like water.

Oh, and sound. I've got a 4-channel sound script that simulates the limitations of older consoles.

#Godot #Sonic #GameDev

for the sound script, unless otherwise stated, it will try and be smart about what channel it plays the sound on.

First it looks to see if the effect is already being played on an existing channel, and just restarts the effect (this prevents something like the super spin dash from deafening the player)

Then it looks for the first free open channel.

If no free channels are found, it takes the last channel used and plays the sound through the next channel up.

Today's items are pushable blocks and more animations.

I want to thank the Spriters Resource for not only the Sonic animations, but the massive Sound Effects library. The new site refresh is excellent.

https://www.spriters-resource.com

They're over on bluesky, https://bsky.app/profile/spriters-resource.com

#Sonic #GameDev #Godot

So I have no idea if this is how the OG corkscrews work since I can't find anyone who's done a breakdown, but this is a decent emulation with minimal changes to the player system.

The rainbow collider is only solid when Sonic is going fast, slow down and you fall through (this is also how I plan on doing running on water)

The collider tells the animation system they're in a corkscrew, and to play Frame x% through the corkscrew animation (if not rolling)

#Sonic #Godot #Gamedev

I can't believe it's taken me this long to put rings in the engine.

But here we are.

#Godot #Sonic #Gamedev

Whee! Conveyors.

I've almost got enough elements to make a complicated block-pushing puzzle.

That's what we all want in a Sonic game right? Block pushing puzzles?

#Sonic #GameDev #Godot

I have accidentally turned the straight-jump bug into a drop dash bug :|

When I refactored the jump code I forgot to listen to the 'disable jump' flag I added.

Oh, also, jumping is an optional ability now.

I'm going to *try* and decouple the physics code and make running like sonic optional too, though that might be more difficult than it's worth.

#bug #gamedev #godot #sonic

Button button, who's got the button?

I do. And I've made the ultimate Sonic block-pushing puzzle.

This is truly Sonic at its most difficult.

(I promise no game I make will require anything this to progress, but I can't promise I won't hide some obtuse Easter Egg behind it)

Also, ignore the janky slope pushing, the fact it works at all right now is purely accidental.

#Godot #Sonic #GameDev

First power up in, Speed Shoes.

With the physics chain in place powerups can decide if they want to apply their changes before or after later abilities.

Water is handled as part of this chain so we can decide if we want to replicate the OG water bug or fix it, just by re-ordering the nodes.

I think I prefer the water reducing key variables by half, rather than just cancelling your speed shoes (though, regardless it will restore your shoes once you're out of the water)

#Sonic #GameDev #Godot

Back to normal service. Picking off some easy wins after that week of frustration.

Pushing blocks uphill is now smoother (there's a slight animation hiccup the movement is smooth)

One of the edge-case issues with Sonic is that, on flat ground, his left/right push sensor is at his ankles. On slopes it's from the origin.

I've added a new push sensor from the origin that only triggers other blocks (no repositioning) if the original push sensor doesn't hit anything

#GameDev #Sonic #Godot

First pass on shields.

Fire Shield is pretty accurate, bubble shield is real jank and I just need to tweak the jump value on the thunder shield...

... and add the special abilities like ring magnetisation and not drowning (drowning isn't implemented at all rn) - those are for later.

But I have gotten the hang of Godot's instancing system and inherited scenes as the power up monitors inherit from a base monitor and just the icon and script values are changed.

#sonic #godot #gamedev

Quick one before bed.

Magnetic Ring attraction works. And stop when he grabs another shield.

#Sonic #GameDev #Godot

Shield based immunities are in.

Pictured: The bubble shield making you immune to drowning.

Not Pictured: Thunder shield protecting you from electricity, and Fire shield protecting you from fire.

And invincibility. It's also in.

Next up projectile rebound on shields.

The Chain of Responsibility pattern I'm using is actually really good for asking abilities for stuff (like immunities, or if a shield is active, or invulnerability)

#Sonic #Godot #Gamedev

Bullet ricochet is done, but I have to big up a feature of Godot I'd otherwise have to implement.

VisibleOnScreenNotifier and Enabler nodes

I'd normally use a lifetime counter for my bullets, but now VisibleOnScreenNotifier destroys the bullets when they are suitably off screen (120px beyond in this case)

VisibleOnScreenEnabler will be used on almost *every* active enemy so that only on-screen enemies are active. Here it's being used on the spitter.

#Godot #sonic #Gamedev

Some nice simple work making the audio music stack. BGM has the lowest priority, invincibility next, then drowning top.

And yes, I may have chosen some... non standard versions... of the music.

(Go check out the SiIvagunner youtoob channel if you haven't already)

#Sonic #Screenshotsaturday #Godot #GameDev

When you forget to set your triggers to the right layer...

If you stand in the right place they can crush you too.