The Actor Behavior System is the crux of every object in the game currently. I wrote it to be super flexible and open-ended, while also trying to keep it within a minimal scope - I know, aren’t we all? The way it currently works is that each behavior is a descendant of the base ActorBehavior class, and they all override
Execute(ActorCommand command) - checking if its a command they own on themself (ActorCommands are Scriptables).
The amount of Behaviors is growing larger than I thought it would though and this structure is becoming a bit unwieldy. I think rather than handling it this way, each Behavior should pair up a command with a UnityEvent for what function to call when that command fires. A CommandDispatcher Class would have to then live as part of each Actor (maybe it’s part of the actor itself, rather than an additional class). The BehaviorType flags are also becoming somewhat questionable so I think maybe nixing those in favor of filtering by Commands.
Product System manages the concept of “Ingredient + … + Ingredient = Product.” Using a “Product Catalog” scriptable filled with “Product” scriptables, that take “Ingredient” scriptables seems like the way to go here. Since it’s probably going to have some dynamic-ness to it.
Customers, on the other hand, have an
Order system where they
Order and the line for the order window. The
Order needs to generate from the product catalog, but the question right now is how exactly it’ll pick from it. I think this first implementation can totally just random pick from whatever is in the Catalog assigned to them. Moving forward, I’ll need a better system for determining this.
The Witch Hut needs collision bounds so that player is limited to inside the walls of it… Since she only moves on a 1D plane right now we could just have her stop at the X positions, but we eventually will have platforms and ladders as well… but this may actually be an alright solution for most collision detection in this style game.
Platforms just have an x position - the only question is falling, but if you can’t move in the x/y when falling, then it can just be a vertical drop below. (Perhaps enough momentum to cross a gap to a floor one space across).
Since the Animation Curve jumping is implemented and works well, there’ll be a re-evaluation needed for the collision bounds and what’s going on there. If there’s jumping, then there’s falling from platforms. The same context might apply though - it’s really just also additionally checking if there’s space beneath the character and sending them into a fall state. The “just check X dimension” will work for solid walls, but platforms now have a whole slew of physics to figure out.