Basic Flash Tile Engine

Overview:

The Basic Flash Tile Engine is a royalty-free package of classes that allows importing of a specially formatted XML file and a bitmap tileset, generates a scene, and updates the viewable screen by following an object. It is suitable for many tile-based game applications. The Basic Flash Tile Engine is written in Actionscript 3.0 and optimized for Flash Player 9 and above.

download

Included:

  • All source code is included and commented.
  • Sample “Side-Scroller” Flash Application using the Basic Flash Tile Engine.
  • Sample “Top-Down” Flash Application using the Basic Flash Tile Engine.
  • A Manual that gives further details on how to use the Basic Flash Tile Engine.
  • A Photoshop template for the worldtileset bitmap.
  • An XML template for the world data.

Limitations:

The Basic Flash Tile Engine displays a scene as a single layer. It is not suitable for complex scenes requiring a multitude of layers. While it is possible to instantiate multiple scenes to overcome this limitation, it is not an ideal solution.

License:

Royalty-Free! I want you to make games with the Basic Flash Tile Engine! The code is non-transferable.

What Can I Use This For?

  • Flash games – either commercial or non-commercial.
  • Other Flash Applications.
  • There is no limit on the applications you can release with this code, nor is there any royalty to pay me for each release. All I ask is that this code is only used in applications in which you are involved.

What Can’t I Use This For?

  • You can’t resell the code either by itself or as part of an uncompiled package.
  • You can’t use this code to create a commercial middleware tool (e.g. Tile Editor) and then sell said tool.
  • You can’t distribute the code in any way outside of a compiled application.

Hard Sell:

I understand if $10 is a lot of money to you. What I’m offering here is over 50 hours of investment I made in this engine. If this code saves you even an hour, consider it money well spent. If you’d prefer to go the free route, I’ve blogged about almost half of the work that went into this package. But I guarantee you that having the .as files will be far more convenient than a bunch of copy and pasting from the inter-tubes.

Support:

If you have any issues with the Basic Flash Tile Engine or have suggestions on how I can improve it, please email me via: support [at] refrag [dot] com.

download

{ 7 comments… read them below or add one }

gabriel February 28, 2010 at 5:23 pm

hi
is there a link to see the game engine in action? sample code? does it “HAVE” to use xml or can I do it in all flash thanks

Reply

kaylasara February 28, 2010 at 7:09 pm

Hi Gabriel,

Thanks for your interest! I blogged some of the early work I did on the tile engine. You can see some sample code and working applications here:
http://www.refrag.com/2009/03/17/flash-rpg-tile-engine-13/
http://www.refrag.com/2009/03/17/flash-rpg-tile-engine-23/
http://www.refrag.com/2009/03/21/flash-rpg-tile-engine-33/

As for XML. The system is structured to take an external XML file to build the tilemap, but you could certainly re-code it a multitude of other ways – it would just take some hacking and effort. :)

Reply

ZeekNyne April 13, 2010 at 1:23 pm

Some questions.
Is this done in AS3?
Would it be possible to add this to a shell and have it be part of a flash avatar chat?

Reply

kaylasara April 13, 2010 at 3:30 pm

Hi ZeekNyne,

Yes this is done in AS3.
RE: Avatar Chat – I don’t see why not! I’m sure you could get the engine working in all types of environments. But obviously without knowing your system I can’t comment on how easy or hard it would be. :)

Reply

ZeekNyne April 13, 2010 at 4:49 pm

Possibly pretty hard haha. It is a complex project that will most likely take a while. Can the character be made to move only grid tile to tile (think pokémon)? I have seen other similar engines (many costing far more) but they are all isometric while I want a simple, 8-bit inspired, top down. This seems to fit that. :)

Reply

kaylasara April 13, 2010 at 4:58 pm

My engine doesn’t easily let you snap to grids. The sprites and map are separate entities and handled quite differently. The characters just use simple sprite-based collision detection against “flagged” tiles.

I haven’t actually seen anything that would perfectly fit your bill, but in case you’re curious here’s some other tech you might be interested in:
Flixel & FlashPunk are both very strong (and free) game engines that specialize in “8-bit style”. The only drawback with these systems is you cannot use the traditional Flash IDE to build your application. You’d have to learn how to use Flash Builder or Flash Develop. Still – it might be worthwhile so you can leverage the strengths these engines bring.

Best of luck!

Reply

ZeekNyne April 13, 2010 at 5:02 pm

Thank you. I just recently got Flash Builder (flash develop is a no go since I primarily use OSX) and have been tinkering with it. Those libraries seem like what I might be after. Thanks again. :)

Leave a Comment