Step 3: Combat & AI

posted in orphu
Published April 25, 2019
Advertisement
I apologize for the title. The computer player I had in mind is by no means an AI. It's more like a set of commands that are triggered if met a set of conditions, like when the player can configure the behaviour of his characters in games like 'FFXII', 'Dragon Age' or 'Pillars of Eternity'. As we can configure diffretent templates per character, we can adapt them to different combat scenarios. Maybe it's not the smartest approach, but it's easy enough and gets the job done.
 
A quick example:
Priority 1.- FireWave. It only triggers if there are two enemies in range.
Priority 2.- Fireball. Move in range of target and fire this ability.
 
Just these commands, in addition to the ones from other roles, make an interesting behaviour. If commands and combat scenarios are crafted carefully, they are more than enough to provide fun.
 
I left Unity for a while and came back to the combat simulator. I spent some time coding and got a basic system implementation. Each character loads a template with his stats and AI triggers. Then I made a simple editor for this template.
 

Editor1.jpg.2b630aa592641d1c19bbe6fe762bac08.jpg So ugly indeed.

Editor2.jpg.61ca87c5d9faee1a4f827b83574f398d.jpg
 
And back to Unity again. The moment I started the game and these sweet capsules kicked my ass was glorious. 
 
 
 
 
Now it was a game. Maybe a boring one,but a game. The first priority was adding some gameplay variety. A priest and a rogue, to fulfill the genre standards. Once I had it working (including new animations and effects) and was fun to play, I started thinking about giving it some visual variety. I downloaded some free models from Unity Asset Store. I've taken so much from others that mentioning all would require an entry of its own. I realized how easy was to use my combat animator in the new models, and soon I had other units to show. I added another layer of polish to the UI and suddenly it became a working and pretty combat system prototype.
 

NewChallenger.jpg.49d6c73f8d44beac89bd32149c6e567a.jpg Here comes a new challenger

 

 
Still, even if I felt the combat was fun enough, it was too simple. It lacked proper combat stats and formulas, a lot of abilities, more classes, passive skills, equipment... you name it. The combat engine was ready for all this systems, but... wait... what is the point of a combat system without a real game behind? I wanted to be able to tell a story, and there was so much work to do in other areas. So, for a simple prototype, it was enough. I decided my next step: a scripting system to set up world interactions.

RealCombat.jpg

1 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement