Contact Info / Websites

New Flash RTS Update 4(AI)

2009-04-05 07:05:06 by ASSHOLELA

Note:For those who have been watching this spot, I apologise for the delay. Beacuse of certain unforseen circumstances, this game will be released at a much later date, which I have not confirmed.
(possibly by July)

Ok,I admit, I was a little overconfident. I have finsihed all the graphics and scripts for each and every single one of the 89 units and structures, but the Ai proved a more daunting task than I expected.

Firstly, the Ai's gotta be adaptable.No matter which map its played on(mind you, this isnt like Tank Wars or Keith Kong's Renegade Commanders (Newgrounds game);where you simply choose the map to play on, in this RTS, the player has the oppotunity to create his own to play on as well; the Ai's got to know where to place its buildings. It cant just place them on any predesignated spot on the map.This made Ai base building a lot harder!The same goes for attacking. I've heard of instances in RedAlert 2 or Tiberian Sun where the enemy just simply sends its attacking troops right through the player's base to gather on the far side( the side of the base furthest from the enemy's base) and only then,attack from there(by then, most of them are dead).Of course, if this was to happen the Ai would be pretty dumb and not worth playing against.The Ai's got to know which is the "front" side of the player's base (even on a map with cliffs, and other obstacles), if it is gonna attack properly.This made it hard to program as well.

Secondly,there are these annoying bugs. In a really complex game such as this, the Ai's got to be very complex as well, and the real chore is just finding out what among the tens of thousands of lines of Ai code that went wrong.(even the debugger is no help.There are just too many variables,making it crash,so its down to trace()).Worse still, suppose the error only came out late in the game(i.e when the Ai has already built its tech centre, for those who play Command and Conquer, but simply won't(for some reason), build superweapons).You've got to retest the entire game until that part ,taking hours, to see if your debug remedy has worked.That consumes a hell lot of time.

Finally, I've put in a series of SNs(strategic numbers) which determines the Ai 's personality and how it functions.For exmaple, an Ai with a large sn_BaseStructureSpreadFactor will tend to build structures sparsely, in contrast to one with a low StructureSpreadFactor.Again, only certain "right" combinations of SNs produce a competent Ai.For example, once i set the Money Spending SN too high and the Ai build a lot of infantry, but then, It won't(or cant),build war factories because it has no money left!Determining just the right values for the Sns seems to take forever.

Nonetheless, I've managed to program only one Ai version (called the Default Ai) which behaves in a very very predictable way(e.g it always builds the structures in the same order and fashion),but is quite competent. I could simply randomize the Sns for diffrent personalities before the game starts, but then again, they might not work.For those who want greater Ai flexibility, I'm thinking of including an Ai editor as well, where users can Create an Ai for themselves.This not only goes for changing the values of those SNs alone,but reconfiguring the Entire AI script using the Trigger Class I've created myself.

Meanwhile, here are screenshots of the graphics to be used in the final version.Hope you like them =).

The pic of the ships is in the subsequent "Empty" Post.

New Flash RTS Update 4(AI)


Comments

You must be logged in to comment on this post.


MrScriblamMrScriblam

2009-04-05 08:15:54

ok.


buthead24buthead24

2009-04-05 10:55:22

looks pretty good, cant wait for it =)


ThAntagonistThAntagonist

2009-04-05 19:33:09

wow...looks great