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

Project: Fraud Simulator

I changed my mind. Licenses.

KrisWolfe

926 views

This weekend I probably put in around 20 hours with my economy code. I ripped up everything and slowly rebuilt it in a new class, transferring over logic. My controller code is now just a flow controller, and all the logic is contained in the actual companies and contract logic.

So what can we do? Both companies and agents create job contracts, and put them on a market. Sometimes companies decide to just take the lowest contract from the consumers as far as salary goes, and sometimes the agents will take the highest paying company contract. Those contracts get thrown into a active contract list, and the list executes the contract. What the execution is left up to the company's internal logic based on what type of employee it needs.

So far the only company I have is producers, or manufacturers. They have a recipe, and they hire employees to execute that recipe. Each recipe has different conversion times, or time it takes to convert from raw materials to finished goods. I have some goods that come from nothing, and some that require other goods. Apple Pie needs Apples. These companies will create Goods contracts with each other, sending off their inventory for an agreed on price, and they change the price of the contracts everyday that it doesn't get filled in order to be a more attractive offer. I also have productivity in the game, but it currently is just set to 100% until I decide what I want to affect it.

Contracts expire, thrusting agents back onto the job market. Agents and companies both change their prices if they do not get what they want. Agents have the chance to apply to any job instead of just their highest skill. I have multiple skills now. Each of them show up on the market. And the best part of all, it works (at least as far as I can tell).

So what's not in the game? I took out hunger for now, because I don't have a place for agents to shop. I don't want producers to sell goods directly to consumers, I want them to act like vendors and distributors. I need retailers. I don't have a way for consumers to die from hunger, or go shopping. So that's what we're going to fix today.

So, how does a company know what type of employee to hire? I want shopping markets to hire retail clerks, and restaurants to hire cooks and waiters/waitresses. Right now, producers hire only "Good Makers". I thought that I didn't really want to differentiate between farmers and iron workers. But now I'm rethinking all of that.

So producers have "Good Makers" hardcoded into their logic. But what about retailers? Both shopping markets and restaurants are going to look identical. I don't want to make a separate class for them. Their class is just going to be "RetailAgent". They just have input contracts, they don't have output contracts. They don't send goods anywhere. Consumers come to them to consume their goods and pay for it. So how do I differentiate these types of retail agents within their class, but reuse all of their code?

I decided on something called "Licenses". Inside this class will be everything a company needs to hire employees. It will be an array of what skills are needed, so we can have multiple jobs needed. I will have a licensing database to hold all the different licenses, and when businesses are instantiated, they will decide then what license they want. License to sell alcohol, or marijuana, or italian food, or a shopping mart. And depending on the license, it will tell it what type of input goods it needs.

On top of that, we can use licenses to differentiate between farms and iron mines. So there's a bunch of different possibilities. We can even outlaw licenses with a government system in the future.

Anyways, all good stuff, and I have a clear road now on how to have infinite possibilities of company types without having to have a billion different classes. I'll have 3 classes, Retail, Service, and Producer with 3 interfaces for each, and then licenses that tell them what goods and employees they'll provide.

That's the focus for this week...get retailers up and running and hunger back into the market. Also my significant other told me that I needed art very very badly, so I might start researching what type of unifying aesthetic I want for this game.




0 Comments


Recommended Comments

Sounds like an interesting simulation, getting quite detailed! :)

Share this comment


Link to comment

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 Twin Stone Studio
      Hi, my name is Nikola one of the creators of The last roman village. For the next days we are running a Giveaway for 50 FREE copies of the game. To participate please visit  http://twinstonestudio.com/giveaway/612/  All winners will be announced on the release date of the game(26 July) by email( only winners will be contacted no spam for other) Here is STEAM link            https://store.steampowered.com/app/998830/The_Last_Roman_Village/ If you like you may include the game in your website  Thanks  
      Intro.mp4
    • By RoKabium Games
      Metis enemies – "Ovaline" is a static plant with a corrosive and poisonous gel sack that will rupture if you get too close.
    • By Giddens
      Hi,
      My name's Greg Giddens, I'm a game developer, programmer, looking for some help creating art assets for the strategy management game I'm developing.
      The game is called Schism and it's being developed in Unity. Schism is a strategy management game where the player manages a cult and their compound, building the compound to be self-sufficient, recruiting more members, and growing the cult's influence. Additionally, the player will also engaging in turn-based tactical missions to further their cult's agenda.
      Currently the development team is two people strong: I'm programming and co-designing, and my creative partner Steve Peacock is writing and co-designing. We've been developing Schism since February and have the main systems in place. What's really holding us back at the moment is our lack of quality 2D art assets in the form of building sprites, character portraits and scenes, and UI art. However, for the time being we just want to create a short reveal trailer with 2D stills so we can launch a Kickstarter. 
      For the trailer we need 9 scenes of people performing particular actions (more details would be provided once collaboration is agreed) and a stylised version of our title, Schism.
      Unfortunately we're not in a position to pay. We would, of course, pay if our Kickstarter was successful after the fact, however, I appreciate how much of a red flag that may raise with some of you, so please consider this to be a completely unpaid job.
      If anyone is interested please leave a comment with a link to any samples.
      Many Thanks.
    • By RoKabium Games
      For this Screenshot Saturday we are enjoying the warm summer weather but we can guarantee it's not as hot as it is down in the caves on Tartarus. Luckily the suit our Alien is wearing can withstand very extreme temperatures.
    • By redoakbytes
      Hi everyone
      I would like to present my first free mobile game, currently only available on Android. I created it in my spare time at Unity with the help of Corgi Engine and DOTween. It is an arcade game in which you have to pass the level as soon as possible, because the player loses his life every second. However, to go to the next level, we need to run the portal. There are two power ups, double jump and wall jumping. During the game, coins are collected that can be spent on a new character in the shop. There is also a table of the best times. There are no in-app purchases in the game.
      Any feedback is welcome
      Google Play: https://play.google.com/store/apps/details?id=com.redoakbytes.timerun2050&hl=en
      Here are some screenshoots:




  • 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!