Let’s Go Walk About- Flash Games in Flex

Posted on September 18, 2009 by Tony Fendall.
Categories: AIR, Adobe, Flex, Gaming.

 

 

Recently at work I haven’t been doing much actual Flex development.  Instead I have been spending my time working on a data mining/business intelligence system which is an intricate combination of some complex SQL, Ruby scripts and some software called Pentaho.  Long story short I was starting to miss the feeling of getting my hands dirty in Flex code, so a few days I go I started messing around with building my own rudimentary game engine from the group up.

Above you can see what I have built so far in about 3 hours total coding time spread over the last four days.  The age old adage “never re-invent the wheel, unless you want to learn something” has proven true here once again also.  There is quite a lot of trickery to get even this small number of objects to draw themselves onto the screen in a fast, efficient way.

I’ll probably release the source code pretty soon. It’s still a bit in a state of flux so I’m not ready to let other people read it just yet :)

If I continue to have a bit of free time up my sleeve in the next few weeks I hope to port this project to AIR and have a go at trying to construct the map and characters from a definition in a text file.  At present the layout is defined in a 2D int array, so the conversion will hopefully be fairly simple.  If that works out then I’ll probably try and remember some of the AI techniques I learnt back in university… Should be fun :)