Rather than burying the lede, let me show you the final result, and work back from there.

Boids is a procedurally generated flocking behaviour developed by Craig Reynolds in 1986. If you have a minute, I’d highly recommend checking out his article on the algorithm, which touches on similar, contemporary works, and name drops a few entertainment projects Boids worked its way onto. Perhaps most notable is 1992’s Batman Returns, which used Boids to model this CGI bat swarm. 

They also used it to for the CGI penguins marching through Gotham. Of course, the effect needs to be combined with a ton of animation and lighting work, but if we ignore the artistic silliness of the scene I’d say it’s held up pretty well.

I was told by a long standing industry veteran that Halo:CE used them to model the flood behaviour, but I couldn’t find any confirmation of that online. What I did find is this video showing Half Life’s implementation, which Valve unceremoniously shuttled off into a background detail at the end of the game. 

You could argue that shows the limitation of Boids, as well as many other procedural generation algorithms that programmers tend to fall in love with. Most programming is incredibly boring, and most programmers have no artistic ability. As a result, they are easily seduced by the ability to make (mediocre) art through code, mistaking something technically impressive with something of value to the audience. 

There is a reason why demoscenes, while mind blowing, have never made their way into anything other than demoscenes. Your jaw may drop when you realize that the executables that produced the above and below videos were less than 4KBs, but it’s not clear what specific purpose this witchcraft serves other than novelty.

The glass half empty view of Boids is that it’s one of these procedurally generated solutions in search of a problem. That as games became more graphically complex, the occasional rough edges you’d get using something like this became more noticeable. Or that there’s simply no value to swarms of things procedurally flying about, and the CPU cycles can be better spent elsewhere.

That’s a fair argument, but I can’t help but think that Boids is the kind of algorithm that gets woefully underused and underdeveloped in modern games. It’s crazy to me how simulation in games seems to have gone by the wayside. There’s a reason why people still point to FEAR and Half Life as the pinnacle of AI in First Person Shooters, both of which are over twenty years old. It’s not Boids per se, but it is downstream from the developers’ emphasis on procedural behaviour.

The last two games with AI that got anyone excited were Alien:Isolation (2014), and MGSV (2015), both over a decade old. I searched for interesting flocking behaviour in games, and the last one I got was from Gears of War, which is celebrating its twentieth birthday later this year. This suffocation of creative and artistic bankruptcy, while less immediately upsetting as something like Concord, or greedy micro transactions, is yet another result of the zionist control over the gaming industry, and Weimerica more broadly.

Still, it’s one thing to theorize, it’s another to find an actual implementation in a game, and I believe I have more than one very good candidate for this effect, that I will cover in the next piece. Also, I needed to blow off steam getting over the pain of the announcer.

You may also like

2 Comments

  1. Boids are such a cool concept! It’s one of those cases of observing complex behaviors emerging from aggregations of simple components that arises, itself, from relatively simple rulesets. Like bees and wasps building their nests or slime molds determining the most efficient route(s) to food. I think your demonstration of it is the most visually impressive form of all shown.

    I immediately saw the application of it in my remake of Black Lives Splatter. The Groids (a serendipitous convergence of terminology, by the way!) are to follow basic mobbish behavior, and the manipulation of their cohesion and affinity towards one another and repulsion against barriers is perfectly suited to giving those groups more flavor and character. Right now in the pre-alpha prototype they just follow the player in the most direct route possible, but I had ambitions to have them not simply pile up on each other (all the time – sometimes that’s amusing), respond as a flock when agitated, scatter when panicked, and otherwise do something a bit more interesting than run straight into their doom. Especially when I consider certain types of enemies that “lead” the others by causing changes in their flocking behavior, which when splattered will cause a break in that synapse-like control, would be very satisfying in theory for the player to break up.

    I can definitely see the interesting application of Boids in EEI with at least certain enemies or certain situations. I think the effect shines in that top-down perspective that gives a great showcase of the behavior in totality. I am also reminded of the Vampire Survivor genres where individual enemies are often dime-a-dozen simple but form their threat in their large numbers. A game like Halls of Torment in particular often played with the movement patterns of particular enemies to create predictable yet more-than-follow kinds of behaviors, like swirling around the player or zig-zagging or retreating when looked at. I think combining the Boid variable regulations with some of these particular player-driven conditions would make for some fascinating and fun behaviors for players to overcome!

    1. Indeed. However, one of the limitations of Boids is that it’s an n^2 algorithm. Each boid needs to iterate through all the other boids, barring optimizations. The most obvious optimization is to artificially divide the world into a grid, where we first iterate through each boid and register which grid square they’re in. Then we check for influence from relevant grid squares. It makes the performance manageable, but it is a lot more work.

Leave a reply

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

More in GDev