Jump to content

Variable interaction and game mechanic formulas (population growth)


masqcrew
 Share

Recommended Posts

Greetings!

Game mechanics fascinate me, especially how one variable affects another one. Sometimes these are simple and abstract while other times they are complicated and nuanced. Collect a certain resource or resources and build a certain building—simple. Then on the other end of the spectrum you've got grand strategy games like Crusader Kings 2 where one decision might have an effect on several variables, no two play-throughs being exactly the same.

Then there are times when you don't know exactly what affects a game variable, at least not at first glance. For example, population growth in many city building games. First, there's housing capacity. People don't usually move in if there isn't a place to live. But then there's other factors, such as job availability, not to mention various things affecting birth and death rates.

Sometimes modifiers are added or subtracted, such as a plus one to HP for holding a wood shield. Other times they are multiplied or divided, creating a percentage adjustment, such as a 2% increase in production. A complex game might use a combination of all of them, along with other mechanics I'm not even considering.

A population formula, for example, might be as simple as the following pseudo code…

New_Population = Old_Population + Population_Growth

…where Population_Growth is a percentage. Could be positive or negative. Certain variables will increase population growth while others will have a negative effect. I've been racking my brain, trying to figure out how to combine all these various things into one easy formula. I think I have a solution. Let me know what you think.

Each variable which affects population growth will be in the range of -10 to 10, allowing easy conversion to a percentage. (-5 to 5 would also work, obviously)

For example, education gets a score of 5, the presence of a post office gets a score of 2, healthcare gets a score of -3, and various other things get their individual scores. In the end there are X number of things which affect population growth. Add up all the individual scores and divide by X to get an average. That average is converted to a percentage which is added to the previous population.

What I've described is a very simple process. I'm aware that it wouldn't work at this level with other calculations. Different scenarios might trigger population growth or the lack thereof.

Anyway ... what do you think? What's your take?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...