Page 1 of 2
BotC - BotScript compiler!
Posted: Tue Aug 14, 2012 10:16 am
by Dusk
So, over the summer I had this pet project that started out with a simple question of finding out how hard a BotScript compiler would actually be like to make and then stuff just went with the flow.
For those of you who don't know yet, BotScript was a scripting language Carnevil wrote for bot logic. It's what makes the bots as smart as they are right now. But, unfortunately, the compiler was lost for reasons I can't remember/am not aware of, locking BotScript out from the community for years.
BotC is a replacement for the original BotScript compiler. It's mostly 100% my own code, except some header files from Zandronum for some macros. It isn't ready yet, but it does compile (at least it does under Linux...) and it compiles proper bytecode.
The syntax is pretty ACS-ish. Basic structure are states and events. A state is, well, a state the bot is in. "StateSpawn" is the state the bot is in by default. Your code will not compile unless you have it defined. A state can have a mainloop (code executed repeadetly, onenter and onexit blocks - defined when you change the state and events that trigger when something happens in the game. Only one block is running at a time, when nothing special is happening, mainloop is executed.
I'll get more documentation up when I get a beta release out.
Source repository is
here, for those interested.
RE: BotC - BotScript compiler!
Posted: Tue Aug 14, 2012 10:22 am
by Catastrophe
Never thought a new bot compiler would ever come out, nice job dusk!
RE: BotC - BotScript compiler!
Posted: Tue Aug 14, 2012 11:27 am
by Disguise
And now we finally have hopes for improved bots! Awesome work!
RE: BotC - BotScript compiler!
Posted: Tue Aug 14, 2012 6:02 pm
by Llewellyn
:O
Maybe we can finally get bots for objective gamemodes?
RE: BotC - BotScript compiler!
Posted: Wed Aug 15, 2012 4:56 am
by Watermelon
Does this mean we can make CTF bots?
RE: BotC - BotScript compiler!
Posted: Wed Aug 15, 2012 5:53 am
by Llewellyn
Llewellyn wrote:
Maybe we can finally get bots for objective gamemodes?
Watermelon wrote:
Does this mean we can make CTF bots?

RE: BotC - BotScript compiler!
Posted: Wed Aug 15, 2012 2:55 pm
by Ænima
I don't see why not. Just set the bot's "goals" to the flag things, and make it their first priority (so that they won't be retarded and run after items when they are carrying the flag).
RE: BotC - BotScript compiler!
Posted: Wed Aug 15, 2012 3:37 pm
by Watermelon
Is there any way to make them run to the flag while killing stuff in the way, or randomly following a per-defined (node) path?
RE: BotC - BotScript compiler!
Posted: Wed Aug 15, 2012 3:54 pm
by Lightning
Good work, can't wait until it's released
RE: BotC - BotScript compiler!
Posted: Wed Aug 15, 2012 4:09 pm
by Dusk
Watermelon wrote:
Is there any way to make them run to the flag while killing stuff in the way, or randomly following a per-defined (node) path?
Perhaps, I haven't delved very deeply into the default bot logic yet. Though getting bots to run along a pre-determined path would probably need some extending Zandronum-wise (like bot node actors and scripted support for them)
RE: BotC - BotScript compiler!
Posted: Wed Aug 15, 2012 4:11 pm
by Zakken
o.o Good stuff!
RE: BotC - BotScript compiler!
Posted: Wed Aug 15, 2012 4:13 pm
by Dark-Assassin
Well, they seem to be able to create a path fine to an Invulnerability Sphere like on Doom2 Map13, though that isn't blocked by any doors and stuff.
Edit: It seems they are able to seek it out if it's in view, and if it's within the node's max spawn height offset, which seems like 32 units or something.
botdebug_shownodes 1 helps a little
RE: BotC - BotScript compiler!
Posted: Mon Oct 08, 2012 8:25 pm
by bazzoka
OH MY GOD! I Cant wait for this to come out :D
RE: BotC - BotScript compiler!
Posted: Tue Oct 09, 2012 8:52 pm
by Konda
Dusk wrote:But, unfortunately, the compiler was lost for reasons I can't remember/am not aware of, locking BotScript out from the community for years.
On the day the botscript compiler was supposed to be released, there was a hard drive crash which deserted all the work that has been put into the compiler, leaving pretty much nothing behind.
RE: BotC - BotScript compiler!
Posted: Tue Oct 09, 2012 9:12 pm
by Ænima
Wow. That's ... Unimaginably suckish.
RE: BotC - BotScript compiler!
Posted: Tue Oct 16, 2012 5:52 pm
by DevilHunter
Hmm.. if we have to go though with making Bot Nodes.. that is gonna be some work. Like the omni-bots that are used in some games like Wolfenstien: Enemy Territory. You would have to go though certain maps, plant some nodes, and hope for the best, they work correctly.
RE: BotC - BotScript compiler!
Posted: Tue Oct 16, 2012 7:29 pm
by Llewellyn
DevilHunter wrote:
Hmm.. if we have to go though with making Bot Nodes.. that is gonna be some work. Like the omni-bots that are used in some games like Wolfenstien: Enemy Territory. You would have to go though certain maps, plant some nodes, and hope for the best, they work correctly.
Well currently botnodes are generated automatically, although this can be disabled it really only affects performance in very large maps.
RE: BotC - BotScript compiler!
Posted: Wed Oct 17, 2012 6:16 pm
by Monsoon
ok so now the bots will actually attack monsters right?
RE: BotC - BotScript compiler!
Posted: Wed Oct 17, 2012 6:50 pm
by Llewellyn
Monsoon wrote:
ok so now the bots will actually attack monsters right?
No, nothing has been changed inside Zandronum yet... it's a long way before someone actually makes any modifications to BotScript...
RE: BotC - BotScript compiler!
Posted: Sat Oct 20, 2012 9:41 pm
by DevilHunter
If anything, there was CoopMarines, which I can't remember who exactly made them. They were pretty decent, but highly outdated now. If anyone can make a working version or whateva of it, would be nice.
But if anything, the bots running in Wolfenstien: Enemy Territory do very well killing you and what not, even with adjusted aim, and random moveskill. It would somewhat be nice to have bots shooting at monsters, to emulate muliplayer play on maps, if one was building one at the time.