Happy Cryamonday folks! We have another look under the hood today and it'll feature something that Brandon's been working on which we've mentioned a few updates back. We'll hand it over to him to explain his work.
Hey there Cryafolks! Brandon here with another riveting insight into the code department's crazy antics.
So one of the elephants in the room that we've been working with for a while now is the AI of our various critters on Noka Island.
Initially, we went with a component-based design (which is kind of standard for Unity projects) where we designed all the different AI types as separate components, and then decorated our mobs with the appropriate combinations of AI behaviours that fit the particular mob types. The downside, as we discovered, was that we didn't build any kind of priority system into the different modules, so we weren't in direct control of which components tried to control the critters first. For example: on one critter, if we gave it the "Aggro" component (which tells our mobs to attack Esmy if she gets into a tune-able range), and then the "Homesick" component (which says "if you get too far away from where we first spawned you, give up and go home") you wouldn't be sure which would win if the conditions for chasing Esmy and the conditions for "giving up" on the chase were both true at the same time.
This has resulted in some very twitchy and misbehaving enemies.
Now, as an aside, we've also been working heavily on a better scripting system for our collections of cutscenes, dialogues with NPCs, and other "we took control away from the player to do some storytelling" situations. These all live under the Cutscene object we've written. The initial editing tools we built for Cutscenes were very basic and tedious to work with on any kind of lengthy cutscene.
With the AI rework needed, and the cutscene scripting tools found lacking through extended use, we've been working on a new visual scripting system that could be used for cutscene editing AND AI definition design. Hence, the new Visual Scripter tool:
This is a shot of the scripter being used to create a dialogue between Esmy and Bliss, but the same underlying tools are also being leveraged to define new Finite-State-Machine AI controllers for our creatures. AND our NPCs. AND our boss fights. And probably a plant, a few streetlights, a door or two...
This is designed to let all the folks on staff who might be involved with building out cutscenes and creatures (and streetlights) do their design work without requiring any (err, much) new code to be written or tweaked. As it should also have a "while game is playing" mode that highlights current states/scenes, it'll be indispensable for debugging as we move forward, too. The win behind switching to deterministic FSM's is that we'll have total control over how the AI switches between states and what criteria it uses to determine which state to switch towards.
(Also, for those savvy enough to be aware, yes there are a few current visual scripter Unity Asset Store packages, but we weighed the cost of learning an existing system and wrapping it around our current Cutscene objects vs writing a specific tool to just script the things we needed the way we needed it, and went with the latter. Great learning experience overall, and it only required writing systems specifically targeted to Cryamore, so no bloat).
SO, that's what's been cooking in the code ovens down here. If you're still awake, I'll hand things back to Alan. Thanks for staying tuned, all, and we guarantee more exciting stuff to come!
Thanks for the look at the new cutscene manager/AI tool, Brandon! Over on my end, I'm revealing two more new sprite bases that've been completed.
You may have already seen the concept art of Melita Swanson a few updates ago along with the Council Chief of Ghilcrest, Geophilius Silvershark.
Melita is a pretty short woman which is why Esmy is shown to give a better idea of her height. Chief Silvershark may look small too but he's but a bit taller than Esmy. I guess it's Esmy's hair that really makes her seem quite taller.
Melita had to go through quite a number of tweaks to come close to her concept art but thanks to Juby, JC and Rob's suggestions, we've managed to finalize her sprite base.
You'll find both Melita and Chief Silvershark within the Council Building, north of Ghilcrest. We've still got a number of other NPC's to show (both concept art and sprites) so you'll be sure to find the town very lively.
That wraps up tonight's Cryamonday update. We'll see you again next week with more news!
- NostalgiCO crew