April 2021
Posted on May 11, 2021
Alright, so I’m a bit late here, haha. April had a good start but ended kinda crazy. Our two-year-old got sick for a few days (just a cold, not the ol’ COVID-19), which wiped us out, and then she had a lingering “mood” for the rest of the week, lol. General exhaustion made me more interested in playing games than making ‘em (currently playing Rune Factory 4, which is a good time!). So no fancy images and stuff this time. Hope y’all don’t mind a bit of text.
Anyway, here are the news.
When playing with a gamepad, I’ve noticed the eight-directional movement feels really clunky with the stick. This clunkiness happens in a lot of older games too, for both eight- and four-directional movement. For example, on NES Online and SNES Online on the Switch, I can’t use the joystick at all. I have to use the d-pad.
In the first two ProtoDungeon episodes, I mitigated some of the issue by tinkering with some of the thresholds, but when I started testing a gamepad for Episode III again, I realized this was still not ideal.
Juju, who wrote my old input system, is working on a new open source input system. I haven’t contributed code, but I did give my input (hehe) very early on. Now after coming back to look at it, it seems to be just what I need. So I spent the first week of April swapping out input systems (which isn’t as easy as you might expect if you’ve never done it before, BUT it was way easier than I expected). Then I modified the movement code to use the new input_direction(), which gives much finer control to the stick.
But that much fine control–fully omnidirectional–was actually fairly nauseating. It was difficult to walk in a straight line. I ended up rounding the input direction to the nearest 22.5 degrees, meaning we were now at 16-directional movement. It feels really good! And as I played more over the month, I tweaked it further to lend more weight towards the ordinal directions (north, south, east, and west), in addition to scaling the speed slightly based on how far you’re pushing the stick. In my opinion, it’s now preferable over the d-pad or arrow keys (though don’t worry, I do the majority of my work with the arrows, and they are very functional and fun.)
The new input system also gave me an easy way to set gamepad axis thresholds, which is something a few people have already asked for. This is a setting in the behind-the-scenes file, but probably not an option I’ll add in game yet since that requires some rework on menus.
Then on a whim, I threw in gamepad vibration! This wasn’t related to the input change… I just wanted to do it, lol. It was a small thing that took me about 30 minutes but adds a surprising amount to the game. I can choose the intensity of the vibration based on what’s going on, and I added a setting for players to control the overall intensity (or turn it off). There’s no menu option for this yet, either. Hopefully I’ll get time for that in Episode IV.
I created a free GMS2 extension out of my vibration system called Good Vibes! It can do all kinds of fancy stuff using animation curves, and it handles some of the weirdness of GMS2’s vibration functionality too.
Next, I created a Linux virtual machine to allow me to export stuff to Linux! I tested this successfully with the current version of PD3. Tried to immediately export PD1 and PD2, but those projects don’t exactly work anymore–I’ll need to do it from the current project after I go through and apply engine changes to them (current project always contains all episodes, don’t worry, nothing is lost).
Finally, I ended this month’s changes on two separate things, neither of them finished: true borderless window toggling and proper depth sorting.
Borderless window toggling in Windows isn’t something possible with vanilla GameMaker. I got a small DLL from a friend, though, that can force the toggle. The only reason this isn’t finished is because the application surface gets stretched weirdly, and I haven’t figured out how to offset it properly yet. This one isn’t required to go live at all, so not sure when I’ll get back to it.
Depth sorting IS required, though, and that’s what I’ve been wrapping up. My z-height system is pretty complicated, and the old depth system didn’t always work–and when it didn’t, there wasn’t much that could be done about it. Occasionally you’d get weird overlaps where the player was under the ground tiles and so on. I did come up with a depth method that would’ve resolved it, but unfortunately it would’ve gone past the supported min and max depth that GameMaker can handle. So I switched to a simple grid sort system, where I can basically just chuck everything into a ds_grid, sort it, and then trigger each object’s draw event in order by iterating through the grid.
There are a few kinks to iron out. First, I need to fix cliff sprite generation. Cliffs create their own sprites based on the tiles beneath them–this way they can be properly sorted so the player can either walk on top of them or behind them. Currently there are some bugs with the generation so that the sprites are too tall and they don’t properly handle animated tiles.
Second, I need to get enemy sorting working too, which will be much easier when I’ve put enemies back in the game. :) The old way was to manually set their depth based on the player position, but that won’t work anymore. That said, with the new grid sorting method, this may not be an issue at all. We shall see.










