# balance productions and consumes

I am looking into whether there is a way to balance the production and consumption of resources in a game over time, with the aim to allow both production and consumption to increase as various buildings and entities level up (or across various difficulty levels). For example a classic resource would be stone, wood, etc. I am not looking for the initial values for building (those I suppose are set by testing it) but is there a formula or a logical process to calculate the increasing amount?

For example, at level 1 the "mine" produces 100 stone per hour and a “house” needs 120 stone to build. How should the production level increase for a mine at level 2-3-4-etc compared to the cost of building a level 2-3-4-etc house? Also, mine level 2 will cost more than level 1 obviously.

My problem is how to balance the game (starting with costs-productions).

• Don't forget to factor in the time you'd like the user should take to reach the final stages of the game. Sep 22, 2015 at 12:15

You hit the nail on the head in your own question, the best way to work out the production / consumption balance is to set the game to certain levels and test it to see how it feels. There are some guidelines that can be followed however, for example say your level 1 mine produces 100 stone per hour and your house costs 100 stone, then it would make sense if a level 2 mine produces 200 stone the house should cost 200 stone.

The key is the percentage increase and making sure that one level 5 mine wont provide far more stone than you would ever need for 10 level 5 houses, that being said you would probably want to build in some reason to level up the production so you could increase production to 200 stone but the cost of the house to 190 (10% improvement). Again the actual values you set will depend entirely on your specific game and will need testing to confirm they don't lead to unbalanced play but these effects can be minimised by ensuring that everything is increasing by a similar percentage at each level.

EDIT:

Just as a note, the overall idea that you would like to implement can be planned and in fact should be! You should have an idea of how the building should upgrade over time and the effect this should have on game play but the initial numbers you guess will likely give different results from expected so testing is the only way to find the best final numbers.

A number of comments to this answer also have insight such as increasing the upgrade by only a percent of the initial building capacity so that it is not always the best case to upgrade etc. but I will leave it to others to go more in depth in these areas if they see it is required!

• A popular mechanic is that a level 2 building would be a % increase of the previous iteration (not 100%), therefore meaning you have to weigh up the disadvantages of using your in game real estate (limited plots, rising price per instance, etc) against the disadvantages of diminishing returns on upgrades Sep 22, 2015 at 12:01
• So i think that the problem of balancing prices-incomes-real estate is really hard to solve. Should i think at it in the beginning of the project or should it be one of he last things to think about? i mean, i give default values and than by testing i will set them in the proper way. Is it correct? Sep 22, 2015 at 12:12
• @PierGiorgioMisley well, what if you program all your game and leave the balancing for the end, and you realize that everything you coded is not 'balancable'? You don't program a game and 'hope' it will be fun once you're done. You should try and find a balance quite early in the process, so you can adjust the game if you need to (chances cost less (in time) in earlier stages of development). Sep 22, 2015 at 12:18
• @AlexandreVaillancourt Ok, the initial one is officially the hardest phase of programming a game :P I already programmed apps but never games, so i ask just a suggestion before a full immersion into guide and tutorials: before starting coding, it's better first of all plan the entire game since start to end, with all costs-limitations-gain per level and after it is completed start coding and testing? Sep 22, 2015 at 12:28
• @PierGiorgioMisley You do not have to plan everything, as "fun" can't be completely designed on paper, but you should have a good idea of what you'll need, and what will require changes and adjustments as you'll have to program your game accordingly (e.g. if you think your building requirement tree seems ok at first you might want to program your game without having it hard coded because you may find out later that it would be more fun to have your mine produce stone or coal instead of just stone...). In fact, you can't plan everything. Sep 22, 2015 at 13:13

I'd start by deciding on what resources will be used, all of them, including time, space, etc, and seeing which ones have what kind of limits based on the logical consequences of the game type. For example Clash of Clans style game will have limited build area which makes the space consumed factor more valuable.

Also consider that resources like gold are pass through, the player gets some, has it for a while, then when they spend it, it is gone forever. Space is set in that there is a set amount in the game and once it is all used, they need to either take more space from other entities in the game, or destroy something of theirs to gain the space needed for new stuff. [edit:clarify] This doesn't mean that a set resource can't be variable in a fashion other than direct character choice. I.E. a game with a number of people available as a prime resource might allow extra people to be gained at preset points regardless of how many the character has, such as at the end of certain story missions. Fallout Shelter treats people partially as pass through resource, but it is a good example of more complicated resource management (in it's handling of people, not so much the power/food/water)[/edit]

Pass through is hard to balance because there are no natural controls and thus balance issues develop because of the commonly used increase in scale. At level one peple are dealing with 100s, while at level 10 they are dealling with thousands, and at level 20 they are dealing with millions.

Many games use this increasing scale, but it eventually leads to one of two outcomes, either the game "breaks" because player with millions vs player with 100s is no contest, or it becomes a strategy match amongst those at max level, while all those lesser find it next to impossible to get to max level if they are not on board at the start of the game or server.

Instead, I suggest forgoing the increasing scale and focus on new resource types with new tiers of play and low overall increase in power, instead giving more established players more options, and playing to economy management. Thus a max level mine might only produce two to four times the resources of a level one mine, but having more mines takes away from the space that might otherwise go towards factories. In other words, grow more in versatility than in power. Gaining new defense or attack types that overcome other attack or defense types. Guns are good compared to swords, not so much because of how much damage they deal, but because they can't be dodged, they pierce extremely well, and they redifine rapid fire. A sword will deal more damage than any bullet, well anything less than a fifty cal.[/edit]

As a player advances, they can start drilling for oil, which can be used for fuel, which allows for a new set of vehicles, which are better in some ways, but not in others, for example tanks might be more powerful, but horses can travel through terrain that tanks can't, ensuring that strategy of the player allows even low level players to not be automatically stomped by high level ones.

High level smelters might refine metal ore into not just iron, but also aluminium, which allows the construction of aircraft, changing the dynamic of strategy.