Leaderboard
Popular Content
Showing content with the highest reputation on 2021-08-24 in all areas
-
A Quick Introduction Hello Everyone! Since this is my first post on the 0AD forums, i would like to start with a quick introduction. I've come to know about 0AD quite recently and been playing it since May 2021 (single-player). I have played quite a few RTSs already (namely Age of Empires II, Age of Mythology, Warcraft 3 and StarCraft), but this was the first game that i ever saw a Batch Training mechanic and i love it! Fun aside though, i also started doing some tests to try and use this mechanic to it's fullest potential. In this regard, 0AD sets itself apart from those other games i mentioned because it is an Open Source Project so I could go through the code more easily to unearth the formulas, modifiers, etc in order to make my analyses. So without further ado, let's do some math! The Mechanic Unveiled First things first: How is Batch Training implemented? As far as resource costs and population growth is concerned, there are no changes, but training time (for each individual unit) is greatly reduced using the following formula: BatchTime = BaseTime * (#Units ^ Mod) Where: BaseTime = The time it takes to train a single unit #Units = The size of the group Mod = Modifier, a value that is intrinsic to the Building Type and determines the reduction in Training Time. List of Modifiers: Houses: 1.0 (meaning, Batch training in houses does not reduce training times) Corral, Market, Siege Workshop, Elephant Stable, Special Buildings: 0.7 Barrack, Stable, Fortress, Civic Centre, Carthage Embassies: 0.8 Let's illustrate this with an example: Unit: Spartan Hoplite – From Civic Center (Mod: 0.8) BaseTime = 10 secs #Units 1 by 1 - Time (s) Batched Time (s) 2 20 17.41 3 30 24.08 4 40 30.31 5 50 36.24 So, as seen in the exemple above, Batch Training reduces the training time of units considerably and, on the surface, it appears to be always better to Batch train instead of training 1by1. However there is a tradeoff. You'll only have said units at the end of the entire Training period (which is longer than the time to train a single unit). What this means is that 1by1 will give you readily available units sooner, but in smaller quantities, while Batching will give you readily available units later, but in larger quantities. This is a point to consider, specially in the early game, where we want to gather resources as fast as possible to build up our economy and our army. If we call the amount of time a unit is out on the map ActiveTime (as in it can perform actions such as move, gather, fight, etc), we can say that the method that gives us more ActiveTime overall will be better. Analysis Let's use our Spartan Hoplite to understand this problem. Spartan Hoplite – From Civic Center (Mod: 0.8) BaseTime = 10 secs Let's say we train 2 units using both methods: From our table we gather that 1by1 will produce a unit after 10 secs and another after 10 more seconds, while batching will produce 2 units after 17.41 secs. This means that both methods don't generate any ActiveTime in the first 10 seconds (since no units are out yet) and will start generating the same amount after 20 secs (when the second unit of 1by1 gets done). So what we can compare is the amount of ActiveTime generated after 10 secs but before 20, for both methods. Do note that each unit out on the map generates 1 sec of ActiveTime for each in-game second. This means that 2 units will generate 2 secs for each in-game second and so on. With that in mind we can do the calculations and reach the following table: #Units = 2 Time Elapsed (s) 1 by 1 Batching #Units Produced ActiveTime(s) #Units Produced ActiveTime(s) 0 0 0 0 0 10 1 0 0 0 17.41 1 7.41 2 0 20 2 10 2 5.18 #Units = 3 Time Elapsed (s) 1 by 1 Batching #Units Produced ActiveTime(s) #Units Produced ActiveTime(s) 0 0 0 0 0 10 1 0 0 0 20 2 10 0 0 24.08 2 18.16 3 0 30 3 30 3 17.76 #Units = 4 Time Elapsed (s) 1 by 1 Batching #Units Produced Total ActiveTime (s) #Units Produced Total ActiveTime(s) 0 0 0 0 0 10 1 0 0 0 20 2 10 0 0 30 3 30 0 0 30.31 3 30.93 4 0 40 4 60 4 38.76 As we can see, although batching reached the total amount of units faster than 1by1, that amount of Active time generated in the same period heavily favors 1by1. Now let's see if this trend continues and calculate the percentages to see by how much 1 by 1 is beating Batching. # Units 1 by 1 Batching Percentage (%) Total ActiveTime (s) Total ActiveTime(s) 2 10 5.18 51.8 3 30 17.75 59.17 4 60 38.74 64.57 5 100 68.81 68.81 6 150 108.42 72.28 7 210 157.97 75.22 8 280 217.76 77.77 9 360 288.04 80.01 10 450 369.04 82.01 27 3510 3519.02 100.26 Interesting! As we increase the amount of units trained, Batching slowly catches up to 1 by1 and by the time we reach 27 units, Batching will match 1by1 in Total ActiveTime generated. We can also see that any number of units above 27, Batching will start becoming more and more efficient. Naturally, 27 units costs an unfeasible amount of resources and time (specially in the early game) so we can conclude that by our metric of ActiveTime 1by1 is by far more productive than any amount of batching we can get in the early game. Conscription In the City Phase (last phase) we get access to the Conscription technology (in the barracks and the Stable). This technology lowers the Batch Training modifiers by 10% (Mod = 0.8 to Mod: 0.7) and that is a huge change. Lets do the same calculation, but now with Mod = 0.7. # Units 1 by 1 Batching Percentage (%) Total ActiveTime (s) Total ActiveTime(s) 2 10 7.51 75.10 3 30 25.27 84.23 4 60 54.44 90.73 5 100 95.74 95.74 6 150 149.69 99.79 7 210 216.68 103.18 This means that in the late game (after researching Conscription), given enough resources, any Batch amount > 6 will be more efficient than training 1by1. That is also valid for all the buildings that naturally have Mod = 0.7. Discussion So, the main question that arises from this analysis is: Is the Batch mechanic useless in the early game? My answer is NO and here is my reasoning. THE GOOD: - Batching is great for early game rushes and timing attacks: since we'll be able to pump units much faster that by building 1by1 and we can't afford to build multiple barracks or stables in the early game. - Batching is great for dumping excess resources: Stockpiling resources isn't advisable, since resources don't produce anything while sitting in the bank. Unfortunately it happens sometimes, so if we find yourselves with excess Food, we can just build a Stable and Batch train some horses to explore the map and harass our opponent. - Batching gives options instead on limiting them: If Batching was universally better than 1by1 then there would be no point in having having a choice. By having it's drawbacks, Batching gives more variety to the game by enabling certain strategies. THE BAD: - Batching is less flexible than 1by1: By Batching, we sink a lot of resources and have to wait a considerable amount of time for them to bear fruits. This means that if we need to cancel some of our productions in other to gather resources to build an upgrade or advance phases, the amount of time lost training that group can be great. - Batching eats a lot of population: Population is also a resource. So if we want to Batch train a large group we need to have space available. Also, we'll need to quickly build houses to open more space to not get capped and keep producing out of our other buildings. THE UGLY: - Batching is eclipsed by 1by1 for economy: Since much of our goals in the early game is to boost our economy as fast as possible (and we do that by maximizing ActiveTime), batching does the exact opposite of what it's expected of it. And now in A25, the introduction of the Autoqueue mechanic basically kills batching even more for early game economy. Closing Remarks Well, that's basically all i had to say about the subject. I hope this post wasn't too boring and you were able to enjoy it. I would also like to read your opinions and comments on the matter. If you agreed or disagree with this analysis and why? Any concerns or constructive criticisms are always welcome. See you on the forums and have fun! ===================================//================================== TL;DR (just in case) Which is more efficient in the early game: training in batches or training units 1by1? Well, 1by1 will give you readily available units sooner, but in smaller quantities, while Batching will give you readily available units later, but in larger quantities. By comparing the Total ActiveTime (the amount of time a unit is on the map, ready to move, gather, fight, etc) in both approaches, we get: - From the Barracks, Stable or Civic Center: 1by1 is more efficient if the batch size is smaller than 27. Since batches of 27 are basically impossible in the early game, for economy purposes, 1by1 if far better than any amount of batching. -Batching is better than 1by1 in strategies involving rushes or timing attacks. ==================================================================== EDIT 1: So, considering what @Jofursloft and @Freagarach have said in the their posts, i redid the calculations for batching and 1by1 considering more productions cycles and the ProgressTimeout delay that autoqueue gives. To avoid making this post bigger than it already is, i placed the the calculations and the result tables in the attached pdf. In general, smaller batches (2 to 3 units) break even with 1by1 by the 3rd production cycle, while bigger batches (5 and upwards) break even by the second production cycle. Things are a bit less efficient if you use autoqueue, but not by much. So, as long as you can batch units constantly, batching will always be better than 1by1. Also, the bigger the batch size, the better. Batching Revisited.pdf8 points
-
I think that when talking about mathematics related to a game like 0ad there are 2 things needed: a good knowledge of math and a good experience in the gameplay. Fortunately I have both. Here you make 1 mistake for each: You are considering the case in which we train in batches but you analyze with charts only the first batch. Let's consider the first example in the chart you did (the one with 2 units). What you have to consider is that after 20 seconds 1 by 1 training method seems the to be the most efficient. But you have to consider that the player will continue to train units in batches, which resolves to the following conclusion: Time Elapsed (s) 1 by 1 Batching #Units Produced ActiveTime(s) #Units Produced ActiveTime(s) 20 40 160 (2 mins 40 secs) 2 4 16 10 30+20+10=60 ... 2 4 18 5.18 25.18*2 + 5.18*2=60,72 ... As you can see, after another 20 seconds the batch training method does way better than 1by1 for what concerns Active time. After 2 mins and 40 secs it's 2 units ahead. Obviously the gap of speed between 1by1 and batch training method becomes more evident when you apply the same logic I did with higher batch training numbers. You need to have more experience in the game. 1) Even if there is not a definite rule about it, for early game is not intended only the first minute of playing (wouldn't make sense) but something like the first 12 mins of playing. In these 12 minutes, the gap of speed in terms of economic development between 1by1 training and batch training methods becomes huge. 2) A good player never uses the same batch dimensions but variates it (when I train women in the beginning of the game I like to train them 6+3+2+4+4). 3) You can build houses while training in batches without being slowed down (just manage the correct number of wood you are collecting). In any case, I would suggest you to spectate a pro level match. You will notice that by using the batch training method it's possible to get easily 100 population within 7 minutes, and reach 150 within 10 minutes.6 points
-
Missed opportunity: Writing in the title "The good, the batch and the ugly" ;-)4 points
-
(Bear in mind that the AutoQueue is artificially made less efficient and one loses 0.2 seconds (i.e. one turn) after each entity/batch has been produced while the AutoQueue is on.) See corrected post below.3 points
-
I wondered for a long time if it would be interesting to share my insights about team boni. I will put the boni in tiers (rather objectively) but also in an order (based on my own opinion). Here it comes in increasing order: Pathetic tier: Athens (warships have -25% build time) Many team boni are bad but this is the weakest. If a warship gets finished a bit faster or not is not too relevant. Notice that the bonus doesn't even helps with fishing or trading ships. Weak tier: Britons (healers -20% costs) Well, if you save 50 food for every healer or not is not too relevant neither. Healers are not even a necessary unit. The civ which can make the most out of this bonus are the kushites whith their rank 3 healers from the big temple. Carthage (international trade bonus increased) What even is this? If you trade with an ally and not just with yourself, you will get this bonus. For land trade this is weaker than the Persian team bonus, but it also applies on sea which the Persian bonus doesn't. I calculated that the team bonus increases total gain by roughly 14%. Persians (land trade bonus of 25%) In many matches, trading is not even necessary because in A25 the amount of metal on the map has been increased. Seleucids (Civic centers are 20% cheaper) This looks nice but in comparison to other team boni it's rather weak. You won't save many resources with it. It's especially handy for Ptolemies and Seleucids because it also affects Military Colonies. Mediocre tier: Kushites (Elephants -20% cost and train time) Elephants have been nerfed but they are still mighty. So you can save a lot of resources and time if you want to go heavily for them. The bonus is especially helpful for Mauryas, even though Elephant Archers have been heavily nerfed. Sadly the bonus is useless for 7 of 13 civs. Mauryas (Temples and temple techs -50% costs, build and research time) A nice bonus, because temples and some temple techs are often useful. The bonus is especially useful for: Gauls (can train champs in temple), Carthage (can train champs in temple) and Kushites (can train champs in temples, have an additional big temple). Strong tier: Gauls (smith techs -15% costs and research time) In A25 the smith techs are super important. Every single one of them is useful. So it's also useful to save resources and time while getting them. Romans (civil infantry -10% train time) This bonus brings all civil infantry a bit earlier into the game and reduces the need for additional barracks. So it's good for your economy. Sparta (civil infantry spearmen get 11% health bonus) Only team bonus which makes your army stronger once you reach pop limit and tech limit. Useless for Macedonians, but at the other hand spearmen are buffed in A25, especially those of Spartans and Athenians. Iberians (civil javelineers cost 10% less) Notice that this also applies to cavalry. Javelin civs are now very popular and the bonus helps a lot with booming. Additionally, javelineers are quite a force in this alpha. The bonus is not too helpful for ptolemies, as their javelineers are mercenaries and it's convenient to use melee mercenaries instead of ranged ones. OP tier: Macedonians (20% resource bonus for every market bartering) Can be used to create resources out of thin air with just a market, some starting capital and clicks. And even without that it means usually a nice resource bonus in every match where you barter. The "Generating-Resources-By-Clicks"-Mechanic is rarely abused, but in situations with low resources it can be theoretically extremely helpful, even though it needs a lot of clicks and attention. Ptolemies (1 bonus food per second) A bonus which really snowballs so the economy growth is much faster than without the bonus. In my opinion this is the very best team bonus ever, probably it leads to a bigger gain than any other bonus. At least in games with starting resources which are not too high. So, that's the tier list! I'm curious about opinions of other people - where do you see a bonus in another tier? Where do you see a bonus better than another of the same tier? Should the Athenian bonus be doubled and also applied on fishing and trading ships?2 points
-
I will factor in the team bonuses into my civ ranking for A25. However, I think the Spartan bonus of stronger spearman is more significant than Ptolemies resource trickle. Stronger spearman = winning battles, but you can get enough food by switching to 14 corrals2 points
-
It happens a lot (at least to me) when you batch increment is 5 units for each click and you can't get the exact amount to match the resources needed, what I would expect expect from an UI standpoint is to get the production units capped to the max resources you have (an evenly distributed as @Jofursloft said). This also happens when you try to send resources to another player, if you surpass the max amount of resources you have then it doesn't send anything instead of just sending the maximum possible you have. See: https://en.wikipedia.org/wiki/Principle_of_least_astonishment2 points
-
In July 2009, 0 A.D. became free, open-source software (FOSS), where "free" means both gratis and, more importantly, "free" as in software and cultural freedom. (Specifically, we, the developers of 0 A.D., have made the code and data of the game available under the GPL license, version 2 or later, and released the art, sound and documentation under CC-BY-SA, version 3.0.) Briefly, this means that we allowed anyone to reuse components of 0 A.D. for any purpose, redistribute them and remix them without having to ask us for permission. They are free to make new games using the 0 A.D. engine, they may create remixes of 0 A.D. music, you name it. We did this, among other reasons, because we believe free, open-source software like 0 A.D. encourages sharing, learning and creativity, and we want to encourage people to remix, mod and tinker with 0 A.D. in the future. --- But there's an important condition that comes with these licenses. The main condition we ask from anyone who wants to make their own works derived from 0 A.D. (or parts of it) is that they release those derivative works only under the same licenses we did, or under similar ones. In other words, let's say you want to take a 3d elephant from 0 A.D. and you want to add a funny hat on its head and show everyone on the internet that you made a funny elephant with a hat. If you do this using an elephant from 0 A.D., you must allow other people to reuse the "elephant with the hat" image as much as they want, to redistribute and to remix it, etc., and even print it on posters and sell them if they want to. If you remix an elephant image from 0 A.D., you cannot legally tell people, "you can't use this 'elephant with hat' image without my permission", or require money for the permission to print it, etc. In this way, the creator of the "elephant" image makes sure that the "elephant and hat" work, the "elephant in a dress" work etc. all remain free cultural works. Nobody can legally rip off 0 A.D. works to make their own proprietary art. Rather, the 0 A.D. artwork and all its derivatives will remain forever free for everyone to share and enjoy. --- For many reasons, it is important that we make sure that everything that is bundled as a part of 0 A.D. is released freely. From the codebase and development tools, through the unit statistics, the artwork, the music score and the sound effects, to the stories of the scenarios and campaigns - Everything must be free (as in "freedom"). We must be very strict about this, or we risk disappointing some people who really want to make sure everything they use is free and trust us to keep tabs on these matters. This helps us maintain effective ways for 0 A.D.'s distribution and our public image. So, if you want us to bundle your art contributions with 0 A.D., we ask you to post in this thread to release your artwork under CC BY-SA 3.0. To do this, please copy-paste the following sentence and post in this thread: Please remember this action is irrevocable - Once you release a work under this license, you can never take it back and say, "I don't allow you to remix this 3d giraffe without asking for my permission". --- Thanks in advance from all of us. Feel free to post in this thread if you have any questions. And may your contribution to free software and culture be everlasting.1 point
-
I think that palizades are not being enough effective against cavarly rushes. I noticed this in a 1v1 game I played against @ValihrAnt lately. As you can see from the replay, Vali is able to destroy my palizade and enter it in about 8 seconds using 14 sword cavarly men. How is this realistically possible in real life? I find that a heavy trunk for a palizade is something that should definitely not being easily cut by a one handed sword. This applies not only to palizades, but also walls and buildings like civic centres. In some of the team games I have played recently, I have seen civic centres destroyed easily (30 seconds or less) by an army of consular bodyguards or britons swordmen + champ chariots (units that should not deliver such a huge crush damage). I am not suggesting that walls and palizades should become undestroyable by units, but at least make them a bit more resistant against these units. Otherwise, there are no truly effective ways to counter a P2 athen or carthaginian rush. Thanks to palizades I countered P2 rushes against pro players but just because 1) (against @vinme) he hadn't been confident enough to attack my palizades walls and preferred to go for a P3 boom 2) (against Vali) soon after what you see in the replay I attacked him with a full upgraded P3 army so he had to use his cavarly to protect his base. Project 2 0ad.mp41 point
-
1 point
-
I don't think we need any further mechanics which are based on luck1 point
-
Hi, I wanted to provide an answer for the question if javelin cavalry can defend camel archers.1 point
-
1 point
-
1 point
-
https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/public/simulation/components/ProductionQueue.js#L775 So what happens is that on a progresstimeout (called once every 1000 ms) that time (1000 ms) is allocated to the queue. The time needed for an item is then subtracted from that allocated time until there is no more time left, then it will be repeated on the next timeout. When an entity finishes being produced and there is still allocated time left, that is taken from the next item in the queue. However, when AQ is on, it will just ditch the remaining time and wait for the next timeout. Example: An entity costs 5.6 time to produce. After five timeouts, both queues (with and without AQ) have 0.6 seconds left. The first entity in the row is finished on both queues on the next timeout. The rest 0.4 seconds (1 second allocated time minus the 0.6 it costs to finish the entity) will be discarded by the AQ queue, but will be used by the other queue to start on the next item. That means that after 6 timeouts (== seconds game time), the AQ queue will have 5.6 seconds left for its second entity whilst the normal queue has only 5.2 seconds left. I hope this clarifies it a bit. Else, feel free to keep asking! I was wrong there, as I noted earlier, the PQ isn't updated on each turn, but on progress_timeout (which is 1 second).1 point
-
I made some test and training 6 spearmen takes 1 minute, either with manual queuing and with autoqueue. that time is effectively 6 times the individual training time. maybe some very slight difference may have slipped from my attention, but I'm quite convinced that autoqueue is not inefficient compared to manual queuing.1 point
-
I knew batch training made it more efficiently, but never knew the formula. Whenever I tried to do some analysis on batch training, I just looked in game for what it would look like. So great that you have found the formula. @Jofursloft Batch training is more efficient if you have the resources for it, but you are conveniently ignoring the costs. For a civilization with barracks of 200 wood and 100 stone and a build time of 150 seconds, I use in my following calculations a cost a 300 resources. Now that means if you look 1 barrack training units 1 by 1, you need are faced with the costs of the barracks and the units that are in the queue (100 resources per unit), which I represent here by a total cost of 400 resources. If we look at 1 barrack batch training 2 units, then we are faced with a cost of 300+2*100. So a more fair comparison would be comparing 3 barracks with training 1 by 1 (cost=1200) vs. 2 barracks with a batch size of 3 (cost=1200). In this case the 3 barracks training 1 by 1 perform better. If you want 2 barracks to produce as many as 3, you need to have queued in each barrack 7 units. So I think having more barracks has some merit for booming.1 point
-
This is a small feature I think players who use the shortcut SHIFT + Z,X,C,V... could benefit from. I find that when I use this shortcuts and I have not enough time to see how many resources I have happens what is showed in the video. (The video is obviously taken to the extreme thanks to the cheat "gift from the gods") The barrack automatically divides the number of soldiers I would like to train (but I can't because of resources lack) into the number of barracks I am training them with (in this case divides 1914/3=637), which becomes 637+637=1274, but one barracks ultimately doesn't train soldiers at all. Being 1860 the limit number of units to train whith my resources, I would like it to become automatically 620+620+620. I think that this feature would help all that players who use shortcuts in all that stresfull situations in which you cannot select precisely the number of soldiers to train from multiple barracks. Project 1 0ad.mp41 point
-
1 point
-
i believe in you @KerlMarx ! if you can ride a horse in water while wearing no shirt im sure you can be best 0ad player this is just basic maths.1 point
-
version 25.1.2 Added: option to spawn healers with aggressive stance (default off) Fix: Some minor problem with game countdown1 point
-
1 point
-
1 point
-
1 point
-
I am the copyright holder of original works I post in the Wildfire Games 0 A.D. Art Development forum. I hereby release all original works I uploaded to this forum in the past, and those I will upload in the future, under the Creative Commons Attribution-Share Alike 3.0 Unported license.1 point
-
Sorry, I have to correct myself here. After adding a new batch to the queue, the structure waits one progress_timeout, which is 1 second before starting the next item, be it manually added or by the AutoQueue.0 points