Thursday, August 14, 2014

Artificial Stupidity

That's right, it's time for a new build. The main focus in this build has been to improve the AI of the NPC characters in the game. Also, you can now hire crew members which will fight on your behalf in events. Check it out at the following link and the full change list is at the bottom of the post.

So, why do I title the post "Artificial Stupidity". Well, the reason is that there isn't really much intelligence involved. The enemies aren't very smart, but rather simply follow a predefined behavior in a way that makes them appear to be smart. One of the most important pieces of appearing to be intelligent is to be able to find your way from one place to anther. In the world of AI, this is called path-finding. There are TONS of algorithms which can be used for path-finding and each one has its own merits and drawbacks. The one used most commonly in game development is called A* (and it is the one I am using as well). I won't go into the details about it, but if you are interested in algorithms then you should read about it. Either way, the end result is that the enemies no longer simply walk into a wall because you are on the other side of it. Now, they will walk around the wall in order to hunt you down and kill you. Cool.

A* path-finding grid in action

The other major feature that I put into the game with this build is the ability to have a crew on your ship which fights on your behalf. Right now, this is the most simple implementation that I could make, and the only difference between crew members is how much health they have. However, there is a ton of potential to expand this system to make each crew member bring something unique to the game. In the future, I intend to add different characteristics which each crew member might have which would make them valuable. For instance, different ones have the ability to use different kinds of weapons. Also, some might heal you and other crew members. Other still might have the ability to coax enemies to attack them and they can take a very high amount of damage. Putting together a crew which has complimentary abilities will be critical to winning the game.

Hiring some crew for my ship.

In this current iteration, your crew is completely controlled by AI (and a simple one at that). They will look for the nearest enemy and go try and kill them for you. However, I plan to make a lot of changes in this regard in future builds. The first thing I want to add is the ability to assign different AI personalities. For instance, you could assign some crew to be aggressive (like they are now) but others to be defensive and to stay on your own ship and defend it instead of attacking. However, I want to go beyond this and try out adding the option to pause the game and then assign specific actions to your crew. So, if you want to micro manage your crew during a particularly difficult encounter then you can do that by pausing every time you need to and then assigning what actions you need your crew to take. This will add a new tactical element to the game which is currently missing which I think could be super fun.

New slaver ship event in which I have gotten the slavers to surrender.

Lastly, I will leave you with a small taste of what is to come in the next build. Kurt has been hard at work coming up with the actual sprites that we will be using for the characters in the game. Below is a tiny sample of some what he has come up with so far and you should be able to see them live in the game soon! As always, let me know what you think of the build and share you ideas in the comments.

New enemies from Kurt that we will be adding in soon.

v0.8 Change List
- Add path-finding to AI
- Make ranged enemies do line of sight checks
- Allow enemies to grapple across ships
- Add hirable crew members which fight for you
- Add ability to hire crew in certain trade events
- New marooned man event
- New slave ship event

No comments:

Post a Comment