D2 log 058 – Alien AI

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.

D2 log 057 – Tiles, pt.2

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 for Mac 1.6.3

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:

  1. Bundle a private copy of SQLite with the app
  2. 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.

Tiny Player for Mac 1.6.0

I’m happy to announce Tiny Player for Mac version 1.6.0. The headline feature of this release is Quick search. Here’s how it works:

  1. Open Preferences → Library and add your music folder(s).
    Files are not copied anywhere or modified.
  2. Press ⌘F to open the search box and start typing
  3. Drag, drop, boom

As always, if you like the app, you can buy me a coffee. Thanks!

Bonus tip: double click a file in search results to select all from the same folder.