Recently I have gotten really interested in computer programming. Right now I am learning the Java programming language, and have used it to create a simple text based game called Cake Wiz. You may ask, "What does this have to do with economics?" Actually it has quite a lot to do with economics. The game I created is a business simulation game, where the player runs a bakery. I've written this article to explain the economic principles behind the game. Before I give too much away, you might want to play the game first. You can access it here:
(And here's a screenshot. On the page, press the "click here" button to start your game. I wasn't clear about that.)
(Special thanks to good friends Steve and Bennique Blasini for letting me use a page of their business' website for my silly game. They are brilliant special effects artists and if there are any hollywood producers out there reading this: hire BFX Image Works if you ever need some computer graphics done for a film.)
In my game, the player makes four decisions every business day at the bakery:
1. how much cake mix to buy, based on a price that fluctuates.
2. how many cakes to bake from the mix, keeping in mind that cakes expire after two days but cake mix does not expire.
3. how much to spend on advertising
4. what price to sell the cakes for
Without giving away all the secrets how the game works, I will say that the number of cakes you can sell every day is based on four very important concepts in business and economics:
1. The price elasticity of demand. This is a measure of the change in the quantity demanded in response to a change in price. Except in rare cases of "snob appeal", people will demand less of a good if its price is higher. So in the game, if you start selling your cakes for a higher price, not only can the quantity sold fall, but your total revenue might fall if the price increase does not offset the quantity drop. You also might lose unsold cakes to spoilage.
2. Diminishing marginal returns. In this case, I'm referring to diminishing marginal returns of dollars spent on advertising. This basically means that you can spend too much on advertising. At a certain level of spending, every extra dollar spent on advertising may not have as powerful an effect as the dollars spent before it. To explain, imagine that one out of every 20 commercials on TV was for the "Shake Weight." This would probably greatly increase sales of the Shake Weight over not advertising at all. But if 20 out of 20 commercials on TV were for the Shake Weight, what effect would this have? TV viewers would probably say "I get it already!!! Enough with the Shake Weight!!", and the effect of the extra 19 commercials would undoubtably not be worth the extra cost. So keep this in mind when choosing your level of advertising spending in the game.
3. Inventory Management. In my game, and in business in general, you don't want to accumulate a lot of inventory that will go to waste, especially since goods like cakes expire with time. But on the other hand, you don't want to run out of inventory, which will cause you to miss out on extra sales, and possibly lose disappointed customers for good.
4. Randomness. In my game, as in business, you may find there's an unexplained, random element to your circumstances. You should change your behavior to hedge against the effects random fluctuations in demand or the cost of productive inputs.
So basically, the key to doing well at my game is using trial and error to find the right pricing, advertising level and inventory level to make a good profit in the face of randomness.
Hope I didn't give too much away and that you enjoy my game as much as I enjoyed programming it.