Bugs bugs bugs bugs bugs bugs


So, originally I was going to write about the in game spiders, happy accidents, and using an unforeseen bug to create really cool and interesting gameplay mechanics. And then, this morning happened, and one of my beta testers found a small bug, one that I thought would be an easy fix. You jump, and on the downward arc, if you pressed jump again, the minute you fell you jumped.

Weird, I thought, probably related to either the coyote jump routine or the double jump routine I eventually removed (as fun as double jump was, the arrow as platform and other cool tools and items made the double jump superflous and vice versa. I think making your own platforms is way more fun then double jump, sooo, I cut it out). Two minutes to fix, just check the timers and it should be easy.

Turned out to be a way bigger problem than I thought. I hadn't used a controller to test the game in a few weeks, so I thought everything was hunky dorey, and forgot that I had rewritten the keyboard and controller code and hadn't tested the new code yet (using interrupts rather than simple update polling). I couldn't get this fixed, couldn't get this fixed, thought "I'll plug in a controller and see if that's worse or better"...

And it was way worse. It was only calling Love2d's function for checking to see if a button was pressed once, unlike Love2d's keyboard routine which calls it even if it's held down. So, powering up an attack wasn't working on the joystick. I had to gut it, keep the keyboard routines (since those worked better) and go back to the old gamepad routines.

After doing that, I had to fix this jump issue. It looked like it was resetting the jump timer at the wrong instance, and that was all based on how it was polling player input in relation to if they were on ground or jumping. I was able to fix that issue, but then I found out the menus stopped working right, since the gamepad updates way faster than the keyboard input (but 1/20th of a second faster, by my math), and so I had to create a new of telling whether a button was held down compared to whether key on the keyboard was held down, and update the timer and the "held" check differently.

That was my day today, pretty much. Found that at 9am, and just finished up now around 3pm. But the game is running much smoother now, and not only did I fix the bug, but I also improved the way it handles input a ton. It was good before, but now it's smoother, the joystick input a ton better, and the jumps happen at just the right time, allowing you to tap the ground and jump right there. Should make for some fun platforming, when combined with a bunch of these items.

I also added a new area last night, took some screenshots above. The eastern cliffs at the first light of dawn, I also added ambient sounds last night, including bird songs, circkets, owls, etc, that randomly play based on area and time of day. These screenshots were taken after the first birdsong of the early morning light. The ambient sounds routines were something I coded ages ago, in a zelda style game back when I was programming in Allegro and C++. That's the same game I borrowed/rewrote the code for the time of day changes, and some of the weather routines. That game was going to be like a sandbox zelda, but work picked up a ton, and my writing career was gaining steam, so I set that aside.

Glad I could use those routines now, with very little modification.

Get Emberglass

Buy Now$5.99 USD or more

Leave a comment

Log in with itch.io to leave a comment.