That is what the update would say, anyhow, if we weren't massively ahead of schedule on pretty much everything. Seriously. Send
All right, maybe we're not THAT close to being finished overall, but the demo is pretty solid at this point. To recap, here are the tasks we mentioned in the previous update:
-Tie up any loose ends regarding UI stuff (DONE)
-Add "Battle Finished" screen displaying EXP, benefits, et cetera (DONE)
-Fine tune Molsha cutscenes (MOSTLY DONE)
-Add final Molsha area (MOSTLY DONE)
-Populate Molsha scenes with enemy spawns/loot drops (YES)
-Add some kind of rudimentary enemy AI (OH BABY--more on this later)
-Sound effects/music (uh... hey, what's that over there??! *points and runs away*)
-Fix lingering issues with character animations/riggings/timings/et cetera (MOSTLY DONE)
And who can forget the most important task of all? (per our master task list):
-??? (DONE)
And really, there are a bunch of other things that got added and completed, but I am far too lazy to list them all out. And it would be boring as hell: "Added code to enable NavMesh agents for acting battle characters while enabling NavMesh obstacles for" See? Boring. So boring that I couldn't even finish the sentence.
Of the tasks listed above, many of them do not need any further clarification. In fact, for the first time ever, I think we can say we are confident enough in some of that shit to not even need to re-do it in the future (or so we say).
If you have read these updates consistently, you'll notice that we refer to AI quite often. For those who do not know, AI stands for artificial intelligence. In this case, it relates specifically to the artificial intelligence of enemies during battle. Up until very recently, the game was setup in such a way that the player controlled both the allies and enemies. While this is kinda cool (and EXTREMELY useful for debugging/testing/et cetera) it does not make for very compelling gameplay.
At some point, we knew that we would need to add AI for the enemies so that they would act independently in battle and ideally, one day, actually present a challenge to the player by acting intelligently. We also decided (correctly, it seems) that AI would be the most difficult task, by far, if for no other reason than the fact that there is no real metric for determining when we have finished that specific task. In other words, there are probably an infinite number of things we could do to increase the 'intelligence' of enemies. OK, it's probably not infinite, but the more mathematical term 'shitload' definitely applies here.
So, the first question is, "what do the enemies even need to do to act intelligently?" Seriously, someone help us. This is not a rhetorical question.
I guess the keyword in all of this this is 'rudimentary' and boy is it ever! The current AI system took just a few days to implement, which is all the proof one needs of its rudimentaritynessosity. It's pretty simple:
-Enemy has a turn
-Enemy finds all allies in range that it could attack
-Game assigns equal probability to all characters (except Apolith, who can modify his probability by taunting enemies)
-Enemy randomly chooses ally within range to attack
-Game assigns equal probability to all enemy skills that could be used (barring range limitations, SP costs, et cetera)
-Enemy randomly chooses skill to use on ally
-If enemy has no allies in range that it could attack, it moves somewhere towards a random ally and repeats the above steps. If there are still no targets, the enemy's turn ends.
That's pretty much it. Nice and easy. The main thing is that it does present somewhat of a challenge to the player. But it's also really bad when it comes down to it, because the challenge in this case is not because the enemies are intelligent, but because their attributes are overtuned. Seriously, there are so many improvements that could be made, it's sickening.
So why even do it this way if it's going to eventually be scrapped? Well, for starters, we don't have a whole lot of time. It would be very easy to go down a rabbit hole that results in the AI being improved in some ways and broken in others, which is not the kind of situation we would want to be in for a live demo. The last thing we want is an enemy launching itself into the ionosphere in lieu of choosing an ability (yes, this happened once. No, I don't know why. Some folks say dude is still up there...)
Another reason is that this is kind of a test drive, if you will. Some programmers (although none of the ones I know) like to intricately plan out the details of what they are about to code. And then they get in there and realize that most of the things they had assumed are not true at all and that there are all sorts of interesting things that they did not account for.
Personally, I like to just run full force at the problem until I get a concussion. After I sleep it off, I like to run at it again and again until both the problem and brain tissue disappear entirely. In this case, the problem is pretty big, but it's easy enough to tear off a chunk (which is the rudimentary part) and just beat the ever-loving shit out of it.
Mainly, it's a learning process. We figure out very quickly which things will work and which things are not worth the time. Again, it's one thing to spend a bunch of time planning out how/where to move an enemy, but if I can't even get the pathfinding to work properly, I just wasted a bunch of time for no reason. No amount of planning is going to tell me that I need to call certain functions in a certain order, only experimentation.
But this does not mean that we have not thought about the AI extensively and it doesn't mean that planning is bad. The better approach, when we get around to it, would actually be to exhaustively simulate and test all possible enemy moves and actions, which is sort of how a chess AI works, but not really at all.
This should not be hard to compute really, since there are only so many combatants in a battle and so many actions that each combatant can take. Essentially, an enemy would put all of these actions in a list and then evaluate them according to some metric. The tricky part would be figuring out these so-called metrics, or, in other words, how 'good' a particular course of action is.
As an example, one metric could be damage maximization. Another could be target vicinity. Another could be whether the ability hits multiple targets. Any of these things, if fulfilled, would add a small weighting to that particular action. Some actions would probably just be complete shit and would be able to be pruned and discarded immediately. Certain ones, however, would have higher scores than others. These scores could be probabilities themselves or they could be absolute values, ie, always perform the action with the highest score.
The truly complicated part of this would be considering the actions of other combatants as well as well as future actions. For instance, suppose an enemy moved to a particular area and decided that there were no targets there at that spot. However, in two turns, imagine that another enemy kicks the ally into range of that particular enemy. Even better if the particular ally were critically injured at that point and would only require a single attack from the acting enemy--except that the acting enemy would actually need to plan out his action based on what will happen in the next few turns. And there are a million potential situations like this.
The main takeaway though is that
a.) basic AI was much easier to implement than I thought, but is implemented nonetheless
b.) better AI is much harder to implement but will have to be put on the back-burner
c.) Kitler is a bitch
Oh yeah, those other tasks... we did manage to improve Bodom's rigging and animations quite a bit. If there is one mistake we made, it was forking over the money for Bodom's character model (we're not going to talk about how much it cost, but just know that I will require a dialysis machine for the rest of my life).
Basically, we got a little impulsive. The character model itself has a few uh... imperfections (and a face only a mother could love... if the mother was blind) and was not actually rigged. We figured, hey, we can rig this ourselves or use an online utility... but we were wrong. (Rigging is the act of actually adding a 'skeleton' to the character so that it can be animated).
Thanks to some alterations to the model, we were able to get a decent rigging as well as find animations that don't look absolutely ridiculous on this character. (I swear the dude's knees and ankles are in the same place, but hey... what can ya do).
Many new particle effects have been added as well and there are only a few skills that are still lacking them. This is pretty low-priority as there are no real 'catches' when it comes to particle systems. Just gotta sit down and randomly change shit until something good pops out.
As for the sound/music... we don't talk about that. Just know that the Bevontule soundtrack will be the first release ever in the genre of "Ethnic Ambient Beatboxing/Whistling"
Bye bye.

No comments:
Post a Comment