Creating a game part 2

I have never prescribed to programming a game in a linear path.  In school, we are covering the Software Development Life Cycle, and it’s phases to create software.  While I 100% agree that an approach like that is very effective for large projects such as games and utility software, I have always prescribed to an approach where I list what features I want and I tackle them 1 at a time.  I always end up jumping around quite a lot during the development though.  In this case, my code is creating a game.  We have a story, but now I had to think of the mechanics.

What do I mean by mechanics though?  Simply put, I am now concerned about how, when a player picks up the controller, does he play the game.  What buttons will do what?  How do you interface with your environment.  Will you pick up items by stepping on them, or will you have to press a button.  Most importantly, at least starting off, is how the main combat system will progress.

So, I know it is a jump, but I kept thinking about Zelda as I was thinking of the mechanics of this game.  The idea of having a certain number of hit point counters which are smacked down as you lose your health (the hearts and quarter hearts) was stuck in my head.  But then something struck me.  I don’t want a game like everyone elses.  I want a game which has a new element which most games ignore entirely.  Player age.

Now, you might be thinking of Fable, where the character starts out as a kid and grows up after a cutscene, that is not what I mean.

Player age means a few things:

1.  Your player has a fixed lifespan, it will die at a random, yet predetermined time.  While still giving you enough time to beat the game.

a.  Because of the guarenteed player death, replayability might include finding best methods of using age to your advantage.

2.  Your player will grow with age, and as a normal person, show physical signs of aging.

3.  Your stats will be affected by your age.  While you may start low, because you are young, you will peak around middle age, and then go back down to really weak again.

4.  If you try to power through the game, it will be difficult, and if you try to wait to long it will be difficult.

So, aging is a thing, and some games have considered it, but I don’t think in this manner.  So the first thing I had to do was find a way to create a peak age and a waxing and waning statistic.

I decided to go with a variable which would be between 0 and 1 and be called the [Player – Age Modifier] variable.  This variable would be used to modify each individual stat the same based on your age.  The formula for this variable turned out to be -.001x^2+1  I was limited by Project Spark’s math capability of working only with decimals to the third position.  However, for my purposes, this worked fine.  This formula has a start point >0 at -34.  Now, you might be asking yourself why did I chose 34?  Well I decided on 80 as the maximum age, and 12 as the starting age.  80-12=68 and I wanted the peak to be half way, so -34 is the way to go.  I found the formula and graphed it to ensure it would get what I wanted.

Of course, I didn’t have an x value yet for that formula, so I had to get it set up first.  This meant that I had to create the [Player – Age] variable and assign it a value.  I chose to assign it the value of 12.  Now, again, because of how I calculated the [Player – Age Modifier] variable, I couldn’t just put age in their or I would start out over half way through my curve.  To fix this I created a third variable called [Player – Age Correction] which I assigned the value of [Player – Age] [Minus] [46].  This made the value for [Player – Age Modifier]  = [(][-0.001][Multiplied by][Player – Age Correction] [)][To the Power of][2][Plus][1] 

I think instead of using bracket notation, I will be explaining my formulas.  Trying to put all of the tiles like that makes it a bit cumbersome.  Well continuing on then:

The next thing I needed was a death age.  Since I had decided that 80 would be the max age, everything just flatlined from there, it had to be above that.  So I decided to use a random number between 5 and 20, this would give each character a life span of between 85 and 100 years before death.

I then had to consider what happens when someone dies of old age.  Well, I made the words “Oh dear! You seemed to have died.” appear on the screen and 5 seconds later a fade to black and display the game over.

This was cool, I managed to get my modifier number which I could use with other levels, but before I could continue, there remains the fact that a character who is 12 should not look like a character who is 20+  A person who is 20 is typically fully grown and does not grow past that.  This prooved to be a bit more complex as I couldn’t just say: make player size = 50%, then add 10% for a period of time to make 100%, because it would make them 50%, then add 10% of 50% which is 5%, making it 55% which another 10% would be 5.5, so 60.5%, etc.  I also didn’t want the size to be 50% starting off.  I chose 75% starting, with 4% change in size.  This wasn’t exactly 100%, but it was close enough.  I should also mention the reason I choose the numbers I did was it had to make it to 100% in (20-12) or 8 increments.  The final idea of 4% worked perfectly.

I set the age to age 1 year every 1 second for testing purposes, but I will likely use 30 minutes for 1 year in game.  While it doesn’t fit perfectly with the sun, it does show off the system in a time frame which a normal human can bear to sit through.

So once I had the aging system set up, I went to my next idea:  No strength, Attack or Defense stats like the traditional RPG.  I wanted age to have an affect on not just size, but how powerful you are.  A child, as much as a kid would love to be, is not going to be capable of lifting a 100lb sword effectively.  To immitate this, I created a weight system which has a base of 5 starting off, which can be improved through certain magical items, and progression through the game.  Additionally, weight will be driven by age as well.  The closer you are to the peak age, the more you can handle with your base weight limit.  I will have to call this post short because my keyboard ran out of battery power.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s