Advertisement

Simple RTS AI

Started by September 25, 2007 06:23 AM
2 comments, last by ToohrVyk 17 years, 2 months ago
I'm programming a Multiplayer Tower Defense game. You have a base and you can buld and upgrade towers (shoots incoming enemy units) and barracs (sends units to a enemy base of your election). Now I just pretend to implement a deathmatch mode. I've got no problems doing pathfinding AI and those minor thinks, but if I want a player be controled for AI I'll need somethink more sofisticated. The think is that it is one of the last thinks I want to implement, but in the meantime I'll need some REALLY SIMPLE AI to "debug" the game while I'm adding features. Wich is the best way to do this. Building towers and barracs just randomly seems like... ugly xDDDD Oh, and a decent AI for these game how will look like (I'm planing some fuzzy logic, I understand the basics but I hadn't still implemented anythink. You see why I need a simple AI before? xDD)
I would apply Floyd-Warshall to compute the maximum flow from the creep entry to the creep exit, then try to place a building as close to points of maximum (blocked) flow without actually blocking it. For the choice of tower, I would probably choose the one which provides the highest damage-per second times the amount of flow through the range of that tower.
Advertisement
I googled Floyd-Warshall and it's a shorteth path algorithm for all nodes (Or somethink alike). You would place the buildings (wich trow units to the enemy base) in the node with less cost? What do you mean with flow?
Argh, forgive the mixup. I did not mean 'Floyd-Warshall' but rather 'Ford-Fulkerson'.

This topic is closed to new replies.

Advertisement