Before recording new sound effects and adding music, I want to improve the audio engine a little bit.
In this first part, I implemented some fundamentals.
- Envelopes. Automated adjustments of gain, pitch or pan etc. Already replaced old code for fading music in and out.
- Audio bus hierarchy. Apply parameters to all related sounds in one place.
- Lowpass/highpass filter. This has been on my wishlist since Superforce and I finally got around to it. I used this article as inspiration but the code is 100% rewritten for clarity & performance.
- Limiter. Safety guard to avoid clipping.
The big payoff for these features will be ducking. To make important sounds stand out, I want to suppress the less important ones. This can be done with gain but also applying the lowpass filter could make it sound even better.
Recently I ran into a design problem. Some enemies in the game will be immune to bullets and you’ll have to use grenades. Of which you can only carry a few. What if you miss and run out? You’d have to restart the level.
For a moment I considered loot drops. For something you’d be required to get they seemed too random and potentially frustrating. Instead I shamelessly copied Half-Life and added a grenade dispenser!
It’s a box full of… grenades. Just walk up to it and get a refill. The lid opens automatically to indicate you’re not supposed (or able) to break it like the regular ammo crates.
I’d love to see the game running on Steam Deck one day. Until then, I’m using an Xbox controller for testing.
Some menus were impossible to navigate with the gamepad or keyboard. I’m not building any sort of generalized UI framework but this needed to be fixed.
Each menu item contains links to its neighbors and pressing ←↑↓→ changes focus accordingly. In most simple cases, such as the main menu, the autogenerated links were enough but in more complex layouts some were omitted. So added a way to create the missing links manually.
Now I can get right into the game using just the controller, which is cool.
I still really like the base grass texture that I made when updating the tileset.
To add more variety I added a few patches of tall grass here and there. Those are animated and move with the wind. It took a while to make it blend in with the existing graphics but I’m really happy with the result.
Exploding barrels are a nice addition to any game. Devastro 2 already had some but I wanted to make them more fun. Decided to add a burning phase that would indicate a barrel is about to explode.
The fire animation was created in Blender and the smoke is a particle system running live in the game.
Explosion chains are now much more fun too.
This time I focused on the “aim” part… adjusted range and accuracy to make each weapon more unique. There are also new crosshairs which resize based on the accuracy.
The one in the video is my current favorite but there are other options…
The alien AI was a mess. It tried too hard to be clever. The code was fragile and the behaviour unstable.
I threw it all out and implemented a simple flock / boid algorithm. The aliens will stick together and try to approach the player in natural looking groups.
A* pathfinding is gone too. Instead, the player character drops invisible scent markers with a limited lifetime. If aliens cannot get a clear line-of-sight to the player, they will look for the scent dots and follow them. That can eventually lead them back to the player, even around corners etc. It makes it look like the aliens know what they’re doing. Which, of course, they don’t.
The new tileset is coming together nicely. I made a “master sheet” with all the tiles to keep things organized.
I implemented a new material system for tiles. In addition to the visible texture, each tile had a lower resolution bitmap which defined the material at a given spot. This was used for special FX like bullet impacts that vary based on the ground material they hit.
I got rid of that and switched to a polygon based approach which plugs into Box2D. Material polygons are created as invisible objects in Blender and exported into the game.
I also changed the way fences are placed on the map. They are now baked into tiles, so map editing is much easier.
The metatile system is still in place but without the editor. I get enough variety from Blender & Pixelmator alone, so it wasn’t so useful. However I now use its multi-layer feature to draw the fences, because they need to have separate ground / shadow / foreground layers for proper z-ordering.
Tiny Player version 1.5.2 is out now on iOS. This update contains two fixes:
- Always show IPv4 address for uploads (instead of mangled IPv6)
- Fix dark mode background color in player controls area
If you encounter any problems, please let me know.
Recently I had been getting reports that the playlist wasn’t saved properly but I couldn’t reproduce this error. I added tons of extra logging and asked people to send me log files.
Here’s what I discovered:
- A database migration was failing while renaming a table column
- …and it would happen only on macOS 10.14 or older
- …because those systems include an older version of SQLite
- …which doesn’t support renaming columns the way newer ones do
- …and I didn’t notice any of this because my old El Capitan Macbook had died
- …and some versions of the app silently ignored the migration error
It should be fixed now. Takeaways:
- Bundle a private copy of SQLite with the app
- Get an old Mac Mini with 10.11 and use it for regression testing
Also new in this version: simple feedback form. Open Preferences → Feedback and let me know what’s on your mind. You can attach the application log file & preferences with a simple checkbox.
Happy Ho ho.