05
Dec
08

Isometric Terrain Engine

On Flash forums you often come across people who are talking about or showcasing their brand new engine. But let me tell you: Unless you’re going to make game based on it yourself, odds are no-one will.

Creating an engine is a great learning experience and so was making this isometric terrain engine for me. However, without a concrete game design to aim for the engine will probably stay a technology showcase.

Isometric Terrain

It’s Always Performance
Making all the quirky rules of isometric terrain work (drawing order, line points) was a challenge, but once it was all set up it just works. Making it fast on the other hand …

The first version drew everything as vectors and could handle a 40×40 grid before grinding to a halt. With the second version I rendered the vectors to bitmaps and by the third version some further optimizations to the drawing routine made things quite fast and a cooler terrain generator was added šŸ™‚

The fourth and final version got the ability to load in custom height maps, further optimizations where the map would be cached in the direction the user was scrolling, and a mini-map (it’s in the code, but was not added to the map in this version).

Transport Tycoon – the Flash version?
As a teenager I loved Transport Tycoon, and I’ve always wanted to make a game inspired by it. There is OpenTTD (Transport Tycoon Deluxe), which is great if you want to play on your desktop. But a Flash version with multiplayer, that would be fantastic.

That, and isometric terrains just being plain cool, were the reasons why I started this.

In the end
Getting to this point had been quite a lot of work. As I was just learning Flash, I realized the need to rework the entire project because some poor design decisions had been made. However, it was doubtful I could get it to run any faster. Transport Tycoon was out of the question as that would be a huge undertaking and I with my knowledge at the time it would never run fast enough. So without a clear game idea the project lingered …

All that was back in April/May 2007 and I’ve come a long way since. But I still think this is a pretty cool project, and I’m sure someone out there can get some inspiration from the code.

Download Source

Download earlier revisions

Advertisements

10 Responses to “Isometric Terrain Engine”


  1. 1 jason
    December 7, 2008 at 7:08 pm

    Hey love the terrain stuff, is there anyway I can convince you to release your other versions of the code so everyone can see the progress and the other methods you use? Keep up the post!

  2. 2 yaief
    December 7, 2008 at 8:24 pm

    Hey Jason. Glad you like it šŸ™‚ I’ve found version 1 & 2 along with two early tests. I’ve added the download link to the original post.

  3. December 8, 2008 at 6:49 am

    A year ago I tried to write tycoon demo for browser (javascript powered).

    http://zproxy.wordpress.com/2007/12/31/javascript-tycoon-2007/

    That project is powered by my jsc compiler project – which compiles c# to javascript.

    For sure I am interested in recreating tycoon for browser in flash!
    šŸ™‚

    I will be reading your blog for updates!

    • 4 yaief
      December 9, 2008 at 1:45 am

      I really like the demo, although it would be nice if it worked as well in Firefox. The jsc compiler project is, well, pretty impressive. It appears you made the Treasure Hunt game with it, which is quite amazing. But I’m still a bit sceptical about the whole concept of compiling for Flash from C#, and whether it will really be as fast šŸ™‚

      Anyway, I still dream of making some Transport Tycoonish game, but if I should do it, I would want to make it online multiplayer. That in itself would also bring in a lot of changes in the gameplay from the asynchronous nature of a long-lasting online multiplayer games. It would be really fun, but so much work.

  4. December 10, 2008 at 11:42 am

    The demo did work at 2007 December šŸ™‚

    Firefox has changed after that and broke that code. I have not gone back to fix it.

    With Alchemy out of the door, maybe the OpenTTD will be ported as C to flash? Who knows.

  5. February 27, 2009 at 2:29 am

    Hey, awesome engine, congrats, I have a question. is possible to add a rotation button that change the view point to see the isometric map from another side?. and, if I want to create a terrain simulator with similar characteristics what is better, to use some engine like yours or perhaps using a 3d Engine like 3dAway? thanks.

  6. April 14, 2009 at 10:52 pm

    Hi,
    I just wanted to show you my works since it’s similary to yours. I am French so sorry for the mistakes.
    I am currently working on an Isometric Engine and so i have done an Iso Editor but based on tile.
    If you are interested come to visit me !
    Links are below:
    -Iso Engine: http://angelstreetv2.free.fr/as3/IsoEngine_AS3.swf
    -Editor: http://angelstreetv2.free.fr/as3/Editeur_AS3/Editeur.swf
    Thanks

  7. July 6, 2009 at 11:48 am

    I have released a new tycoon style short game – check it out at http://avalon-tycoon-mansion.tk/

  8. 9 marcus
    October 18, 2010 at 10:16 am

    perfect for my needs. exactly what i was looking for.

    You are the best šŸ˜‰


Comments are currently closed.

December 2008
M T W T F S S
     
1234567
891011121314
15161718192021
22232425262728
293031  

Months


%d bloggers like this: