stratagus-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Stratagus-devel] AI in stratagus


From: Crestez Leonard
Subject: Re: [Stratagus-devel] AI in stratagus
Date: Thu, 28 Aug 2003 21:13:21 +0300

On Thu, 2003-08-28 at 22:35, ludo wrote:
> NEW_AI only play an immutable sequence of attack/defend schema... It always 
> send units in the same order. It can't actually handle complexes actions 
> (like the transporter exemple ). 
> Writting much more complexe AI scripts would lead to a somewhat smarter  
> computer...
Indeed, perhaps we could add some sort of hooks (what do when attacked
or, when we can't reach the target).
> 
> For unit AI, the same problem applies when it comes to handling new resources
> types...
> I agree that existing actions work fine. But if you need something that is 
> not 
> already existing, you have no way to do it without hacking the source for the 
> engine. ( and if you are not a great coder, that may be a challenge ... )
I think it's better the way it is. we can add all sorts of flags to the
UnitType struct and change the way units act. Yes, you need to change
the source code when you add something new, but it's a lot faster this
way. There is hardly anything scriptable executing per-frame, and it's a
good thing. Even resources can be configured(currently only wood is
hard-coded)
> Moreover, if you keep the hardcoded model, the engine will need to provide 
> each actions required by any of the games based on it, or each game will 
> require a patch to the engine... 
I don't see any problem with it.

> It really depends on how it is implemented. Simple action can be kept 
> hardcoded ( as move, ... ). In this case, the script will only be used from 
> times to times. Moreover, since the script is kept simple, its memory cost is 
> kept low... Let say 512 bytes per unit... You get no more than 200Ko for a 
> whole game.
I am more concerned about CPU usage. And think that you are talking
about almost doubling the unit structure.
> I already have such a script engine working. ( http://sscript.tuxfamily.org )
We already use scheme for scripting, sorry.

please respond to the list too






reply via email to

[Prev in Thread] Current Thread [Next in Thread]