-
Posts
3,459 -
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.