The Flock DevLog #1

Previous post: Introduction to The Flock

I’ve been working on a rough prototype of the main gameplay mechanics. It’s of course, very rough at this point, but I think it’s still interesting enough to show the progress so far.

Flocking

First of all, I wanted to get some flocking animals up and running as quickly as possible. There’s an asset called ‘Herdsim’ on the Asset Store that is a bit limited and outdated BUT it is more than enough to use as a way to test the hypothesis of the herding mechanics. I adapted the scripts within HerdSim to allow the herd to receive commands en masse (follow, stop, move to waypoint etc.). I also replaced the legacy animations with something a bit better. It’s still super rough right now, but at least the animals' legs bend the correct way when they walk now(!).

FlockingTest01.gif

Herding

The next thing I wanted to tackle was the idea of giving commands to herd animals according to a (dynamically growing) radius. I want the calls from the players' instruments to radiate outwards from them so that animals will hear the command at different times depending on their distance from the player(s). Since soundwaves - without obstacles - travel in a roughly spherical way I cast an overlap sphere from the player’s location and gradually scale it up; and send a command event to each animal as it enters the sphere. I colour-coded the behaviour states so I could see if the commands were being received or not (green = following, orange = reached target, red = stop following)

HerdCommands01.gif

Instrument

After I got the command radius working ok, I started to experiment with an input method for the instrument that will communicate calls to the herd. I want the playing of the instrument to have some freedom and analog feel to it so that there’s a degree of skill to the mechanic and also so that players can potentially be expressive and creative with it. So, rather than using buttons to play a preset number of musical notes (like in Ocarina of Time, Wind Waker etc.), I tried modulating the pitch with an analog stick. With the instrument selected - I’m thinking of it as a horn currently, but could be other instruments too - you hold a button to start blowing and then move the stick to create different pitches (this is done by converting the analog’s vertical axis values into a pitch range). It’s still very rough right now, but I think there’s some potential to this method (or something like it). I spent quite a bit of time playing around with different combinations of notes and I think my family wondered what I was doing since there were strange noises coming from my office for hours!

Here’s some audio of me playing some notes modulated with the analog stick.

Call Commands

With a working input method for the instrument, I wanted to create some musical calls that would be used to communicate commands to the herd. The reach of the commands should be dictated by how accurately a call is played, so I wrote a script that takes pitch and timing into account. So:

  • If a player plays the right notes with correct timing then the command sphere will radiate out to its maximum distance
  • If they play the correct notes, but at a slower speed, then the command will travel a shorter distance
  • If they play an incorrect note, or ‘fall off’ the correct note then no command will be sent/the command will be cancelled.

At this point I’ve only scripted the note sequence for two commands (Follow and Stop) but I’m planning to add more soon.

Here’s a link to the instrument being used in the prototype (sound required!):

Visual Development

In addition to the basic functionality of the prototype, I’ve been iterating on the overall look for the project. The illustration I created previously was effective as a static piece of artwork, but I’m thinking that I might evolve the visuals a bit to make the environments less contrasty, more painterly and allow the characters to pop from the background more as a result. I still want the overall aesthetic to be bold and graphical in terms of silhouettes, but I think some subtle, impressionistic detailing within the textures could work well. Here’s a simple visual target I created in Unity/Photoshop to test out the updated visual direction:

TerrainLookDev01 (1).jpg

Next Steps

I want to spend some time working on cooperative aspects of the gameplay. First of all, I’m planning to experiment with the idea of players playing their instruments in unison (For instance, I’m imagining that playing the same call simultaneously will mean that the its effective radius will grow much larger to encourage cooperation). Also, I want to spend some time evaluating different options for authoring terrains within Unity and create a real-time visual target which includes flock animals as well as players within an environment.

Next post: The Flock Devlog #2

Written By

Nick Carver

Published in: Creative Spotlight
December 3, 2019