Bay Traders: 100% Historically Accurate Maritime Trading Simulator

About Bay Traders

Okay, I admit it. Bay Traders isn't even remotely historically accurate — except for the part about the dinosaurs. Those guys were jerks. Other than that, the only historic thing about BT is that it's based on an old Apple II game, "Taipan!" (the exclamation point is part of the title, just like Yahoo!), which I used to play all the time as a kid.

I made Bay Traders to help hone my JavaScript/Ajax/JSON skills and expand my knowledge of the Yahoo! User Interface (YUI) framework. As it's been a long time since I worked at EA, I also thought it would be a (very) gentle reintroduction for me back to the world of online game development.

Though I developed Bay Traders in Visual Studio 2008, there's not much server-side programming going on outside of the data access (getting data from SQL Server and formatting it as JSON) that occurs upon Ajax requests. I do enough straight ASP.NET programming at my day job. Here, I wanted to develop a single-page application where JavaScript — and not C# or VB — does the heavy lifting.

I've kept all of my JavaScript in the game's webpage, rather than in external .js files. That way, you can easily take a quick peek at the source code, if you're into that kind of thing. The JavaScript is all at the bottom of the page. Any logic that doesn't happen in the page itself is probably being taken care of behind the scenes by Stored Procedures and User Defined Functions that I created for the SQL Server database. (I also wanted to try some things out in SQL.)

The one neat thing about the game (I think) is that, even though Bay Traders is a single-player game, there’s a subtle multiplayer aspect to it. The prices at ports, though mostly random, are somewhat dependent upon you and others who play the game. As you buy up stock of an item at one port — and it thus becomes more scarce — the price of that item is likely to go up for future traders at that port. Conversely, after you sell an item at a particular port, it loses its value for future traders.

Bay Traders is a work in progress, so you may notice the occasional — or frequent — bug. If you're lucky, it'll be a bug that lets you cheat! And Xenu knows my code isn't perfect — though I am a pretty consistent indenter, which has to count for something. But I hope you get some enjoyment from the game. I'll be adding features as I get the chance. You're always welcome to send comments and requests to shareloop@gmail.com. Thanks for trying it out, and for reading this.

— Greg

PS: I know the Rumor Mill isn't very reliable. The more people who are playing Bay Traders at any given time, the more reliable it becomes. When nobody else is playing, following the rumors is still better than raw chance, but not by a whole lot.