Not logged in
FAQ  •  Advanced search  •  Login

Survivor + Scripting

<<

dcode

User avatar

Mothership
Mothership

Posts: 2200

Joined: 09.07.2011, 00:59

Post 12.08.2012, 01:34

Survivor + Scripting

Hello everyone,

for the next update I am planning to replace the current hard coded Survivor AI with a scripted implementation using JavaScript and I am going to open source the survivor script to everyone interested. I am doing this because I am fully aware of the fact that the current Survivor is using a quite simple rule set that might not be satisfying enough for everyone. Even though I am aware of this fact, I think that there are other players better able to adjust and extend the AI on their own than I could do that - so I'll give it a try. Everyone with very basic programming skills (JavaScript at best) will be able to understand and extend the AI script.

Basically all it does is to export an ExternalInterface e.g. to send Creeps and providing some methods that are called by the server on specific events. So, for example when a new income round starts, a function is called that then may send creeps, send chat messages or similar. Finally all the logic behind this i.e. what creeps will be sent and with which exact delay can be scripted.

For now I am converting the old Survivor AI to the new script engine and I'll post it in this thread later on. Let me know what you think about it :)

Cheers
dc
Attachments
Simplified.js
Simplified.js Survivor AI
(6.14 KiB) Downloaded 97 times
Think it, design it, build it, run it. That's what I do.

Sponsor

Post 12.08.2012, 01:34

Re: Survivor + Scripting

<<

EricGleek

Big Toucan
Big Toucan

Posts: 274

Joined: 14.05.2012, 07:28

Location: Manila, PH

Post 12.08.2012, 03:33

Re: Survivor + Scripting

Survivor AI? I think is harder and really thought. :shock:
<<

dcode

User avatar

Mothership
Mothership

Posts: 2200

Joined: 09.07.2011, 00:59

Post 12.08.2012, 20:45

Re: Survivor + Scripting

I've uploaded the current survivor implementation to the first post. Additionally, if you plan to add some fancy new survivor game play to the AI, I appended the Interface.js that describes all available methods and constants. The Interface.js is not editable and provided by the server as the link between itself and the survivor AI script.

Interface.js
Server-side Interface.js
(5.91 KiB) Downloaded 107 times


As you might see it's possible to work with a lot of variables like path lengths, map details like number of starts etc., complete creep descriptors and so on. Let me know what you think :)
Think it, design it, build it, run it. That's what I do.
<<

EricGleek

Big Toucan
Big Toucan

Posts: 274

Joined: 14.05.2012, 07:28

Location: Manila, PH

Post 17.08.2012, 03:58

Re: Survivor + Scripting

Where do I put those script files, I'm so confused! :?

Return to Development

Who is online

Users browsing this forum: No registered users and 132 guests

© CreepTD.com · Powered by phpBB · Style by ST Software