Jump to content
MakeWebGames

Game Economy


Samurai Legend

Recommended Posts

Hello, I just wanted to know how I could make my game economy good when I release it. Any suggestions or ideas?

I want my game to be hard but fun at the same to time. However, the economy I need to balance it out. How much each player has, how much this cost etc. I just need to know how to balance out the economy so the game doesn't get ruined.

Link to comment
Share on other sites

I was working on a feature that generically determined the game inflation. I was doing it by:

Giving the game X amount of money and crystals ie 1 million game money and like 100k crystals. And every time a player would do a crime or course then the money would be taken from the games bank account(s) and given to the player. Also when a player would buy something in game from like a city shop the money would go back into the bank account.

Then I would just query up and sum all the players money and compare it to the bank account and adjust prices on in game items based on that. So if the players had less money than the game, economy is good and items are cheaper but if the players have more money than the game then items were more expensive.

This is just to kind of simulate real world

  • Like 1
Link to comment
Share on other sites

[uSER=68711]KyleMassacre[/uSER] - I love your idea! But how would you do something to decide on the crimes payouts, item price etc. When the game bank accounts will always change?

 

I did something like this:

I added a new field to the crimes table which is called crimePERC which is a percentage which will take out of the games bank money.

So crime 1 will take 1% of the games bank money.

Only the do crime page I replaced the money part with:

$muny = $set['money_bank'] / $r['crimeMONEYPERC'] / 100;

 

And added:

           $db->query(
                   "UPDATE `settings`
                   SET `conf_value` = `conf_value` - $muny WHERE `conf_id` = 23");

 

To update the games bank money. Is this alright or am I doing something wrong?

Also what happens if the games bank money goes into minus?

Edited by Samurai Legend
Link to comment
Share on other sites

I was working on a feature that generically determined the game inflation. I was doing it by:

Giving the game X amount of money and crystals ie 1 million game money and like 100k crystals. And every time a player would do a crime or course then the money would be taken from the games bank account(s) and given to the player. Also when a player would buy something in game from like a city shop the money would go back into the bank account.

Then I would just query up and sum all the players money and compare it to the bank account and adjust prices on in game items based on that. So if the players had less money than the game, economy is good and items are cheaper but if the players have more money than the game then items were more expensive.

This is just to kind of simulate real world

That's an incredibly interesting way of thinking about game inflation, I've seen numerous games that end up having trillions of $'s flying around and become very unrealistic.

Would really love to see this as a plugin!

Link to comment
Share on other sites

That's an incredibly interesting way of thinking about game inflation, I've seen numerous games that end up having trillions of $'s flying around and become very unrealistic.

Would really love to see this as a plugin!

I started on it a while ago and put it in a private bitbucket repo but just never got around to completing it

  • Like 1
Link to comment
Share on other sites

I started this a while ago and never really tested it all that much but I figure we as a community can make it better and possibly work.

In all honesty I have not idea what I need to fix nor do I really have time but maybe we all can.

I'll admit it's not very good and can be better so don't hate but appreciate since something like this can ultimately improve your players game experience.

https://bitbucket.org/KyleMassacreMC/mccodes-economy-manager

Link to comment
Share on other sites

My idea of how to control economy would be to give everything a base value then add or subtract to this base value depending on how the game economy is. I'll take a look at your code now [uSER=68711]KyleMassacre[/uSER]

EDIT

Seems your code uses base prices lol

Edited by Coly010
Link to comment
Share on other sites

Yes [uSER=65530]Coly010[/uSER]! Basically you have to give everything an ideal price for a perfect world. I believe Alain created an article on how he manages items and stuff using Excel which is pretty handy.

Then to calculate the inflated prices you just pass the item value in the constructor and access the class properties and methods based on the items base price.

I even tried to go further and calculate inflation for money to crystals and crystals to money for the standard MCC crystal temple.

If people want to fork it and make improvements by all means do so

  • Like 1
Link to comment
Share on other sites

[uSER=68711]KyleMassacre[/uSER] - I get an error

A critical error has occurred, and page execution has stopped. Below are the details:

PHP Recoverable Error: Object of class MoneyManager could not be converted to string (4096)

Action taken: Line executed: /home/******/public_html/******/test.php:8

 

<?php

require_once('globals.php');
require_once('class/class_economy_system.php');
$mm = new MoneyManager(1000);
$cm = new CoinManager(10);

echo $mm;      ?>

 

Don't know how to fix it or am I doing something wrong?

Edited by Samurai Legend
Link to comment
Share on other sites

[uSER=70283]Samurai Legend[/uSER] I think it's time you learnt OOP. An object, which the MoneyManager is, is a collection of methods (functions) and variables which are grouped together to perform similar tasks relating to the same concept.

You are trying to print this object on screen. Essentially you are trying to print the PHP code, all the methods (functions) and variables. This isn't what you want. Within the MoneyManager file there are methods that will allow you to print the inflated price to the screen.

EDIT: omit the ?> from the end of your file, it isn't needed

  • Like 1
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.

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.

×
×
  • Create New...