Stock Market Game

From the book “Announcing Computer Games for Business, School and Home” by J. Victor Nahigian and William S. Hodges, this post is about two interesting games: Star Trek and Stock Market. There are many good games in this book, but I’ve chosen these two because they are interesting to me today. In the past, I have written these two programs out on the Commodore VIC-20. They are simplifications on previous games, but when you have very limited memory (5KB and 16KB), you have to cut features.

Stock (Market)

The object of this game is to make more money than the opponent (computer). The mechanism for this game is rolling two dice representing shares “A” and “B”. The first die allows you to buy “B” shares and the second allows you to buy “A” shares. The amount of shares is the value on each die. Selling works the same way. There is a 5% brokerage fee on each transaction. At this point, I’m wondering how much the brokerage earns?

The second mechanism is adjusting the price of the stock. This appears completely made up. You can use your turn to raise the price of a stock “A” by “B” dollars or lowering a “B” stock by “A” dollars.

Overall the program is about 2 pages of BASIC code. So the challenge would be to convert it to C++ or use JavaScript and my LibXOR library. I would rather experiment with C++ for the core mechanic and then convert it later if it still remains interesting.

Star Trek

This program is also two pages of BASIC code, but it feels more dense than STOCK. This game reminds me of an RPG or Pokemon battle. You have the U.S.S. Enterprise and a Klingon ship each facing a different angle. You have to figure out the appropriate angle to fire at the opposing ship. You are given the option to fire phasers, fire photon torpedos, print a status report, change movement, or self destruct.

I’m reading the source code and this game is more involved to describe than the STOCK game, so I will delay that until I have experimented with writing this game out. I am thinking this could be fun to expand by allowing several ships, real-time flight, or several star systems. For now, I will also try my hand at doing this in C++.

Leave a comment

Your email address will not be published. Required fields are marked *