I’ve been busy over the last week toying with several different approaches to AI for Fractured Empire. While I feel that a pathfinding algorithm such as A* would be overkill for a game that will ultimately have few static obstacles, collision detection is an absolute must so that computer controlled ships can weave in and out of intense battles without simply barreling through everything in its path!
I’ve so far opted for a simple evasion algorithm that scans the immediate surroundings of a ship and maneauvers it away from anything that might cause a collision. The upside to this approach is that it is very efficient. I’ve run a few test battles with this approach that have allowed as many as 200 ships to battle it out without so much as a tiny dip in framerate. On the downside though, this approach doen’t fair well when multiple ships come very close together. In such cases the ship simply steers away from its nearest threat while slamming into another!
Combat AI is also making progress. While combat is a little predicatble as there is only one attack pattern, in large scale battles, the frequent selection of new targets by each ship, as well as having to avoid enemy ships that come flying at them, gives rise to some interesting and unpredicatble battles! As I add new ship classes to the game (something I intend to work on this week) I will add more diverse AI for selecting targets, attacking and even retreating when ships are heavily damaged, something I hope will make for a truly entertaining gameplay experience.
Some other minor updates I’ve made this week are a respawning system that spawns new units into random locations around their factions homeworld. I’ve also been churning out some basic lowpoly spacecraft for the game. I’m not by any standard an expert in 3D (or 2d) modelling and art, but I hope to be able to keep the game playable on as many machines as possible without having to scale down the ship count too much. That pretty much covers everything I’ve done this week, so be sure to keep coming back to check on my progress!










0 comments