BotC - BotScript compiler!

Maps, modifications, add-ons, projects, and other releases for Zandronum. Also includes announcers.
User avatar
Dusk
Developer
Posts: 581
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

BotC - BotScript compiler!

#1

Post by Dusk » Tue Aug 14, 2012 10:16 am

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.
Last edited by Dusk on Fri Jan 10, 2014 1:58 pm, edited 1 time in total.

Catastrophe
Retired Staff / Community Team Member
Posts: 2569
Joined: Sat Jun 02, 2012 2:44 am

RE: BotC - BotScript compiler!

#2

Post by Catastrophe » Tue Aug 14, 2012 10:22 am

Never thought a new bot compiler would ever come out, nice job dusk!

User avatar
Disguise
Retired Staff / Community Team Member
Posts: 359
Joined: Thu May 24, 2012 10:00 pm
Location: Romania
Contact:

RE: BotC - BotScript compiler!

#3

Post by Disguise » Tue Aug 14, 2012 11:27 am

And now we finally have hopes for improved bots! Awesome work!
Image

Llewellyn
Forum Regular
Posts: 578
Joined: Mon Jul 02, 2012 7:12 am

RE: BotC - BotScript compiler!

#4

Post by Llewellyn » Tue Aug 14, 2012 6:02 pm

:O
Maybe we can finally get bots for objective gamemodes?

Watermelon
Zandrone
Posts: 1244
Joined: Thu Jun 28, 2012 9:07 pm
Location: Rwanda

RE: BotC - BotScript compiler!

#5

Post by Watermelon » Wed Aug 15, 2012 4:56 am

Does this mean we can make CTF bots?

Llewellyn
Forum Regular
Posts: 578
Joined: Mon Jul 02, 2012 7:12 am

RE: BotC - BotScript compiler!

#6

Post by Llewellyn » Wed Aug 15, 2012 5:53 am

Llewellyn wrote: Maybe we can finally get bots for objective gamemodes?
Watermelon wrote: Does this mean we can make CTF bots?
Image
Last edited by Llewellyn on Wed Aug 15, 2012 5:55 am, edited 1 time in total.

User avatar
Ænima
Addicted to Zandronum
Posts: 3579
Joined: Tue Jun 05, 2012 6:12 pm

RE: BotC - BotScript compiler!

#7

Post by Ænima » Wed Aug 15, 2012 2:55 pm

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).
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

Watermelon
Zandrone
Posts: 1244
Joined: Thu Jun 28, 2012 9:07 pm
Location: Rwanda

RE: BotC - BotScript compiler!

#8

Post by Watermelon » Wed Aug 15, 2012 3:37 pm

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?

Lightning
 
Posts: 49
Joined: Mon Jun 04, 2012 5:34 pm

RE: BotC - BotScript compiler!

#9

Post by Lightning » Wed Aug 15, 2012 3:54 pm

Good work, can't wait until it's released

User avatar
Dusk
Developer
Posts: 581
Joined: Thu May 24, 2012 9:59 pm
Location: Turku

RE: BotC - BotScript compiler!

#10

Post by Dusk » Wed Aug 15, 2012 4:09 pm

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)

User avatar
Zakken
Frequent Poster Miles card holder
Posts: 935
Joined: Sat Jun 02, 2012 2:32 am
Clan: Power Fragging
Clan Tag: [PF]

RE: BotC - BotScript compiler!

#11

Post by Zakken » Wed Aug 15, 2012 4:11 pm

o.o Good stuff!

User avatar
Dark-Assassin
Maintenence Crew
Posts: 968
Joined: Fri May 25, 2012 4:25 am

RE: BotC - BotScript compiler!

#12

Post by Dark-Assassin » Wed Aug 15, 2012 4:13 pm

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
Last edited by Dark-Assassin on Wed Aug 15, 2012 4:16 pm, edited 1 time in total.
❗ Don't message me for technical or moderation support.
❔ Use the relevant support channels instead.

bazzoka
Forum Regular
Posts: 147
Joined: Mon Jun 04, 2012 10:49 am
Location: Lithuania

RE: BotC - BotScript compiler!

#13

Post by bazzoka » Mon Oct 08, 2012 8:25 pm

OH MY GOD! I Cant wait for this to come out :D
You can say good bye to your thread. Cause i am killing it.

Konda
Forum Regular
Posts: 487
Joined: Thu Jun 07, 2012 5:22 pm

RE: BotC - BotScript compiler!

#14

Post by Konda » Tue Oct 09, 2012 8:52 pm

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.
Last edited by Konda on Tue Oct 09, 2012 8:53 pm, edited 1 time in total.

User avatar
Ænima
Addicted to Zandronum
Posts: 3579
Joined: Tue Jun 05, 2012 6:12 pm

RE: BotC - BotScript compiler!

#15

Post by Ænima » Tue Oct 09, 2012 9:12 pm

Wow. That's ... Unimaginably suckish.
Reinforcements: midgame Survival joining/respawning
Doom64: Unabsolved: Doom64 + Diablo II
ZandroSkins: a pack made by our community
AeniPuffs: 3D blood and bullet puff effects, free to use for your own mods
Squad Radio: a WASD-based radio chat menu, add your own custom sounds!
Mercenaries (on hold)
Image

User avatar
DevilHunter
Zandronum Tester
Posts: 635
Joined: Sun Jun 17, 2012 12:58 am
Location: Alaska, USA
Contact:

RE: BotC - BotScript compiler!

#16

Post by DevilHunter » Tue Oct 16, 2012 5:52 pm

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.

Llewellyn
Forum Regular
Posts: 578
Joined: Mon Jul 02, 2012 7:12 am

RE: BotC - BotScript compiler!

#17

Post by Llewellyn » Tue Oct 16, 2012 7:29 pm

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.

Monsoon
 
Posts: 83
Joined: Mon Jun 04, 2012 7:09 am
Location: USA

RE: BotC - BotScript compiler!

#18

Post by Monsoon » Wed Oct 17, 2012 6:16 pm

ok so now the bots will actually attack monsters right?

Llewellyn
Forum Regular
Posts: 578
Joined: Mon Jul 02, 2012 7:12 am

RE: BotC - BotScript compiler!

#19

Post by Llewellyn » Wed Oct 17, 2012 6:50 pm

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...

User avatar
DevilHunter
Zandronum Tester
Posts: 635
Joined: Sun Jun 17, 2012 12:58 am
Location: Alaska, USA
Contact:

RE: BotC - BotScript compiler!

#20

Post by DevilHunter » Sat Oct 20, 2012 9:41 pm

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.

Post Reply