Phase 2: Post Holiday Update


Pushing into 2022 means it's a good time to see where things are day 1 (Okay, it's day 3 while I write this, but still).

Currently Active Projects

Pathfinding

The implementation of A* has been moving ahead to solve the pathing problems. So far it's about 80% there, with most of the foundation work having been put in place, with the system that cycles through all the hexes and  assembles a route when a move command is issued, being what I have remaining.  The focus is on making it all multi-threaded so that when the game is further along, and there are hundreds of entities moving about, we don't get significant slowdown. This somewhat complicates matters as it means diffusing the algorithm out over multiple systems, so that I can minimize the number of structural changes (Read: Any adding or removing of entities or components); but, ultimately I think it's a hill worth climbing.

Obstacle detection will be the first major thing added into the pathing system, and making it so that the cost of moving over different terrains is different. In order to avoid units clumping up unless it is necessary, the speed of movement will be reduced when you are near obstacles. This will make formations move slower, and will make movement through areas with many obstructions (Read: Forests) a slower action to perform. AI will prefer to take the cheapest and fastest route, but positioning is and always will be key. So, maybe moving through the forest is slower, but doing so may grant you a more advantageous position over your opponent.

UI

UI has been another highlight of recent work, with me having successfully put together a temp UI while I mock up what the UI will ultimately look like, which I have attached some of that here:

Dynamic Unit Card

Depending on the Unit's loadout the Unit icon will change, so the player can at a glance discern what the unit is.
UI in the game will be somewhat minimalistic. Units will have a basic circle around them to indicate that the unit is selected, that is dotted around the members of the unit and solid around the leader of the unit. Relative unit strength will likewise be displayed with bars for aggregate unit health, readiness [Stamina and equipment state], and morale; as well as, how many entities in that unit are active, so that at a glance you can tell how each unit is doing.

In order to preempt any issues with color blindness, the UI will have 3 colors (Default being Green, Yellow, and Red) to indicate Good, Moderate, and Bad (100-0% of the total sum of the 3 relative unit strength bars mentioned above with: Above 66%, Above 33%, and below 33% respectively for each of the three qualities) states of the units. The Relative unit strength color will be applied to the unit card. The Bars beneath the unit card will sit on a flat black background.  The three colors, and the colors of each respective Relative unit strength bar, will be customizable in settings.

AI

The AI got some tweaks last night, with a parrying action being added for entities, and a rework of action timing. Parrying and blocking are both ultimately done to block attacks from contacting and causing damage, but which is chosen is meant to be a choice of equipment and/or situation. Blocking actions would require a shield, whereas Parrying actions is done without using a shield. Blocking an attack incurs a Stamina hit on the defender less than the damage that would have been taken by the hit, while Parrying adds to the enemy attack timers while costing much less stamina to perform the action. Blocking is directional and can block multiple attacks, while Parrying requires timing to hit a specific timed window for each attack. So while you can conceivably parry more than one attack at once, it will require timing, setup, or luck. So each option has a pro and a con, and which the entity decides to use per the AI manager is being weighted according to the state of the entity at the time. Likewise, since Parrying can be successful 100% of the time thing when we're involving AI, the AI Parrying includes a chance that the AI wiffs and misses their parry attempt.

This leads into timers. As mentioned, the parry will increase the timer associated with the parried entity's next attack, as the parry will require a recovery time for the weapon parried. The timer expires quick, but if we have multiple chained together attacks the parry puts a gap between the actions that has to be overcome. This difference in timers is where a lot of the variability in combat will come between AI. Each action requires a timer be expired before another action can be performed, and since each AI will have a different context for deciding between actions, between time and context we produce a load of variation in how AI interact. At least that's the plan.

Working on this has demonstrated that the current context is insufficient, and that I will need to spend time fleshing out what information the entity tracks in it's surroundings as I move forward.

Gameplay

So all of this leads into the next major milestone: Making all of this controllable and playable. All actions mentioned above with parrying and blocking are detailed because it's a decision you have to make with your Playable Character. PCs can engage in combat, and will have each option there for them (Minus the random chance failures built into the AI). PCs will also be able to command and move units around to direct battles. This is the next major milestone after pathing is done and polished.


Goals for the year

I tend to try and be conservative when it comes to setting goals. Pathing will hopefully be wrapped up sooner than later, and once that is done the next bit picture thing to tackle will be an AI manager that deals with larger scale decisions. The game will have a battle mode similar to the current state of things where everything is balanced around fighting with small groups of entities; ultimately however units will be fighting over objectives on a map. In order to manage this, the AI will have to know how to respond to objectives and issue orders accordingly as to where to allocate the resources it has at it's disposal. I want to avoid AI cheats as much as possible, and let the AI make sound decisions based on the state of things on the map. I think making this work will take a lot of time.

The biggest hope I have is to have a workable Minimum viable product this year: a scenario map that I can play, with multiple factions and objectives scattered around. Having that, should allow me to start building in variety, and ultimately will let me play the game I've always wanted to play.

So here's to 2022, and a wide open road ahead. Thanks for reading.

Leave a comment

Log in with itch.io to leave a comment.