Jump to content
  • Advertisement
  • entries
    23
  • comments
    0
  • views
    1409

Project: Fraud Simulator

I changed my mind. Licenses.

KrisWolfe

849 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 RoKabium Games
      SAMA tip #10 - Lelantos is a very dangerous planet, be careful of the toxic swamps releasing harmful gas.
    • By Alexander Nazarov
      Hello. I'm creating a Match3 game in Unity and I have some question about it. When player deletes some tiles from the board they should fly into a bascket. Can I create ONE animation clip such that initial value of animation (tile position) will vary but the destination value (bascket position) will stay the same.
       
      This is screenshot of the similar game
       

    • By PocketRoguesLead
      Hello, everyone. Our new game has been released and we need a little feedback:)
      WARED - a unique strategy game with interesting story and missions
      Steam Page


      What can be easier than claiming victory via strategic thought and planning?
      With enough army, victory is assured. But your country's military might is low and without the right strategy and careful planning impossible. Army upkeep is high, and in a stroke of luck, a mysterious person has offered to pay the price in exchange for a small favor. You assume the role of a general of a small country. As the general, you will have to make hard decisions to claim your victory over the enemy and fulfill your mysterious patron's favor.
          
      In the game you will find:
      - A unique approach to strategic thinking
      - Campaign with cutscenes
      - Unique missions that require preliminary thinking
      - Tower Defense style mini-game
      - Hotseat PVP supporting 2 players on a chessboard-style battlefield
      Planned content:
      - 20 unique buildings and units - open in process of passing company
      - Multiplayer over internet/steam
      - More campaign missions
      - Territory conquest and clan wars     
          
       
       

       

    • By Florian Gionnane
      Our team at Darkstar Games is looking for some motivated rigger/animator and character/creature artist to join our new Novel type TCG MMORPG project called "Greater Powers".
      Project members work on their own schedule and on tasks they choose themselves from the list of game assets that are required. Then the art director assigns them shares of corporate stock based on the appraised value of the work completed by the project member. This occurs once per quarter based on what the project member has submitted during that quarter.
      After the Kickstarter, project members will have the option of choosing between shares of stock or a cash incentive program. 
      But the main incentive is for artists to create a great game and get their name out there on a serious project. We are searching for artists intent on creating a great game and building a company with us that has a good reputation for quality
      We're planning to complete alpha end of year, and complete the beta third or fourth part of 2020.
      If you are interested, send me your portfolio to this mail: flosambora123@gmail.com
      https://www.facebook.com/DarkstarGamesCorp/
      https://www.artstation.com/greaterpowers
  • 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!