Hello everyone, time flies so fast, until February 2021. I originally hoped to complete the transplantation of the Android version of CSOL Cataclysm within 4 months, but it seems that I have to postpone it.
I’m not sure if the GIF animation can be played normally in the reply, as shown below:
I’ve been working on upgrading to use the new 3.3 animation system for my game. Right now I have just been playing with the new features and testing some code in a simple editor, that way I can figure things out before I begin writing the final code to manage all of the animations in game where it really matters.
I just figured out how do animation blending, and made a short test showing a fox from sketchfab with nice animations doing a linear interpolation between walking and running. (pardon the blocks in his face and legs, those are hitbox geometries that get culled in-game)
I’m excited to work more with the new animation system , and am also looking forward to experimenting with Minie and the DyanmicAnimControl to hopefully simulate some realistic knockback and stagger effects for melee combat, explosions, and high-impact spells. I think this should be achievable but the challenging part may be integrating it with my current multiplayer networking setup.
After two weeks of tracking down some physics bugs in a “gotta fix this bug to find this bug so I can fix it and find this other one” sort of way, I’m finally able to get back to some AI work. So far only the lowest level stuff but I’ve got the AI hooked up to the physics engine and can have a simple random walk behavior.
Walk some random direction for a random amount of time then pick a new direction. If a chicken gets blocked then the walk action is aborted and they can pick a new direction early.
…hopefully progress goes faster now that the basics are in place.
They can now eat food and stuff… and won’t wander too far from home. Still not very smart yet. I think perception events are the next major thing which will keep them from stupidly bumbling into food and still ignoring it.
I’m going to spend at least another 2-3 weekends on it and then re-evaluate where I am. Right now I’m just trying to get the base primitives in place and see where I want to go from there… but I have some requirements in mind to handle “whole world AI”.
I believe my current approach lets me mix and match AI types which means I can always swing back and do more advanced stuff later. But in any approach, mobs will have to be able to see, navigate, walk, interact, etc…
I think back to when I did mods for Neverwinter Nights and all of the cool creatures and characters we could make by scripting within that very basic system. If I can get that level of world interaction combined with a world-side scheduler for when AI is ‘far away’ then I’ll essentially be “done enough” for a Mythruna alpha.
Currently, I’ve left the control driver “dumb” in that it’s pretty close to what the player control driver does. AI supplies input like turn and move. I reserve the ability to put more smarts in the driver but I need to see how other things pan out first. My general approach is to make everything as simple as possible until it needs to be less simple.
Right now the actions steer… which are the elements of some sequence to reach a goal.
Components are only necessary for communicating between systems through game objects. So in this case it’s not necessary because the “MobSystem” attached the control driver directly to the physics RigidBody and has direct access to it.
The mob driver is wrapped in an “Actor” interface for the AI to deal with. That lets it ask questions about things around it (what can it see?) it’s location, facing, etc…
Keep in mind that all of this is in flux. I’m trying out ideas based on a synthesis of 20 years reading about AI and playing with toys… so my fever-dream may all break down in the end and I rewrite it. I waffled between a few ideas for the last 2 years before waking up with a clear picture in my head two months ago or so.
Currently, there is this generic idea of goals. A mob has a goal selector that decides what it’s current goal should be. For a given goal, that mob will select a matching strategy which creates a plan (list of actions). A chicken’s plan for “eat food entity” will be different than a human’s plan for “eat food entity”… but the idea (goal) of “eat food entity” is pretty universal.
I currently have a naming problem that puts it all in question as suspect, though. Sometimes naming problems can be the sign of something deeper but for now I push on. (Naming problem is goal: Eat(thing) and action Eat(thing)… and using transitive verbs for goals (ToEat(thing)) is not completely satisfying.)
So while I’m confident that I could integrate all kinds of approaches on top of this (behavior trees, GOAP, state machines, etc.)… there is still the possibility that I scrap it all and start over at some point.
Edit: note that for the really really curious, the code is available “early access” style to my patrons… just in case folks want to watch all of my screwups and backtrackings as they happen. lol. Since this will all be open source at some point (hopefully this year).
I never find the time to properly learn complex editors like Blender and I like creating tools so I made this from scratch. I hope it will speed up the design process in the long run becaue it is tailor made for this game.