Astraeus Player's Guide
Better Workers
GENERAL ADVICE
Keep An Eye On Your Workers
Often students get so focused on the battles they simply assume the workers will just... work. Run a few games carefully watching their actions. Are they getting stuck? Are miners always mining? What problems do *you* see with their behavior.
Division of Labor
This is a team project for a reason. One easy specialization for a team member is to put one person focused on making your miners and gatherers be more efficient. Not everyone needs to worry about this problem!
Draw Things!
Every unit can override the draw(Graphics g) method in your unit classes. Draw lines, circles, etc to denote things like safe resources, danger zones, and where your collector is going next. Trying to code and debug without drawing output is going to be a huge waste of your time!
Benchmarking
When you make changes, do test runs repeatedly on a pretty balanced, generic map like Shattered Space. You can test against a simple opponent most of the time. Record your total resources after a set time frame, like 500 seconds. Do this a few times. Then enable code that you believe improves your resources. Run tests cases and see if it actually makes them better!
Apollo displaying his path and flagging safe resources for pickup. Makes this easier to debug, and looks super cool.
BETTER MINERS
A note on difficulty ratings. Suggestions will be given on a scale of ★ to ★★★★★. More stars represents a more challenging (and rewarding) strategy.
★★ Mine The Same Node
If you watch your gatherers closely, you'll notice that they can get caught on a spot, going back and forth after a single miner who slowly trickles out minerals. This is a big problem with a few solutions, but an early fix is to concentrate your miners on a single node.
A few ways to do so, which may have different benefits and challenges:
All miners simply find the node closest to the base ship
The player class choose a target node based on the average location of your miners and all miners go to that target node
★★ Self Defense and Running
Your miners can be attacked by enemy units. You can choose to make them run away from danger, keep mining, or fight back. The Mining Laser has terrible range, but it has excellent accuracy and does decent damage in an emergency.
Similarly, consider how your miners might interact with enemy gatherers or miners. The mining laser is a weapon, so if you end up in the same spot you could do some damage.
★★ Favor Safe Mining Spots
Rather than simply running away from harm, you'll want to make sure you don't rush into it right away. Look around the map and identify which nodes are "safe" and only send your miners to those locations in the first place.
★★★ All Hands On Deck
Identify when you are approaching late game. For instance, you might have mined out all of the asteroids or perhaps you're mounting an all-out assault on the enemy base. Write some special code to bring your miners along for the ride. Every bit of damage counts!
BETTER GATHERERS
★ Choose when you activate collection carefully
The collector's "pull" effect on activation is strongest when it is close to the target. You may find your collector is slower if you activate it too far from a target. Consider activating at a % of your gather's maximum range.
★★ Running Away
When your collector is in danger, it should run away! But you'll need to think about what dangers are worth running from. Should you run when enemy units are nearby? Any kind of unit? Do numbers matter? What about nearby allies? How and where do you run to? In general you'll want to strike a balance between being too risky and too cautious. Consider testing it by making a simple team that tries to hunt down your gatherers.
★★ Favor Safe Resources
Just like with Miners, you can teach your gatherers to only try to approach safe resources. This is more effective than simply running, but may require a helper method or two.
★★★ Concentrate Resources
You can use the transfer(Unit u) method to give resources from your gatherers to any unit with capacity. If two gatherers are nearby, try to make one be "full" to it can go back and the other "empty" so it can keep gathering.
★★★★★ Resource Manager / Gatherer Queue
By default your gatherers will often rush to the same resources, but only one gatherer can pick up one resource. Create a central system to track resources in your Player class. It then acts as a conductor, telling each Gatherer which resources it has been assigned to pick up. This is a very complex task that most groups do not complete, but it can create massive efficiencies.
★★★★★ Resource Tossing
Your ships can use the dump() method to drop resources into space. They maintain the speed and direction your ship was moving it. You can use this to "throw" minerals towards your base ship and have a special unit with a collector "catch" them. This means you won't need to travel all the way back to the base.
Don't activate your collector unless you're close to a resource. How close? Experiment.
Hades gatherers decide it's time to run
Poseidon dividing up his gatherers across different locations
Team Drive tossing resources back to the base
COMPOSITION
★ Fixed Miner vs. Collector Ratio
At a basic level, you can simply think about a good ratio of miners to gatherers. Notice if there are a lot of extra minerals floating around.. maybe you need more gatherers! On many maps, you might find you want to start with more gatherers than transition to miners once the free resources dry up.
★★ Dynamic Miner vs. Collector Ratio
First, you'll decide what % of your fleet should be dedicated to economic units overall. Then...
If there are more safe, open resources than I have capacity for --> build collectors.
Otherwise --> build miners.
★★ Scaling and Maximum Miners
It's important your team scales up by building more workers over time. However, you have a maximum of 50 units at once. It's possible to build too many workers. In general, they become less important the longer the match goes on.
The ratio between miners and gatherers is critical, and will change between maps and throughout a match.