Project Bolero Devlog 43

Destroying some breakable blocks with a charged up sphere shot.

 

Work Since Last Devlog

Features

Got some basic terrain destruction working. The codebase has had a “putCell” function for modifying tilemaps since before Hibernator, but I think this is the first time it’s actually being used for something. After modifying the tilemap, the navigation mask also needs to be updated in the affected region.

 

Bugs

Found some annoying issues related to player movement and how the sphere bounces around:

  • Bouncing shot bug: The player’s sphere would rebound horizontally when hitting a sequence of flat ground and then sloped ground, going downhill away from the shot. That should never happen. After going over the code, I found a workaround which I hope holds for the remainder of the project.
  • Shots getting ‘stuck’ on downward slopes: This was caused by a block of code that decays the shot’s velocity upon connecting with a wall or slope, which was being applied over and over at certain angles. The codebase isn’t able to cope well with shots that are bumping into a surface that runs nearly parallel, but it’s a little better now.
  • Player sometimes jumps up when they should fall down through platforms: When performing this action repeatedly using down + jump, pressing jump too early caused the player to jump up when hitting the next platform, instead of falling through. This was a timing issue: a counter that tracked the fall-through override state wasn’t synced with the counter that allows the player to jump even when the user has pressed the jump button a bit early or a bit late.
  • Lua nil index crash: Caught a not-100%-of-the-time crash related to the wakeup-by-proximity system for creatures. Took a while for me to I realize that the routine was operating recursively on actors that weren’t yet fully set up. Oops.
Levels

I’ve mentioned a couple of times that I’m going to break up the levels into smaller sets of maps, and I’ve now put that in motion. The first level is now made up of two maps with one-way links to each other. It will be a pain to synchronize the layouts, but it should look and feel kind of neat.

 

Creatures

Did an inventory of which creatures are implemented and which aren’t but have existing art, and started work on adding them. During this sweep, I also removed various old test actors that either served their purpose a long time ago, or aren’t going to fit into the finished product. The creatures aren’t balanced at this point, but right now what I need is some stuff to put in levels.

 

Thoughts

My PC broke during an OS upgrade on Wednesday (Fedora 30 -> 31, if you’re wondering.) After some unsuccessful troubleshooting, I ended up reinstalling the old version. My data is safe thanks to backups and a separate OS partition, but I had to reinstall several applications, and change a bunch of GNOME 3 settings to get things usable again. This really sucks, but I guess a fresh install isn’t the worst outcome. It’s been a good opportunity to review which applications I actually need for production, and which configuration tweaks I use. I’m hoping that I’ll have this project completed before this version of the Fedora goes EOL, sometime in mid-2020.

I’m also currently out of town and working from an old laptop. I’m glad that the game seems to run OK on another machine (haven’t tried on other systems in a while), though it does seem to have a very high CPU utilization. I guess I never noticed on a tower PC, but on laptop, the CPU fan spins up after a few minutes of the application running. A conversation on the love2d subreddit suggests that LÖVE’s main thread busywaits between frames, at least in some environments. I’m not sure if I can do anything about this. (Edit: After doing some tests, CPU usage is hovering around 14% with VSync enabled and 20% with it disabled. I guess it just doesn’t take much for this old laptop to start running its fan loud.)

I wanted to get tilemapped platforms working which the player can jump up through but not fall down through, but the current implementation makes that difficult to accomplish, so I’m going to forget about it for now. If truly needed, I can simulate it with actors.

I feel like I haven’t made much progress this week, but it’s been better than the last week, and I feel like it’s less my fault this time around. I’ve become resigned to the fact that this is probably going to be a slow grind for a long time. Oh well. Keep plugging away and it will eventually be done.

 

Plans For Next Post

  • Fill out levels, add more creatures.

 

(e: 4 Dec 2019: Added notes on CPU usage)

Leave a Comment

Your email address will not be published. Required fields are marked *