Posted in Flex, ColdFusion | Posted on 04-22-2009 | 5,404 views
Ok, if you have been following me on Twitter, you know I've been working on a project involving BlazeDS, Flex, AIR, and ColdFusion. The game idea I had was pretty complex, so I thought it would make sense to start with a simple game, and focus on the technologies first. So with that in mind, I'm proud to announce the release of GameOne. Yes, I know, great name, eh? Well, I don't care how creative the name is, I'm just happy it works (mostly).
The game is basically a stock simulator. The stocks are fake and update every few minutes. When you buy/sell stocks, it is announced to all active players. You can chat as well. So for example:

So, it's late. I'm tired. And there is a lot I want to talk about this game, especially in regards to messaging and LCDS/BlazeDS+CF. (Seriously, why aren't people using it more?) But for now I figured I'd let folks download and play with it. I'll post the full source code (client+server side) later in the week. Enjoy. Oh, and for those of you who are competitive, you can view a dump of all users sorted by funds here: http://gameone.coldfusionjedi.com/


And yeah love the UI have to say its the best;-)
http://www.tutobook.com
@Andrew: Um, consider it a ranking of liquid wealth then (I think that's what they call it ;).
Btw I did sent you a tweet reply, but as you don't follow me you might not have seen it. I haven't tested your install badge on the blog post, but I was very annoyed that the check for Air was ignored and it downloaded it anyway. Just an FYI that this is a bug that you just may wish to fix, if you haven't already.
I might be wrong, liquid assets from my recall is your total assets on paper. Not 100% sure my meory serves me right there though.
Yeah, you are probably right on liquid. Meh, what do I know. ;) To be honest, this entire game was a learning exercise so I can work on the -real- game I have in mind.
Leaderboard: I originally wanted it in game, but at 11PM last night I was exhausted. ;)
After clicking on a stock, I head down and enter an amount of shares to buy/sell. However, you have to click on the up or down arrow to get the buy/sell button to enable.
Maybe another sugestion over time is something to remember what price the stock was purchased for, so that they know how much money is potential going to be earned lost etc. And maybe a runtime worm, that shows the rise and fall of the select stocks as well.
@Andrew: The issue is that you can buy X shares of Y at Z, and Y shares of Y at Z-1. The UI to handle displaying all that would be a mess.
@Andrew - Maybe so. Like a personal history.
To be clear, I don't plan on spending a lot of time on this. The entire app was meant as a training exercise and blogging fodder. But I'm taking all these comments to heart and will definitely remember them for the next app.
After my lunch meeting (and my food) I've got a minor update coming out to hit a few of the minor UI things.
I'm not currently saving any history. When you buy shares of X twice, I just have one row in the db for the total # of shares.
I'm not going to spend much more time on game mechanics as I'd rather move on to the 'real' game (but I'm definitely fixing the darn typo and the darn 'cant hit enter' bug).
Show what price we bought the stocks at (in chat maybe)
Color code chat (real chatter vs alerts on buy/sell)
Also, it needs more cowbell.
http://orangexception.com/expose/images/random/Gam...
Then follow-up error selling 7000 shares. I think my share count was already reset to 0 on the database from the above error, but the client hadn't updated.
http://orangexception.com/expose/images/random/Gam...
http://www.thecomputerwizards.org/gameone/
http://dev.socialcloudz.com/dev/gameone_chart.cfm
http://gameone.coldfusionjedi.com/feed.cfm
http://dev.socialcloudz.com/dev/gameone_tracking.c...
this script uses a UUID in a cookie to keep tracking anonymous and per-user.. also makes sure other users can't tamper with your tracking.. ;)
Number 1 player with
$2,487,445,097.52
http://www.thecomputerwizards.org/gameone/
---------------------------------------------------------
Executing Database Query.' faultDetail:'For details, turn on Robust Exception Information in the ColdFusion Administrator'"
name = "Error"
rootCause = (null)
headers = (null)
message = (mx.messaging.messages::ErrorMessage)#2
body = (null)
clientId = "3DD14FDB-3E09-FB17-EF29-B565C56F4065"
correlationId = "A7FFEDF4-CF9B-5047-5D75-E0A474CD0EC2"
destination = "ColdFusion"
extendedData = (null)
faultCode = "Server.Processing"
faultDetail = "For details, turn on Robust Exception Information in the ColdFusion Administrator"
faultString = "Unable to invoke CFC - Error Executing Database Query."
headers = (Object)#3
messageId = "44728866-A00E-44B4-D30F-4B1B2080DA01"
rootCause = (null)
timestamp = 1240719483040
timeToLive = 0
messageId = "44728866-A00E-44B4-D30F-4B1B2080DA01"
target = (null)
token = (mx.rpc::AsyncToken)#4
message = (mx.messaging.messages::RemotingMessage)#5
body = (Array)#6
[0] "sid.wing"
[1] "XXXXXXX"
[2] 2
[3] 55000000
clientId = "3DD14FDB-3E09-FB17-EF29-B565C56F4065"
destination = "ColdFusion"
headers = (Object)#7
DSEndpoint = "orca-amf"
DSId = "3DD14BD4-F81A-
------------------------
That's all I could capture of it.
I buy 2147483647 shares at 30 per share
Trying to buy 1 more share causes the crash point above
Now that I've released the code, maybe someone will volunteer to do that. ;)
There is a hack / bug / exploit where you can get as many shares as you like, as I thought last week when people were on crazy numbers.
I now have over a 1000 T so the game is pointless now, but was fun before I discovered it.
Ray email me if you want me to explain, I dont want to do it here.
I tried to look up the source code, but it's pre-Internet.
There used to be an old TRS80 game called Taipan, which was quit exciting really.
http://en.wikipedia.org/wiki/Taipan!
And you have to add an exclamation point to the end of the link or otherwise you are directed to a wiki about Taipan snakes.
[Add Comment] [Subscribe to Comments]