Skip to content

Narwhal Simulator 19: Creatures Work Now!

Hi everyone! Today is going to be a shorter post because I’ve been so busy working on creatures; at least there’ll be exciting stuff. I’ve fully implemented fish and kind of finished shorks. Let’s get right into it.

Firstly, I’d like to talk about the AI. All the creatures have a creature class which manages the behaviours. Each behavior has a different weight and priority which the creature uses to decide what to do next. If you want a more in-depth look, take a look at my last post or download the code yourself from my GitHub (linked below). My creature AI system is heavily inspired by a video by Quill18creates on AI for games. It’s super good and I’d recommend checking it out if you’re interested in building AI for a top-down game. Here it is: https://www.youtube.com/watch?v=bc86es4YOoc. With that out of the way, I’ll show you the actual creatures I’ve made.

I finished the generic fish, at least to the point I wanted it. It “schools” like a fish and also flees from scary things like the player and shorks. Here’s what the fish look like when there aren’t any threats nearby:

As you can see they are coherent like a school of fish! They also quite like going in circles. I also like going in circles so I can respect that. Sometimes they go in nice wobbly straight lines too.

I also made the shork. The shork hunts the fish and eats them on contact. This is the part about the shork that isn’t done. I don’t think that real sharks consume anything that touches any part of their body, but I’m not a marine biologist, so who knows? Regardless, it’s not what I want but it works for the moment. Here is the shork hunting some fish:

As you can see, the shork sure does move and it works pretty much as intended. It bounces a lot and although this is technically a glitch, I think it’s cool and also can’t be bothered to fix it.

I think that’s about everything I have for you. I hope this post was nice and whelming after the long build-up. The plans for the next week are to get the lazy fish working and make the shork eat things with its mouth instead of its skin. Also, Friday is the first day of school for me so the posts might start getting shorter or less content-full. Thanks for reading, see you in a week!

Links recap:

GitHub: https://github.com/AgentD1/NarwhalSimulator 

Trello: https://trello.com/b/Nd7rNvWU/narwhal-simulator 

Leave a Reply