"automining " exists in Broodwar, question is how to use it to make worker split more efficient

When you send 2 to 3 workers to a patch sometimes they split by themselves …

The question here is …
Why and how to use it to make your split more efficient… i even saw programmers use it, thouth i dont know if this is something more rare or used all the time …
Some examples are Flash, eonzerg, etc.

I have noticed it has something to do with proximity of the other patches, workers way and clicks …
Somebody knows something about this?

1 Like

Automining doesn’t exist in either of the sc1s, not by default anyway. You maybe thinking of autosplitting. Automining is when the worker automatically moves to and starts mining as they pop out. In sc1, if you click on a townhall and then click on a resourse, it will only set a rally point, meaning the workers will go there, but they won’t mine. The splitting, especially with pros, its just lightning fast precision clicking.

But yeah, Ive also noticed that sometimes a group of workers will split after arriving, and sometimes they will just clump there and wait their turn.

3 Likes

THat is the reason i wrote “automining” … :slight_smile:

But do you have any idea how to use it or how it works ?

1 Like

OK Leonix i have some spare time, i will try to answer you.

Starcraft Broodwar was build in 1998, and RTS back then used specific “Best first search” search algorithms. For example the first popular RTS was arguably Dune from Westwood, the way that “distances between objects” where calculated worked by scanning the canvas rendered in the screen and then using “Thre algorithms” to chose which route was the better.

Old RTS used Beam algorithms, or simply “greed algorithms” as they are called. Latter Command and Conquer, Red Alert etc used a better version of this same algorithms but they assumed that you could send units to the whole map, so the canvas was bigger and the said Three Algorithm was buld in such a way that it was more efficient.

You have to understand that computers back then where changing from a 16 bit architecture to a 32 bit architecture. and run on DOS which was an OS that on previous version had no particular way of running parralell threads and process, which is a complicated conversation to have in here. Just know that early RTS algorithms had to work ON EACH FRAME, you could indeed make calculations on other threads, but they could not be managed in Real Time.

Broodwar on the other hand was a game created for 32 bits computers and Well, Windows 95 and 98 and ME latter, which where a more modern approach to parallel process and threads loading, and processor where good enough now to be able to load things both faster and at the same time.

At the same time Broodwar was created in a time where people still had early versions of Intel processor and Pentium processors, which didn’t handle Multi-thread alogorithms.

SO THIS IS WHY BROODWAR ALSO USES BEST-FIRST SEARCH ALGORITHMS AS THOSE OLD RTS BUT THEY DO IN THE BEST POSSIBLE WAY THEY COULD FOR THE TIME, EVEN IF THOSE 1996-1998 PROGRAMMER WOULD HAVE WISHED TO USE PATCHING ALGORITHMS THAT WHERE MORE ADVANCED-.

And here is a key word you have to understand, this whole talk is about Pathing which is a Computer Science and Game Design problem that is used to solve this things.

So to the point, the algorithm used in Starcraft Broodwar is called A* which is a Best-first search algorithm that is actually a veru advanced implementation of such thing. You have to understand that Best-first search algorithms where start being used with roboics as back as in the late 1950`s.

So how does A* works?^, i see no point of explaining this here, as i said before on each frame the “canvas” is scanned, which in Broodwar is the whole map, actually in Broodwar you could theoretically send a unite by code to somewhere else in the map without scrolling the mouse over that location, and this is because processor where capeable of loading a whole canvas of objectas AKA a map.

Also the logic Three algorithms calculated the “best path” or well “first path” to a particular place between 2 objects.

And here you have to udnerstand that games like SC2 they dont just calculate “the first path” they calculate “the best path” and also run some very complicated calculations of wathever is on the way. In boordwar if you send a unit to a mineral that is on the other side of the map and for some reason aunit BLOCKS the path, it will have to calculate the way again. or well… very smart programmers added a small solution to this.

THE MOVING UNIT INSTEAD OF CALCULATING EVERYTHING AGAIN IT WOULD TRY TO MOVE AROUND THE OBJECT WHILE THE NEW CALCULATION IS DONE

you understand?, so if you send a units it will always pick the straight line, if the map has a static object like a three it will include that static object in the calculation, but it wont for dynamic objects, which it will try to resolve while its moving.

In sc2 the story is different, objects are not just “dynamics” or “static” they are moving at different speeds, and have intersection vectors and things like that, which makes SC2 arguably dull, because in Broodwar you have to click to say to the Real Time Engine “CALCULATE THIS FOR ME AGAIN” making Actions Per Minute useful and the game more demanding and fun.

So about your question on autominning, what the unit is doing is just “trying to complete the request for mining” and because the PATH IS BLOCKED is trying to solve it by moving right or left depending ont he situation.

What is the situation depended on?.

On old RTS pathing algorithms (like DUNE) the canvas was loaded right before each frame was buffered, so objects (mountains, buildings etc) where loaded on each canvas render. and the way this was done was defined by the Video Card rendering system !!! which worked either clockwise or counterclockwise, curiously enough Dune used both clock and counter clockwise at the same time in very smart iterations, giving you some freaky epileptic colors if you used old monitors that didn’t liked this.

Broodwar does something similar… but instead of just waiting for the video card to sold all the loading of the screen objects in either clock or counterclockwise manner, it LOADED EVERYTHING IN THE SCREEN aka the map again, and now added “volumetric sense” to objects, so an Ultralisk has lets say 45 pixels and the scv only 22 (just saying numbers), that means that an scv is more prone to move to the right when trying to solve the pathing problem !!. This is because how the objects are programmed… and how each object “size” or “volume” is understood by the engine.

In old RTS engines everything worked with the same volume regardless of the size, because ALL OBJECTS where static on each frame render, but in Broodwar you have “static” and “dynamic” objects, which means that dynamic objects have volumes.

Some volumes are well… on a straight shape… and some are weird… like donut shaped, or even Boomerang shaped, and they change each time the dynamic objects move and render !!!.

So pathing calculates static objects, and dynamic object are solved by moving either left or right, adn the volume of the object gives the moving unit an idea of it should move left or right !

DEPENDING ON A BEAM FROM THE CENTER OF EACH PIXEL VOLUME SHAPE!!

so mining… all mines are static, so depending on the position the worker is approaching to the mineral it will draw a line when it HITS (actually 2 or 4 blocks before it hits) and start thinking where to move, left or right, (are there any other static objects to the right? if yes move LEFT !!).

Long story short that is how it works. The curious thing about “volumes” is that if you have a very fast unit like a vulture or if you click and move the unit fast enough, its “volume” MIGHT CHANGE SO FAST that it might request a calculation that it was prior to whatever the computer processor was meant to calculate, this is why you can “glitch” walk over minerals and this is why you can by clicking force a unit to do crazy things, like shoot faster calling the shoot stack again instead of a pathing solution… (dragons with patrol), arguably making a MUCH better game than SC2 which everything in the map is calculated on each real time iteration.

I hope this helps understanding better.

3 Likes

Question, in this (mining) scenario, what’s blocking the path?

2 Likes

The other SCVs that are already mining and have already saturated the mineral field, isn’t it obvious?

1 Like

Anything that is static or dynamic, or an object that was dynamic and now is static (like a probe placing a pylon for instance) why?, and scv for example.

1 Like

No, workers that are mining have no collision/hitboxes with each other. I get the saturation mechanic, but I’m asking about the referencing of pathing/blocking in mining situations.

For that reason above.

2 Likes

Yeah completely true i forgot about that, now i have to find out if the collision is because the volume is either 0 or negative, or it becomes a different kind of object. Besides that the facet remains, the path when object will make the unit decide which direction to take before you ask it to calculate it again by moving or a moving. Good point Beast.

1 Like

Funny enough, literal auto mining actually does exist in the N64 port of Starcraft. See for yourself:

2 Likes

that was a beautiful port… such memories.

2 Likes

Ok, thank you very much …
I really appreciate the time you invested into this post, cleared many questions i had and created many more :), in others words one of the best post i have seen.

Now to the questions :

First " you understand?, so if you send a units it will always pick the straight line, if the map has a static object like a three it will include that static object in the calculation, but it wont for dynamic objects, which it will try to resolve while its moving." , the question here are buildings and units static Objects, since both could become dynamic in the case of terrans, and if units are giving a target they try to go there, on island maps they couldnt get there directly …
But they still seem to try to get there, which confirms what you said, but it seems also that they try to get the closed to the point where you sent them, since Cliffs would be static objects or not ? … In broodwar when you got a ramp they normally try to get up that ramp, a thing i noticed the first time i played SC 2 was that my units dont do this necesarly, often when the ramp is totally blocked they didnt even try to get up, but run around the cliffs … This might have something to do with the different path finding in each game … Is there some form of proximity where they dont even try to get to the point you send them, since when you are at the edge of island and send them to a near point where they cant go, they just dont move or do they calculate that fast and know, this is the nearest point possible ?

  1. I mean if you send your workers to mine they will mine, sometimes they just get straight to the next patches, sometimes they will “wait” their turn, my question is why or better when do they do one of them and how to influence it ?
    Until now, i had the impression, if the first worker or the worker before the worker has little time mining they will just go to next patch, maybe even the " zero space Taking" ability of the workers when they are on the way to mining or to gas has something to do with it … Since the workers can glitch into each other, sometimes the next worker is just glitch into the next one and cant get out of the first worker or registrate that it is not his mining … Of course this is more speculation, but i have looke closely on the process and that are my thoughts on this… Can you confirm or deny this… and more important how can this be used to make the inical split better, more efficient ?

  2. Are not moving units/ buidling static ?
    And are the volume shapes fixed in the sense that they always are the same or do they differentiate depending on pathing way, or do they totaly change based on directions or any other factor? What happens when you stack workers than, since they would have a certain shape…?
    Why only left or right? No up and down ? or horizontal… Has the isometric view, graphics and the square grid with isometry layered on top something to do with it ?

  3. what do you mean with “like shoot faster calling the shoot stack again instead of a pathing solution… (dragons with patrol)” ?

Thx for your effort

Sorry, I meant the mineral field / patch that is already saturated is what becomes an obstacle. Basically, if you send a worker to a saturated field, it will await some time to see if the other workers release it to start mining it, or (in case it’s fully saturated) it will look for another mineral field patch to mine.

Iam not sure …

Best example just send the inical 4 wokers in any game you start to one patch … And see what happens …
You can clearly see that it kind of checks, but goes the fastes way to the next patch …
and it seem the stacking has something to do with it …
Since if the secondand follows worker are to near the will wait until the incial has mined is part and leaves… IF they are not close enought, they just go to the next patch …
Also, iam sure if it is wise to use the word satured in this discussion …
Since, what does it even mean?
Normally i see this word often in the discussion of how many workers for Gas and patches …
“fully” Saturated/ saturation is normally considerated the minimal number of workers needed to extract the maximum of ressources from either gas and/ or minerlas …

The thing is 3 worker pro Gas is considered fully satured, but on most if not all gases 4 is actually the total full saturation, but since the benefit of 4 compared to 3 is so minimal since it only gives a tinny bit more, nobody uses it and it is even considered bad…
On the minerals part we can find a similar approach, some if not most considere the 2,5 workers/patch the best "saturation " ´, but it is not the fully saturation, and terran and protoss find themselves often with even more as that before they can expand.

Hi no problem i like this stuff as i am bulding an RTS so i am learning a lot about this on the latter weeks.

Yes buildings are static objects, when units stop moving they also become a Static object, or should i say better, they leave a temporary static object the same size as the volume they are on.

cliffs are static objects but they have “walkable areas”, i suposse they could have created a Dynamic unit with a walkable area also, it was never done.

In sc2 there are flags that turn on or off when the pathing three find something like a ramps that is being blocked, they didnt have this amount of memory back in 1998.

The max proximity is the max size of the map, that is 256, so you can literally send a unit in a 256 nodes wide straight line.

Curious you ask about the island, island works exactly the same as when a ramp is blocked, they will try to get there but as they CANT resolve left or right to find a path they will stay put. Sometimes they will “dance” because they cant solve left or right easy enough, this is because the volume of the objects is way to big to the line that is drawn from the middle of the sprite map of each object. This draw line has a fixed size, in SC2 some “beam” lines are always drawn, but they work diferently, as objects have proximity flags, and when something is coming close they would start drawing a line and sending data, in Broodwar instead this “volume to volume” line to resolve left or right is only drawn when the unit hits, SC2 pathing is state of the art.

That is interesting, you have to understand that internally in the game there is a “stack” of actions for given objects, think of the gas chamber, why cant 2 units be inside at the same time?, that is because the “mining gas action” is still being used, same with minerals, when there is another unit mining a give mineral object the scv will see that and say “this mineral is being mine so ignore” (even if the worker using the mineral is on the other side of the map, in sc2 workers would know “this guy will take some time to get here i could mine meanwhile”)

Another thing that can happen is that you give the worker the “instruction to mine” while the mineral object is going OUT of the state “being mined”, this would make the worked stop in front of the mineral. This happens sometimes during gameplay as you might have encountered., that is because this actions they dont have return triggers for “what to do if this fails”. The same with pathing, if the path fails they would NOT CALCULATE until you left click again. As a curiosity, players that lag more tend to find this problems more often.

The only trick i can think of is this:

MINE WORKING TRICK

i practiced this quite enough… and it works, nobody use it has literally no effect on the game, will give you low advantage, but is fun to get done.

Dynamic units behave diferently than static units, the engine CANNOT alow itself to render all moving objects on each game or map render, so sometime you can glitch over units, or make old glitches like placing tanks under barracks. They do diferentiate while they move 1! dragons change chape, as lurkers do etc, this is why sometimes the game is great, because old RTS made all objects the same type, the same for projectiles, while in Starcraft dinamyc units change shape, latter Age of Empirs would implement a much better algorithm where Dynamic objects could also have “projectiles” that became dynamic objects, and also they would even move not only in 8 axis but several other axis, making it way more complicated.

What i meant is that internally the game is looping a game stack, lets say you ask a dragon to move, then shoot, the stack will loop the actions, but you can SHOOT a little bit FASTER by “refreshing” that stack loop. Stacks are memory structures that are ordered from frist to last, or from last to first, meaning you cant access instruction 3 without going first through 1 and 2. In pathing this means that if you send a unit in a path you can stop the calculating of that pathing fast enough to recalculate the pathing again.

Yo, I kind of want to know more about this RTS you’re building, mate

1 Like

I would love to share it once i have a prototype and everything sealed and branded to my name, because honestly? the idea is working good, i have no publisher and i am using Unreal Engine to prototype, tho at some point i have to not rely on C++ unreal scripting any more and jump into making my own engines and VM Binary implementation of my core code… which sounds like roughly a year and a half more.

My objective is to have a good prototype working and copyrighted the right way (my country doesn’t copyright digital media, only CODE as it would any other book), which means i have to do it either on Mexico, Colombia or Argentina. Once i have that Prototype i will try to sell it to someone, Blizzard is a great place, i am sure is THAT great as to call someone attention to it.

1 Like