AI Scripting ?
#2
Posted 07 July 2004 - 10:13 PM
Wildfire Games Artist, Scenario Design Lead
Contact me bobby@wildfiregames.com
#3
Posted 07 July 2004 - 11:36 PM
#4
Posted 08 July 2004 - 12:18 AM
Wildfire Games Artist, Scenario Design Lead
Contact me bobby@wildfiregames.com
#5
Posted 08 July 2004 - 01:05 AM
I think that the choice is interesting
Since Javascript is commonly used online, does that mean that you could have online 'demos' of upcoming mods/stuff?
#6
Posted 08 July 2004 - 01:49 AM
Demos? Not sure what you mean by that, but later on we'll probably have some stuff on the site that talks about modding and gives examples on how to do things.
Wildfire Games Artist, Scenario Design Lead
Contact me bobby@wildfiregames.com
#7
Posted 08 July 2004 - 02:28 AM
And Javascript isn't faster
Wildfire Games 0AD Scripter
Contact me: jeffrey@wildfiregames.com
Support Wildfire Games!
#8
Posted 08 July 2004 - 02:52 AM
Wildfire Games Artist, Scenario Design Lead
Contact me bobby@wildfiregames.com
#9
Posted 08 July 2004 - 01:15 PM
hihihi, no, just kind of kidding, i hope you dont change
"How's my dri.... posting?" :)
#10
Posted 08 July 2004 - 07:08 PM
ZeZar, on Jul 8 2004, 02:15 PM, said:
PHP is a server-side language that is being parsed by a webserver. I think it's absolutely unusable for any 0 A.D.-game-related things except from websites. People have been using PHP for linux scripts, though, but I don't believe it'd work well with a game.
And due to the big differences between PHP and JS, no, they won't be compliant, so you won't be able to write any 0 A.D. script in PHP.
Wildfire Games User Interface Designer and Artist
Contact me: malte@wildfiregames.com
Roma Victor Faction - Winter doesn't stop the Roman Legions...
Support Wildfire Games!
#11
Posted 08 July 2004 - 08:29 PM
Thanks Malte
"How's my dri.... posting?" :)
#12
Posted 03 August 2004 - 05:16 AM
(or a small AI-Faq or something like that ?)
I am sure at aiscripters.com would be alot people who would like to test and mess around a bit
Or some Game-Stats, Tech-Tree`s and such stuff ?
(i know i could search for myself -
great work !!!
#13
Posted 03 August 2004 - 05:19 AM
Wildfire Games Artist, Scenario Design Lead
Contact me bobby@wildfiregames.com
#14
Posted 04 August 2004 - 07:32 AM
Wildfire Games CFO, retired artist
Contact me: jason@wildfiregames.com
Support Wildfire Games!!!
#15
Posted 04 August 2004 - 09:16 AM
So ... if the scripting interface is essentially JavaScript ... isn't this likely to put AI scripting beyond the reach of the average-joe? I mean, you'll need to be a reasonably profficient programmer in order to create your own AI :-/
#16
Posted 04 August 2004 - 03:15 PM
Well, since I will be developing the computer player AI, I will make sure that the scripting system will be as close to AoK ones as the programmers allow.
Instead of setting some variables, we may go the SN-mile, too, let's see. I will also write a top-notch manual on AI scripting in 0 A.D., so it won't be as hard as Javascript might suggest.
Wildfire Games Community Administrator, Webmaster, Human Resources Manager
Contact me: tim@wildfiregames.com
My website: tim-koschuetzki.com
Recent work: PHP Design Patterns | PHP Coding Practices | Stop the Smoking! | My Services | My Blog
Support Wildfire Games!
#17
Posted 04 August 2004 - 04:50 PM
DarkAngel, I have a question about how you're using the SpiderMonkey engine. I'm planning to use Javascript in a game I'm making in Java (Mozilla also provides a Java embedding of JS). However, I'm wondering how you can implement "blocking" functions in Javascript while keeping the game single-threaded. For example, in the AI code for a unit, you might have a function like fire() or walk(x, y) which you don't want to return until the unit has completed that anmiation. Same thing might be true in a complicated trigger effect. But I don't see how you can do this if all that a user-provided JS function does is call your implementation within the same thread. Have you gotten that far with the SpiderMonkey engine? If I can't find a solution, I'll probably be forced to create my own interpreter which keeps a queue of some sort of currently waiting scripts.
One solution to my problem is to make things event-driven, so scripters can implement functions onFireComplete(), onWalkComplete(), etc. It seems very inconvenient to work with for the scripter though, for complex scripts.
#18
Posted 04 August 2004 - 05:36 PM
Guessing wildly (someone please correct me if I'm wrong
It's possible to use closures in JS to emulate something vaguely like coroutines (I think that's what they're called), as a kind of cooperative threading:
function stuff(z) {
var x = 0;
alert("x = "+x);
return function(){
var y = 1;
alert("x = "+x+", y = "+y);
return function(){
alert("x = "+x+", y = "+y+", z = "+z);
}}
} (where "return function(){" means "return now but let me be called again to continue from this point" -- a preprocessor could make it less ugly), then use it with something like var a = stuff(5); // says "x = 0" a=a(); // says "x = 0, y = 1" var b = stuff(10); // says "x = 0", as an independent 'thread' a=a(); // says "x = 0, y = 1, z = 5", accessing the original parameter to stuff()Have the engine code store the function-object-thing that's returned, and execute it again when the blocking operation has finished, and that should vaguely work.
Alternatively, SpiderMonkey supports multiple 'contexts' which might be a simpler solution to the problem, but I don't know much about them or whether they could do what you want.
Wildfire Games Programmer
Contact me: philip@wildfiregames.com
#19
Posted 04 August 2004 - 08:56 PM
Wildfire Games Community Administrator, Webmaster, Human Resources Manager
Contact me: tim@wildfiregames.com
My website: tim-koschuetzki.com
Recent work: PHP Design Patterns | PHP Coding Practices | Stop the Smoking! | My Services | My Blog
Support Wildfire Games!
#20
Posted 04 August 2004 - 09:17 PM
I actually just sent you a private message about the game

Sign In »
Register Now!
Help









