A working game

posted in KrisWolfe
Published June 27, 2019
Advertisement

Huge milestone passed just now. I have the barebones of a game, finally. I started this journey in March, with literally no knowledge of C# or Unity, only a passion to get a game that I've always wanted...a business simulator that lets me do what I want to do, instead of just focusing on businesses.

Please ignore the bad and unpolished graphics, that will come with time as my engine is up and running.

So first of all, I have graphs for the price of goods and jobs. The agents in the game have some kind of AI, where they lower their goods prices if they don't get sold and raise them if they do. People seeking jobs also do the same, lowering their salary prices if they don't get hired and so forth. Companies and agents will try to get a good deal first, but some will have a chance to become impatient and just take the best seller or buyers price. This is also going to be adjusted as we go. Here's some interesting stuff:

image.png.b8d1087047f094ef20c64260655d7578.png

First off as you can see, we start up a company. I instantly assigned $5k to any new company to give them a little starting cash. The 1 employee is the player, the CEO. The Orange Recipe is randomly assigned as a farming license. Depending on what license the company starts up with, they will be assigned one of the recipes if they're a producer. If they're a retailer, then they will have a license on what type of goods they can buy and sell...restaurants and supermarkets are the only retailers at the moment. I don't have service companies up, but they will be up and running eventually.

Next up is the market. We have a company and recipe, we need some employees.

image.thumb.png.fd8db09c07a1dde965700ce5b013d750.png

Here's the Jobs market screen. I don't have axis on the graph just yet, but the current price on the far right is at 27.06 salary per hour for farmers. I run the economy through 100 days when the game starts to give us some price history. The graph is a little bugged, not able to be all on the screen, which needs to be polished, but I love that farmers are so in demand. The salary starts at $10 I believe, so as you can see, there are 3 companies trying to get a good salary for farmers, and they have such a wide range of salary bids. It appears all the farmers on the market are hired, which makes sense, because farms are the most basic producer in my economy and there should be a large number of them to support the food. The market sets the price of the farmers. I think one run through the salary was at $100.

image.thumb.png.32e936c134fb917038bfe07e3ef2a6cd.png

Berries are on the downtrend here. Farms that produce Berries are probably in huge amounts of debt since farmers salaries are so high. Goods are chosen and consumed based on consumer preference, which is random at the beginning of the game. Agents decide on a restaurant to go to, based on market share of the restaurants/supermarkets. They then choose to either eat the highest consumer preferred item at the restaurant/supermarket, or they eat the cheapest. So some goods just don't get selected, and this drives their price down since there is no demand.

image.thumb.png.0f270479e98fe15a276e829b3729d048.png

I ran the game through a few more trials until a farmer was available. We can see the farmer setting his salary for 16.24 per hour, while a bunch of companies are setting their bid orders wayyy above current market price. Interesting stuff. The little x button is dynamically made and clears out the order if clicked on, so we can have multiple orders but there's really no reason too at this moment.

image.png.3e52d8f60f6556e51f755353cacb85ef.png

Now we have two employees, one farmer and us, the CEO. let's get us a contract to sell apples.

image.thumb.png.43592733ad41f4d5db8cbff7e071d061.png

Hey good news! Apples are in demand and there's a supermarket that is looking for a contract. We immediately scoop that up.

image.png.70d730fff356cf5305258afed5b22bfa.png

We now got a contract. The length is currently assigned randomly to give the market some chaos so that all the employees and companies don't expire all at the same time. Our employee is now making apples, and if you have a contract for those goods, the inventory will be remitted automatically to your contract and you get paid the price per good...which for some reason isn't on the screen. Need to add that.

image.png.1087e5045cca0eca94c9afeef5bdeec4.png

But unfortunately, that isn't happening at the moment. Inventory count increased by 8 again, and for some reason the contract length went down by two days...yeah we got bugs.

But this is exciting stuff! A working market, orders, contracts, employees, jobs, salaries, recipes. Great stuff :) Pretty important milestone for me, and I'm super proud.

Now to get this game to a state that OTHER people want to play. First off, I need to get the code so that we can actually work for another company instead of owning a company. Secondly, we need to hook up the scheduler so that we can start utilizing skills like "manage employees" and "work at job". And do some bug fixing.

Previous Entry Testing out Generics
Next Entry A bit of a sidestep
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement