MAF: Tool Acquisition and More Complex Behaviors
Sarrah Wilkinson - 5/5/2021
I share more game updates like this frequently over on our Patreon, and patrons will always see updates a few days earlier! If you're interested in the development of our little farming sim, please feel free to take a look.
This one's a bit long for an animated GIF, so I put together a little video to show what's going on!
If a task requires a tool, the Antid now checks their inventory before starting. (And in fact, it's a little deeper than that - prior to being ASSIGNED to a task, whether they have the appropriate tool already or, if not, how easily they can acquire it, is part of their score for determining if they get the job!) If they already have the tool, they proceed to do the task. If they don't, they attempt to locate one. If there are none available, they'll alert the player. (There'll also be a fun animation for this, but one thing at a time!)
Now, if the item they're looking to get isn't REQUIRED - like, it's just something they idly want, like a hat - they'll leave move on to do something else. A non-critical alert will stay in the alert list.
However, if it's a requirement for a task, like you see in the video, the Antid will remain signaling to the player for as long as the task is still relevant. If another Antid happens to complete it in the meantime, however, they are unassigned from it and the alert disappears. They're doing a ping every second or so to see if a tool appears. As soon as it does, the alert goes away and they go retrieve it. There's a sort of behind-the-scenes 'lock' on a tool that means more than one Antid do not attempt to retrieve the same tool, too.
I forgot to mention it in the video, but Antids can also be renamed now. When I had multiple farmers running around, they needed unique names so I could figure out what was going on! (There may have been a few bugs getting this all worked out...)
Right now, I'm just spawning both Antids and MultiTools by clicking a button. So, the next thing I'll be focusing on, is... well, not doing that! Antids will appear from a cloning facility, and you'll purchase tools (and other things!) through a store interface connected to various buildings.
That's it for the moment!
Tags: dev diary, game, game dev, game development, indie, My Alien Farmstead, video game
Created: 5/5/2021 | Modified: 5/5/2021