Flex 2 Demo: Taipan

This post is more than 2 years old.

I've uploaded a new Flex 2 demo, Taipan. Taipan was an old Apple IIe game (well, that's where I played it) that let you carry cargo between various Asian cities while fighting pirates and expanding your ship. My version is um... limited. It is about as close to the original as MS Vista shipping on it's original scheduled ship date.

That being said, you can buy and sell stuff. Oh - and don't enter a bad character. Validation is easy in Flex 2, I just didn't do it. Validation is for wimps I say!

Anyway, I plan on cleaning it up a bit. Not design-wise since, well, my design sucks, but I'd like to add a bank as well as a money lender. While I won't do combat, Mike Nimer had a good idea about charging a fee per travel, so there is an incentive to not just click the heck out of things.

You can right click View Source to see the code. Unfortunately, you can't see the CFC that drives the data. To see that, use the Download link below.

Let me be absolutely clear. I love Flex. But I suck at it. Well, I don't suck, but I'm a beginner. At least I can look at the code and know I need to shape things up a bit, which I take as a good sign. (There is hope for me yet.)

Download attached file.

Raymond Camden's Picture

About Raymond Camden

Raymond is a senior developer evangelist for Adobe. He focuses on document services, JavaScript, and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Archived Comments

Comment 1 by Graham Weldon posted on 5/12/2006 at 3:15 AM

Excellent demo! I wonder how the game would og if it cost you some money to travel? At the moment, you can travel from place to place at no cost, looking and waiting for a huge price to sell your goods at, no skill required. This may not be in line with the traditional game, but would introduce an extra level of complexity.

Comment 2 by tof posted on 5/12/2006 at 3:39 AM

I like the blur effect on the background. it looks cool

Comment 3 by Raymond Camden posted on 5/12/2006 at 5:12 AM

Graham, I'm thinking a sliding scale based on the # of items in your hold, so if you have a lot of stuff, it costs a lot to push it around back and forth.

Comment 4 by Matt Rix posted on 5/12/2006 at 5:59 AM

I used to love this game... Yeah this one is way too easy, but for some reason I still spent 5-10 minutes making a trillion dollars :)

I think it should be possible to buy out a city and flood the market, as well as travel expenses... but for now it's quite fun anyway :)

Comment 5 by Scott Stroz posted on 5/12/2006 at 6:45 AM

Good Lord...its like crack!

Comment 6 by Scott P posted on 5/12/2006 at 7:13 AM

Do you keep track of games? I think it would be cool to see the top scores with the log of their purchases, then you would have something to try to beat.

Comment 7 by Raymond Camden posted on 5/12/2006 at 7:31 AM

I don't keep track of scores, but I could. I'll look into it.

I was actually thinking of writing a simple blog entry on Flex 2 this weekend, a very simple, here is a CFC, here is a grid, hook them up, etc. Something super simple, but more instructional.

And Scott - yeah - I remember spending _hours_ on Taipan back in the day. The old version had a bug where you could borrow from the lender, and pay him back too much, so you owed him negative money. The interest would pile up to a point where he owed you billions, and you would just take it from him million dollar chunks. :)

Comment 8 by Lola Lee Beno posted on 5/12/2006 at 2:18 PM

I tried to play the game, but the "buy" and "sell" button for the buy and sell popup windows are greyed out. I'm using Flash Player 9 for OSX.

Comment 9 by Raymond Camden posted on 5/12/2006 at 3:17 PM

Must be a player issue, Lola. Sorry. Blame "Beta" :)

Comment 10 by Robert Owen posted on 5/12/2006 at 5:22 PM

That game is addictive!!! But hey, I just made 10 million..

Comment 11 by Teddy Payne posted on 5/12/2006 at 5:52 PM

A classic genre game with modern web technologies. Very sweet Ray!

The stickness of the application is apparent from the people who use it.

I wonder where it would go if you enhanced it over time. Flex 2 games..I smell oppurtunity there. =)

Comment 12 by Phillip Senn posted on 5/12/2006 at 6:14 PM

OMG!
Digital Labs has a Windows port that is very close to the original.
http://www.digitallabs.net/...

No kidding Ray, I just finished a semester's long project talking about using the concept of Taipan for Instructional Design.

My idea is that in order to buy a commodity, you have to answer a challenge question. So the teacher loads a bunch of multiple choice questions into the database, and the kids answer these questions while they make their millions.

Comment 13 by Raymond Camden posted on 5/12/2006 at 6:21 PM

That is pretty cool Phillip. If I get time today I'll add the "cost of travel" logic. That will make things more challenging.

Comment 14 by Matt Rix posted on 5/12/2006 at 10:36 PM

"I tried to play the game, but the "buy" and "sell" button for the buy and sell popup windows are greyed out. I'm using Flash Player 9 for OSX."

Lola I have a feeling you just aren't entering the correct amounts... The buttons will only be enabled when it is possible for you to make a certain transaction...

Comment 15 by Raymond Camden posted on 5/12/2006 at 10:48 PM

Duh. Good catch Matt. That should be it.

Comment 16 by Toku posted on 7/14/2006 at 2:15 AM

I tried to play.. but getting an error dump.. any ideas?

TypeError: Error #1009: Cannot access a property or method of a null object reference.
at mx.containers::Panel/mx.containers:Panel::layoutChrome()
at mx.core::Container/mx.core:Container::updateDisplayList()
at mx.containers::Panel/mx.containers:Panel::updateDisplayList()
at mx.core::UIComponent/validateDisplayList()
at mx.core::Container/validateDisplayList()
at mx.managers::LayoutManager/::validateDisplayList()
at mx.managers::LayoutManager/::doPhasedInstantiation()
at Function/http://adobe.com/AS3/2006/b...
at mx.core::UIComponent/::callLaterDispatcher2()
at mx.core::UIComponent/::callLaterDispatcher()

Comment 17 by todd posted on 7/14/2006 at 6:50 AM

Just subscribing...I got the error too, but I'm really more interested to see the source code if/when it's fixed...

Comment 18 by Raymond Camden posted on 7/14/2006 at 6:54 AM

I built this during the beta and I bet that is the issue. I'll see if I can find some time to update it later.

Comment 19 by todd posted on 7/14/2006 at 7:17 AM

I'm mostly interested in a simple example of flex/cfc interaction. I tried Forta's example from the beta and it's a bit buggy too. Maybe one of your loyal followers who are more knowledgable about Flex will throw together a simple tutorial...

Comment 20 by todd posted on 7/14/2006 at 7:18 AM

why am i cursed with the insanely stupid habit of putting three periods after every sentence...