Jump to content
  • Advertisement
  • entries
    27
  • comments
    0
  • views
    1772

Project: Fraud Simulator

The creation of the Economy

KrisWolfe

687 views

This weekend was spent exclusively on my economic model. I spent a day planning out what I wanted to do. I wanted to replicate demand and supply, curves and market behavior.

At first I simply tried to replicate the curves explicitly, with quantity supplied, quantity demanded, price and equilibriums, shortages and surpluses. I realized quickly this was folly, because that is more useful for theoretical application and to understand from a top down view of what's going on. I found this out when I tried to say "ok, well with this shortage, what should the price be."

Instead, what I implemented is two markets. A contract market and a retail market. As in real life, logistics for how food gets to the market is usually 4 steps...farms producing the food, sent to wholesalers, sent to distributors and then sent to supermarkets. Very rarely does a farmer just sell to the market itself, and rarely do customers shop at farms.

I'm going to just let the market set the price and shortages and supplies, instead of simulating it. This is actually more exciting because I have a feeling a bunch of things I can't plan for will happen in this ecosystem, and I think it'll allow for a fun game. 

Currently I have customer behavior up and running. They buy from retailers when they are hungry, and seek jobs when unemployed. They start businesses when they have money for it. They shop at retailers based on market share, and they prefer foods over others, but also keep in mind the cheapest food.

Retailers seek goods from Producers, and sell food at a profit. If food doesn't sell, they lower the price. If it's all bought up, they raise the price. They can spend money on budgeting to raise their market share.

Producers use recipes to make goods. They then sell them to other producers or retailers. They acquire more recipes for goods that are in demand when they have money for it.

I think it's a quaint system for my first economic model. The only thing I did not finish this weekend was getting producers selling to retailers. Everything else was tested to make sure it works, although I'm sure there are plenty of bugs once all the systems are linked to each other.

My first design problem I faced was that there was a lot of information I needed linked to each other, specifically with the items. Each company had to keep a list of what price they're selling each good at, and to track market changes. I realized quickly I needed some type of database, but I'm unsure how to hook it up to mySQL or Access. For now, I just have a lot of little classes I'll be putting together.

The economy itself is two for loops. A for loop to go through and throw objects into lists that need to be handled later, like if a customer is hungry, they go into a hungry customer list. Then later I'll iterate through and feed them by buying goods. I obsess alot about cpu footprint, although I have a feeling I should not worry about it since this isn't going into an Update() function...this will all be turn based and only function when a button is clicked. So I wonder how many agents I can have before performance is an issue. That'll be for this weekend.

Another problem I ran into is fatigue. I haven't coded so much that I start to make obvious errors. I finally decided on Sunday to go through and put a bunch of //TODO: comments everywhere, and let my mind rest. Interesting dilemma.

For now, I'm satisfied. The customers work fine with the test data I've given it. Once the companies are up and running, everything is hooked up to constants and will be enjoying to watch my little ecosystem either fail horribly or all prosper together, or watch the companies completely dominate the daily expenses of the customers.




0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
  • Advertisement
  • Blog Entries

  • Similar Content

    • By vvoodenboy
      Greetings!

      Chaotic-neutral, rogue designer is looking for a merry companions to form a fellowship during game-development journey.
      He has a concept for a TCG and an urge to release it.
      Currently the project is in a paper-prototype-testing-tweaking stage.
      There is no concrete schedule since there are some opened questions regarding core mechanics...
      Game's IP is more-less-fantasy-with-mighty-dragons and OFC is totally a very-original-game-changing-idea... totally!
      ...with dwarfs!
      ...and dragons!
      So if you are keen to take this challenge and you have lvl 6+ skills in (and/or):
      Drawing (much much wanted)
      Coding (much wanted)
      Design (wanted)
      you may want to post some details about your interest in this project.
      This long-and-dangerous journey begins in Cambridge, UK.

      Best regards,
      V
    • By Gin Hindew 110
      I am a writer, do some drawing and some game design and i have been building some lore and mechanics for an rpg, i am looking for people who want to make an rpg as a long term project and this lore and mechanics will be actualized and deepened over time
       
      The idea is a standard save-the-dying-world story with the heroes gathering the mcguffins to revitalize it and the bad guys gathering them to take that power for themselves and achieve godhood, the player however starts as a member of an organization called The Sunset Fortress who believe the world is dying because it moves in cycles of destruction and resurrection as a natural development, so, if the heroes succeed the world will reset into the age of humanity once more and wont evolve but if the villains succeed they will indeed become gods but a chunk of the world will be missing as it would become part of their powers, the heroes are stagnation and the villains are a decreasement of the world, the Sunset Fortress aims to survive and be transformed into a new species suited for the new world
       
      The gameplay would be a combination of traditional rpg and base building, with the player going out to gather the mcguffins to power up and grow the fortress while fending off the villains and heroes, the fortress is a bunker and a ship that moves underground pushed by the forced of the planet's mantle so the heroes and villains have to find them and assault them every time the player gathers enough mcguffins
       
      The story would have two parts, one before the end of the world and one after it's rebirth, the idea is that the heroes and villains also survived and became transformed and now want to plunder the powers of the new world to become new entities more suited to their old ideals while the Sunset Fortress wants space for the new civilizations to expand
       
      The overall theme of the story is to accept retirement in order to let the new generations grow
       
      About the mechanics i was thinking in using consumables on a more active way by combining them with spells, for example, boosting healing magic by combining  a spell with a potion or boosting fire magic by combining a fireball with an explosive item, the idea is to avoid becoming a walking warehouse and to add an extra mechanic for variety's sake
       
      Another mechanic would be the transformation of the world, the state of several places and powers before the end will affect what they would become after the rebirth, this will be more of a  positional thing to avoid too much work, for example: if the Unbreakable Spirit gets broken pre-end then after-end the spirit will be in a new form but with a small dungeon and low levels, if the spirit is not broken it's dungeon will be bigger and the spirit will be at a higher level
       
      Also, both villains and heroes will start as clichés but will get some fair points going on for themselves, the heroes think they are doing wrong by damaging the world to save their people but they care more for their people than they care for the world while the villains know they are stealing from the world but there is no point on fighting for a predetermined future when we are the ones making the future, the Sunset Fortress will also have characters that are fine with becoming a new species but some others want to become a new species and then to also become the greatest new species of the new world
       
      At the end the three factions will fracture and the final confrontation will be among the ones that are already satisfied and want to let the world grow to grow themselves on it while the other party wants to get as much as they can for themselves while the world is still young
       
      I have wrote some stuff in spanish, my mother language, i also made the covers 
      https://www.amazon.com/dp/B00U52L75K
      https://www.amazon.com/dp/B00T2TRD1Y
      And also had blog i have not actualized in forever but it had plenty of content back in the day
      http://homo-antropos.blogspot.com/
      You can see some of my drawings here
      Or at my deviantart... sparsely updated too
      https://www.deviantart.com/juracan/gallery/
      As you can see i'm mostly getting out of a period of slumber... gimme five more minutes?
      This will be actualized as i come up with new elements, i mostly want to make a traditional rpg so RPGMaker is fine but if someone wants to use any other engine is up to themselves, i mean, they will be the ones doing the programming so they can choose the platform, i can do some art design but animation may be too much as i have no experience on it, is anyone interested?
       
    • By cloaker
      Hello everyone, 
      Tldr: please skip to questions
      I would like to start creating my own game. I used the Squad Mod kit (ue4) , Maya and substance painter/ Designer and a little bit of b2m for some time now. I also took a look into blender and unity. 
      I did this for about a year on and off when ever I had the time. 
       I followed payed and free Tutorials to get a very basic understanding in game development. 
      I still feel like my workflow is messy and not very "professional"
      There are many answers out there, I feel like iam stuck in reading Blogs and forum posts, searching for a definite answer where maybe there isnt one. 
      "Questions" 
      I need a setup that can do "everything" 
      *please leave your thoughts/answer/tips if you have any. 
      *when possible please link a Tutorial or learning Material to a topic
      Thank you
      1) Hardware 
      Running a "gaming" PC. The one complaint I have is that loading for example the squad kit takes *ages*. 
      8700k, 32gb ram@3600, 2080ti, cheapo nvme Kingston A1000, some tb wd hdds. 
      I would like to put my 8700k in a new pc that I would use as home "Server". And get  a i9 9900k for my Main rig. 
      Server: cheapo z370, wd reds, maybe optane? Small nvme/ssd
      Monitors: two 32 inch 100% sRGB wqhd, one vertical 1080p, one 4k TV for reference and Media consumption. 
      I dont know if every Software is good to use with 4k monitors today that's why ive choosen wqhd. 
      2) Backup, file Organisation and Management
      My worst nightmare is to loose Progress because I f'ed up. 
      File Backups on offline and online Server (like one drive) with automatic sync Software? 
      Version control with git? 
      What's the best way to organize your files local?
      3) Software to learn 
      I am pretty sure I like ue4, Maya and the substance suite. I also use PS and illustrator. 
      There is Software like 3d Coat or zbrush I might consider. 
      Vfx is still confusing me. 
      4) workflow / Pipelines 
      What is the difference between a Pipeline and s workflow. Isnt a Pipeline a workflow in a bigger picture? 
      There are many different informations in the www about this topic. I am still kinda confused. 
      Should I leave my project/files iam working with on the kan Server or work on my Main machine. 
      Is it possible to use the second PC as a helper for, rendering, bakeing Light etc? 
      If youre still reading, thank you very much youre a hero. Maybe you can leave me a reply
      Best regards
       
       
    • By MasterReDWinD
      Hi,
      I am trying to create a set of functions (similar to Libnoise, Fastnoise and the Accidental Noise Library) to manipulate noise with the goal of producing terrain.  As recommended by this article (http://accidentalnoise.sourceforge.net/minecraftworlds.html) I am starting out with a 'gradient' function.  The purpose of this function is to establish a ground level.  I've read the articles many times, along with the previous versions and I can't get my head around this function at a conceptual level.
      I believe that the gradient function maps input coordinates (in my case x, y, z) to a range that I specify (0 to 1 in the linked article), on a per axis basis and assigns them a value based on where they fall within the range?  Assuming y is my gradient axis, the gradient is from 0 to 1 and the value range is -1 to 1 then any y value above 1 or below 0 is clamped to either 1 or -1.  For a y value between the 0 and 1 the result is lerp(-1, 1, y)?
      I did find this question but it didn't clear things up for me (https://gamedev.stackexchange.com/questions/57790/accidental-noise-gradient-function).
      Any clarification would be greatly appreciated.  Thanks.
       
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!