|Adding combat, still struggling to find a good gif solution on mac. Note: All art assets are placeholder.|
In the last post I had a Combat Table of Contents like this:
- Combat Flow - creating an event queue
- Combat State - basic layout for the combat state
- Combat Action - putting the last two pieces together with animations and more UI
Once you're tooled up you can enter the big door at the top (my excellent programmer art skills have used many small doors to make one big door.) Then you get into combat.
There's a lot of detail involved in JRPG combat, the base is the event queue which controls when events take place (attacks, spells, player command prompts etc) but there's also a lot of state information for each character :
- Are they casting a spell?,
- What animation should they be playing?,
- Did they just die?
Then there are animations and special effects. Also a way is required to select enemies and allies in order to direct an attack or spell. There's also loot and exp tracking. The general UI flow; presenting players with a party member's combat commands or displaying the inventory. There's a lot to cover!
The next immediate tasks are selecting an enemy to attack, adding the add event to the event queue and having it play out. Then doing a very simple attack calculation and applying it to the enemy. Then fleeing, then items, a more complicated attack calculation and finishing up with some simple enemy AI.