Cow AI


Our cows now have brains! Kinda!

I spent some time working with our cows to helping bring a little bit more life to them.  Before they just hopped left or right once and would bump into each a bunch.  I wanted to give them a little bit of life so players can actually feel like they're abducting real cows.

The first step was to make the hopping a bit more interesting so I changed the hopping to include multiple hops of consistent distances to make it feel like the cow is choosing how far to go.  Also I reigned in the range of distances that the cows could hop so they aren't bounding across the screen.


via GIPHY

The next step was to make sure they didn't start sniffing butts and smooching all the time.  The solution was a little bit of Cow AI.


via GIPHY

Basically, they just check to see if a cow is in front or behind them within a certain distance and then the next hop they make will be in the opposite direction.  

Now our cows are looking as lovely as ever!

Get That UFO Game

Leave a comment

Log in with itch.io to leave a comment.