Hi everybody!
This week work continued on polishing the character animations. The next weapon to get a make-over was the laser gun:
We have also integrated the tommy gun animations from last week into the actual game:
On the code side, we have been refining the behavior of the hexapods. Considering their insectoid appearance, and as a homage to one of our main inspirations, we really wanted players to feel like they are being swarmed by enemies.
Therefore the logical step seemed to be giving them the ability to form swarms! This choice is also in line with our "emergent gameplay" goal since (quoting wikipedia here) flocking “[…] is considered an emergent behavior arising from simple rules that are followed by individuals and does not involve any central coordination”
We started off Craig Reynolds’ 1987 flocking algorithm, which simulates several entities moving as a collective by applying three simple rules, generally referred to as alignment, cohesion, and separation. The result was hexapods which form flocks. Colliding flocks will either merge into a single flock, or split into several flocks, small flocks get absorbed by larger flocks, etc. It’s actually quite mesmerizing to watch, kind of like a lava lamp :)
(PLEASE NOTE I zoomed the camera back for these gifs to make it easier to appreciate how the hexapods are behaving)
The next step was to extend this system to support getting around in-game obstacles such as crates or barrels:
And of course to make things interesting, the flocks needed the ability to actually swarm the player rather than just wander around:
Putting all of this together, we got swarms of hexapods whose behavior relies on following a set of simple rules, have the ability to navigate around obstacles in the map, and can track down and rush the player.
And in actual in-game “resolution”:
That concludes this week’s update, hope everybody enjoyed it, and as usual we’ll be back next week for more :)
Cheers everybody!
Nice work
I'm thinking the in-game camera should be zoomed out a bit... Not quite to the degree of the demonstration, but just enough to where the character isn't taking up 1/6th of the screen. xD
Oh hehe sorry I guess I wasn't very clear, those are "in-game resolution" but they are "cut-off" so the gif doesn't take up too much space ... The character doesn't actually take up 1/6th of the screen, that would be pretty unplayable ^_^
Okay... Maybe I should've thought of that before I said something. xD
The flocking mechanic is really smooth and very impressive!