BotC - BotScript compiler!
BotC - BotScript compiler!
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.
			
													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!
Never thought a new bot compiler would ever come out, nice job dusk!
			
									
									
						RE: BotC - BotScript compiler!
:O
Maybe we can finally get bots for objective gamemodes?
			
									
									
						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!
Does this mean we can make CTF bots?
			
									
									
						RE: BotC - BotScript compiler!
Llewellyn wrote: Maybe we can finally get bots for objective gamemodes?
Watermelon wrote: Does this mean we can make CTF bots?

					Last edited by Llewellyn on Wed Aug 15, 2012 5:55 am, edited 1 time in total.
									
			
									
						RE: BotC - BotScript compiler!
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)

						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)

- 
				Watermelon
- Zandrone
- Posts: 1244
- Joined: Thu Jun 28, 2012 9:07 pm
- Location: Rwanda
RE: BotC - BotScript compiler!
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!
Good work, can't wait until it's released
			
									
									
						RE: BotC - BotScript compiler!
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)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?
- 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!
o.o Good stuff!
			
									
									
						- Dark-Assassin
- Maintenence Crew
- Posts: 968
- Joined: Fri May 25, 2012 4:25 am
RE: BotC - BotScript compiler!
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
			
													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.
									
			
									RE: BotC - BotScript compiler!
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.
						RE: BotC - BotScript compiler!
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.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.
					Last edited by Konda on Tue Oct 09, 2012 8:53 pm, edited 1 time in total.
									
			
									
						RE: BotC - BotScript compiler!
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)

						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)

- DevilHunter
- Zandronum Tester
- Posts: 635
- Joined: Sun Jun 17, 2012 12:58 am
- Location: Alaska, USA
- Contact:
RE: BotC - BotScript compiler!
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!
Well currently botnodes are generated automatically, although this can be disabled it really only affects performance in very large maps.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.
RE: BotC - BotScript compiler!
ok so now the bots will actually attack monsters right?
			
									
									
						RE: BotC - BotScript compiler!
No, nothing has been changed inside Zandronum yet... it's a long way before someone actually makes any modifications to BotScript...Monsoon wrote: ok so now the bots will actually attack monsters right?
- DevilHunter
- Zandronum Tester
- Posts: 635
- Joined: Sun Jun 17, 2012 12:58 am
- Location: Alaska, USA
- Contact:
RE: BotC - BotScript compiler!
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.
			
									
									
						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.







