Guy Royse

Work. Life. Code. Game. Lather. Rinse. Repeat.

A Belated Corporate Raiders Update

So I haven’t provided an update for y’all in quite some time but that doesn’t mean I haven’t been busy working to build games and stories for your consumption. It also doesn’t mean that I have been busy working on games and stories for your consumption. But I have.

So, it’s a Corporate Raiders update today. I went on a bit of a code binge for a while and made a lot of changes to get the application to be mash-up friendly. I also added lots of JavaScript stuff to it as well. These sort of went hand in hand. The significant update that you can actually see–an API.

I’ve added APIs to lot you access the actual data of the game so that you can code against it and extend it in ways that I don’t foresee. Of course I also plan to use this API to support other clients for the game. In fact, I am already using it on the main page of Corporate Raiders.

If you want to check out the API for yourself you can access it using the following URLs:

http://corporateraiders.hardboiledgeek.com/api/stock/{symbol}/{format}
http://corporateraiders.hardboiledgeek.com/api/market/{format}

Just replace {symbol} with the stock symbol you care about. For {format} enter either xml or json. If you don’t specify {format}, it will default to json. For example…

http://corporateraiders.hardboiledgeek.com/api/stock/chch/xml

…will show you the info for Chthonic Chemicals Corporation in XML. Either of these urls…

http://corporateraiders.hardboiledgeek.com/api/stock/chch/json
http://corporateraiders.hardboiledgeek.com/api/stock/chch

…would show you that same info in JSON.

This API is ripe for consumption by fat client and portal device applications. Got an Android Phone or an iPhone and some spare time? How about an Adobe Air client? This would be a good place for you to play. And if you do something cool, tell me about it either via email or by leaving a comment.

Also, and perhaps more significantly, the market now moves. Right now the algorithm is completely random day by day and the incrementals are very predictable over the course of a given day. Nonetheless, it move. Next, the plan is to swap out the core engine with something a little more random so we can start letting people actually buy and sell stocks. Then, we’ll add a more event-based model so that we can have news items, rumors, and the like to affect the stock price. Insider trading here we come!

In the short term I plan to add users to the model as well as put some tasty JavaScript stuff on the screen. Tabs and accordions are probably where I’ll start.

So stay tuned. I’ll post updates as I go so that you can watch the sausage being made.

— October 12, 2009