Project Bolero Devlog 46

Made this annoying jerk to test creatures maintaining a certain distance from the player.


Work Since Last Devlog

Breakable Blocks

I tried adding a second kind of breakable tilemap block which can be destroyed with just a normal projectile. In practice, this isn’t as interesting as it would seem, because the blocks end up being small targets, and the projectile still ricochets off of them, presenting a big hazard to the player. The code to bounce off of solids is within the shared platformer code, which runs as a service before the projectile’s tick code, so I’d have to keep state from the previous tick and overwrite position and velocity info after a successful block impact was detected, and I don’t have the patience for that right now.

Player Stuff

When you launch the sphere, there is a cooldown timer which prevents you from jumping or walking. The counter takes about 1/4th of a second to clear. This ended up being a big problem when attacking mid-air near pit hazards and hopping between smaller platforms, so I made it possible to move horizontally mid-air at about half the speed that you would normally move.

Added a crouching variation for when the player kicks the projectile. The ‘shortened’ crouching hitbox is active during this animation, so you should be able to attack while dodging some incoming shots at the same time.

Added an extra impact ‘spark’ effect when the player’s shot hits an opponent successfully, and also increased the jump animation frames from one to three (going up, apex of jump, going down.) I played around with having the player sphere flash briefly to indicate that it’s OK to launch, but I don’t know if I’ll keep it in.

Added a sound effect and ‘boop’ graphic for when the player bumps into a ceiling, like in Hibernator, but more subdued.


More Creatures

I put together a test actor (pictured above) which attempts to maintain a certain distance from the player. Then I made its front-facing side deflect your shots, and I also made it charge when you turn away. This is probably the most frustrating thing I’ve ever experienced in this game / engine project so far. I guess that’s a good sign?



I had some code to spawn guts that was copy-pasted into a bunch of different enemies with few differences, so I consolidated that stuff into a separate module.


Slow Append Times

I’ve been getting some pretty varying completion times for love.filesystem.append(), depending on whether LOVE 11.2 or 11.3 is used, and the computer + OS combo I’m testing with. I thought it was a 11.2 -> 11.3 bug at first, but there doesn’t seem to be a difference on my Windows machine, so I dunno. Using love.filesystem.newFile(“a”) with file:setBuffer(“none”) and file:write(data) is still fast, though, and I switched the debug-logging code to use those functions.

I had been using love.filesystem.append() within a loop to write out the game’s current configuration to disk, line by line, and this was the real pain point. 3 to 4 seconds to save config is a long time. I switched over to using table.concat() to build a full configuration file as a single string, which is then saved to disk in one shot with love.filesystem.write().

Here’s a test program along with completion times (in seconds) from a few PCs that I have handy:

function love.load()
	local time_start = love.timer.getTime()

	print("Program Start")
	local some_string = "bar "
	local some_string_s = some_string:len()
	for i = 1, 10000 do
		love.filesystem.append("test_append.txt", some_string, some_string_s)
	print("Program End. Total time: ", love.timer.getTime() - time_start)

function love.update(dt)


Desktop PC (Fedora 30)

LOVE 11.2 64-bit (Fedora repo): 0.05
LOVE 11.3 64-bit (Appimage): 79.78

Laptop PC (Fedora 31)

LOVE 11.2 64-bit (Fedora repo): 0.11
LOVE 11.3 64-bit (AppImage): 9.93

Desktop PC (Windows 10)

LOVE 11.2 Win32: 211.72
LOVE 11.2 Win64: 212.74
LOVE 11.3 Win32: 210.03

The Win10 PC (#3) is a pretty old, low-end machine, which is likely why its numbers are so high. The laptop (#2) is also pretty old, and in about the same ballpark in terms of performance. The Linux desktop (#1) is my main workstation, and I’m surprised that LOVE 11.3 runs the function on this PC slower than on the laptop. All three have SSDs, and all are capable of running the game as it currently exists.

Anyways! All of these PCs complete the same append actions in a fraction of a second when using the file object OOP interface instead. So that’s what I’ll use.



I experienced a crash-to-desktop this afternoon, which I wasn’t able to replicate. It happened when I kicked a sphere into a wall, pretty much on the moment of impact, during a test run through the prototype maps. I have no idea what the culprit could be right now. I guess I’ll make a test area and see if I can get it to crash again overnight.



Starting to regain some momentum, though this upcoming week will likely be pretty slow as I’ll be out of town for the holidays. (I also strained my back and need to stop writing this and lie down ASAP.) A year-in-review post might be good for next week, maybe, and it might be good to change up the format of these devlogs in 2020, or lower their frequency to twice-weekly or monthly. We’ll see.

Plans For Next Post

  • Same as last time, which was the same as the time before, etc. Need more creatures.