-
Posts
3,456 -
Joined
-
Last visited
Rikifive's Achievements
Single Status Update
-
During some tests I've bumped into a sticky situation.
(also in the gif it looks like she was shooting from face, but it's just gif not catching the flickering between ducking & falling sprites lmao)I didn't think of that possibility when writing the ducking mechanics. Twi was getting stuck between ducking&falling position, because her head was getting stuck in the wall when she was about to fall. Switching between ducking&falling was so fast, that it disallowed from moving.
That made me realize, that I totally have to rewrite the ducking mechanics.
Previously ducking was forced when the player released the down key while being in a tight passage
By "ducking was forced" let's think of a status, where Twilight is in tight passages, thus unable to do certain things, such as jumping, because there was no need for that...So that means, that she got that status after the player released the down key, but for example, still allowed Twilight to jump while holding the down key, as it bypassed the check if she's in a tight spot. Initially I designed it just to stop Twi from getting up, hence why it was checked AFTER the key was released. I added few details (preventing from jumping) as I went further, without remembering / realizing that the order of code I had was not prepared for that.
Now it updates that all the time, so it will prevent from odd things right away. What's more, if for some reason Twilight's head could potentially get stuck while she was standing, she'll automatically start ducking and be forced to that position until there'll be enough of space for her to get up. Combining that with the collision system for slopes, she's now able to climb into tight spots.
Twilight was getting stuck when falling from tight passages while there was a block above her
Sneak, sneak, but everybody gangsta until the platform ends and you have to fall while having a block above you. When that happened, Twilightbroke physicswas basically getting up and ending having her head stuck in the block above her.Now when Twi falls while she was ducking, the code checks if that will lead to Twi's head getting stuck in the ceiling and if so, she'll be moved down to nearest free space, allowing her to fall down normally.
should be all good now ------ at least for now.
- Show previous comments 2 more
-
@Treeglow Flicker Collisions tend to be mind-blowing not only in gml. Yeah, it's exactly like this. Fix one thing, five other things break.
@Splashee® Hmm I think ducking is actually quite simple, mainly because it doesn't affect everything else much, so it's pretty neat without many surprises. The "bug" I had was just my obvious fault I didn't think of.
Oh yeah, crouch-jumping in Mario was dope for speedrunning and such. It was awesome to run and squeeze&slide through tighter gaps. In my case, Twi can duck only when standing on the ground and automatically gets up once finds herself in mid-air. For example, given there's enough space, she can normally jump while ducking, which leads to the normal jump state. Upon landing, she instantly ducks if the player is still holding the down key. The reason is that I don't need crouch-jumping tbh and I want to allow players to aim down normally, which is something Mario didn't have to worry about much.
Yeah, saw friends making some nice progress and I just had to do something myself. Seeing others make progress motivates me. I'll be trying to make at least a tiny little bit of progress every day or two.