The Invisible Hand Shows It’s Face

The Invisible Hand Shows It’s Face

Posted by on Aug 25, 2015 in Game Development

I had a post written up illustrating how testing development theory can reveal opportunities to evaluate assumed notions when it came to mechanics, but it turned out that the post I had written that was based on observations was wrong because my test situation had an incorrect calculation! So huzzah for test cases!

Instead, I give you this, my market testing UI:



In this example, the listing on the left shows all commodity items that I have defined. Each shop will either buy or sell (not both) every item in the system. The price is based on a few factors such as the demand and quantity on hand over quantity recently sold. Because it’s a unified interface, the list shows how many units the SHOP has, and how many the player HOLD has (I defaulted the player to have 1 of everything for testing). Each item also has a BUY (Shop > Hold) or SELL (Hold < Shop) button that loads the item data into the BUY/SELL panel on the right.

That side panel allows the player to move items from SHOP to HOLD (+) or in the inverse direction (-). The direction is based on the BUY/SELL status of the item, although players can move quantity between the cart and the shop until they select CANCEL (abandon), APPROVE (buy), or click another BUY/SELL button. The details panel takes the quantity in the cart, multiplies it by the price per item calculation, and presents a total debit (or total credit) for the transaction.

Standard stuff, right? Here’s where the magic happens:



After having purchased my 8 units, things have changed. I am now significantly poorer, with only 36 credits to my name, but I have 8 more units in my hold, bringing me up to 9 whole units. I’ve also really spoiled things for the next rube who wants to buy silver, as the change in shop quantity has caused the price to jump to 88 credits per unit. Sadly, I can’t afford another item of Silver, although had I bought fewer and not wiped out my bank account, I could return to buy more — at a higher price than I had originally paid.

A jump from 58 to 88 credits for taking a measly 8 units of product is kind of a steep jump, so there’s some fine tuning to be done. Demand is actually a factor based on the makeup of the population in the sector, which is currently represented by a flat percent value. Later on, I hope to add in “event factors” which can shift the prices of entire classes of commodities in either direction based on need or scarcity as a response to things that happen across the universe or just in the current sector.