Thanks for your videos, Dave. I'm working on an AI implementation for a commercial RTS game and I've been studying the field of RTS AI in general, and Starcraft 2 AI research has been very important and has helped me a lot. I already implemented a BWAPI-style event system in our game logic to build bots on top of, completely decoupled from the core game logic, allowing me to focus on the pure AI logic. I've also added a component to translate 3D world space coordinates into grid coordinates so the AI can "think" in terms of map positions as 2D Cartesian coordinates (aircraft can do the same but have an additional "altitude" field), similar to how we humans think about the map, which also allows me to express rich data about the world/map in the form of 2D textures like heat maps with compute shaders. Your videos have been an excellent guide to understanding the fundamentals of strategy AI and what makes a bot good! 😀
@@DaveChurchill thanks man! The company I'm working for on this has a proven track record so I have no doubt it will be successful. It's planned to be launched on Steam in mid-2022. I'll keep you in mind when that day comes and would love for you to try it! 😁
Great stuff. Must be hard for people not acquainted with broodwar to get into the game. And really like the connection with BWAPI, it touches a lot of useful points.
How exactly do you go about creating the logic for the various tile maps and how they interact with various aspects of the game? Is the tile map logic preloaded with the map? Great video thanks so much!
You don't create the logic, the game operates on that logic. So if you want to build something, it only accepts BuildTile coordinates. If you want to attack something, it only accepts pixel Position coordinates, etc. You can see it all in the API
Hi, Dave. You've mentioned that the code running on each frame does actually block the game? Is it possible to create a separate thread for AI to mind it's decisions and only trigger the resulting commands in the onFrame() function (to not block the game flow)?
Of course it is possible to use threads, but I don't want to go into that topic because it's something I'm not very good with :) But BWAPI was not intended to use with threads and is blocking by nature, so you will need to architect your solution around it
Awesome video. I was wondering: is it possible to simulate the clumping of mutas that we are able to do by grouping them with a far-away unit? A great deal of their & zerg's strength comes from muta micro. I'm thinking it's more of a UI glitch/effect that can't be reproduced by interacting directly via an API like this?
the clumping of mutas is because you have an overlord in the control group which lets the group react differently and clumps on the clicks better. without the overlord it doesn't clump. so program it to assign control groups mutas + 1 overlord should be good to go
Hey, with the API you can tell every unit individually pixel precise where to move - and can repeat that basically every game frame. So stacking all your flying units is no problem and bots also do it almost by default. Its easier to give all your units the same command than individual commands. Splitting an irradiated mutalisk off the flock (terran counter to the muta stack in human play) is also very easily as the bot can find the irradiated within one frame. The bot loops over all mutalisks and just selects the one with the corresponding property. Very hard on the other hand is the decision where to attack in the most effective way and how and when to avoid enemy forces. Given the mathematics and algorithms and some tinkering you could do all kinds of crazy formations with your units within an instance. With some dirty trick you could even stack all your ground units and one place, though this is neither advised nor allowed. ;-)
Personally, I prefer the idea of an AI going in blind, no knowledge prior to start, nor knowledge gained without actually exploring to discover. Thus not knowing the start locations.
The Terrans are human in starcraft. They were an force sent out by earth to colonize the Korprulu sector and the events of sc1 take place when they encountered the zerg for the first time after arriving in Korprulu.
I have spent lots of time in Warzone 2100 (published 1998), and Starcraft really looks like a sandbox with trivially balanced units and simple tech lol The AI required in AI is just order of magnitude more complex :(
You know when you've been playing too much of the game when the word "links" sounds like "lings" in your ears. lol ME ME ME. lol Gatta get back to learning programing for my real future. Not in the game. Good to know that it was mostly running on C++
Omg!!!!! Finally someone to explain this game!! Thank you! Hope you defended your dissertation successfully!
Thanks for your videos, Dave. I'm working on an AI implementation for a commercial RTS game and I've been studying the field of RTS AI in general, and Starcraft 2 AI research has been very important and has helped me a lot. I already implemented a BWAPI-style event system in our game logic to build bots on top of, completely decoupled from the core game logic, allowing me to focus on the pure AI logic. I've also added a component to translate 3D world space coordinates into grid coordinates so the AI can "think" in terms of map positions as 2D Cartesian coordinates (aircraft can do the same but have an additional "altitude" field), similar to how we humans think about the map, which also allows me to express rich data about the world/map in the form of 2D textures like heat maps with compute shaders. Your videos have been an excellent guide to understanding the fundamentals of strategy AI and what makes a bot good! 😀
Thanks for the kind comment! I hope your game is successful :)
@@DaveChurchill thanks man! The company I'm working for on this has a proven track record so I have no doubt it will be successful. It's planned to be launched on Steam in mid-2022. I'll keep you in mind when that day comes and would love for you to try it! 😁
@@GameDevNerd what game out of curiosity or are you under NDA
@@Dragoblade811 NDA, and I'm no longer working at the same company. Just waiting to hear a public announcement about it any day now.
Great stuff. Must be hard for people not acquainted with broodwar to get into the game. And really like the connection with BWAPI, it touches a lot of useful points.
Thanks for doing this man been interested in this but rather intimidating to try . You lowered the barrier for us noobs :)
Really amazing resource, thank you.
Thank you! I am programming a video game similar to starcraft and I am adding bots so this is very helpful.
I wasn't interested in AI until I watched this video 🤩
Thank you for this pretty good description for the game
Just an FYI that there is also a Starcraft2 API and a competitive botting scene for it too.
most utile video of this year , for play or learn to make it
This was very very helpful. Thank you sir.
Wow this is amazing
Good stuff buddy.
Ive been watching Starcraft pro play since 2006 and know the game top to bottom, still watching the whole video lol...
Same, I feel stupid since been playing since 1998, yet cannot look away...
Great video! wow!
Thanks!
How exactly do you go about creating the logic for the various tile maps and how they interact with various aspects of the game? Is the tile map logic preloaded with the map? Great video thanks so much!
You don't create the logic, the game operates on that logic. So if you want to build something, it only accepts BuildTile coordinates. If you want to attack something, it only accepts pixel Position coordinates, etc. You can see it all in the API
Hi, Dave.
You've mentioned that the code running on each frame does actually block the game? Is it possible to create a separate thread for AI to mind it's decisions and only trigger the resulting commands in the onFrame() function (to not block the game flow)?
Of course it is possible to use threads, but I don't want to go into that topic because it's something I'm not very good with :) But BWAPI was not intended to use with threads and is blocking by nature, so you will need to architect your solution around it
Can't wait for the SC2 Edition
it already exists
Love it alreaady.
Awesome video. I was wondering: is it possible to simulate the clumping of mutas that we are able to do by grouping them with a far-away unit? A great deal of their & zerg's strength comes from muta micro. I'm thinking it's more of a UI glitch/effect that can't be reproduced by interacting directly via an API like this?
the clumping of mutas is because you have an overlord in the control group which lets the group react differently and clumps on the clicks better. without the overlord it doesn't clump. so program it to assign control groups mutas + 1 overlord should be good to go
Hey, with the API you can tell every unit individually pixel precise where to move - and can repeat that basically every game frame. So stacking all your flying units is no problem and bots also do it almost by default. Its easier to give all your units the same command than individual commands. Splitting an irradiated mutalisk off the flock (terran counter to the muta stack in human play) is also very easily as the bot can find the irradiated within one frame. The bot loops over all mutalisks and just selects the one with the corresponding property. Very hard on the other hand is the decision where to attack in the most effective way and how and when to avoid enemy forces.
Given the mathematics and algorithms and some tinkering you could do all kinds of crazy formations with your units within an instance. With some dirty trick you could even stack all your ground units and one place, though this is neither advised nor allowed. ;-)
nice vid been doing this kinda blind
Does anyone know about an introduction to the sc2ai api on this level?
Personally, I prefer the idea of an AI going in blind, no knowledge prior to start, nor knowledge gained without actually exploring to discover. Thus not knowing the start locations.
Is there a bwapi but uses pythion instead of c++?
just wow!
18:30 it must be Defiler, not Devourer
Keep watching, I corrected myself :D
The Terrans are human in starcraft. They were an force sent out by earth to colonize the Korprulu sector and the events of sc1 take place when they encountered the zerg for the first time after arriving in Korprulu.
Doesn’t mention Age of Empires with other rts’s
I have spent lots of time in Warzone 2100 (published 1998), and Starcraft really looks like a sandbox with trivially balanced units and simple tech lol
The AI required in AI is just order of magnitude more complex :(
You know when you've been playing too much of the game when the word "links" sounds like "lings" in your ears. lol
ME ME ME. lol
Gatta get back to learning programing for my real future. Not in the game.
Good to know that it was mostly running on C++