So, the plastic has been taken off and the foam all broken apart to resemble a winter wonderland, and it’s back to business as shiftperception celebrates it’s first day on a new and entirely local server. IF all has gone according to plan, the only difference you’ll see is this post – otherwise im typing into the old site, and this post will never be seen. Spoooky….
September 2006 posts
Paper Cuts
giaitrivietnam.net has some amazing positive/negative space paper cut artwork (thanks OJ). Seriously cool.
BlackApache gets a makeover…
Ill be brief. OJ at BlackApache has updated his site, and will be bombarding us all with the sounds of one hand typing in the woods. Here’s a picci of his ugly mug just cause I can (and of course the lovely Amy) :
Posted in Postacrds
Ruby’s first day
So, I had my first day hand-in-hand with Instant Rails today. Following the tutorial I managed to get all the way with only a few minor hickups (read: leaving for a few hours, coming back and starting from further down the page and missing a few important lines), which I think is pretty good.
Sure, its not rocket science when you are following on with the tutorial, but it’s a pleasant feeling when the ideas begin to stick. Anyway, here’s what I know, -which is nothing new to
others doing the tutorial:
1. The model
I guess you could call it a data binding. Its a file that connects a table from the project database, to a controller.
2. The view
This is where the HTML markup gets stored. It *does* have some Ruby logic in there, but only for display purposes.
3. The controller
I guess this is like the brains of the operation. It’s the logic.
Tie them all together and you have something like : Bob goes to www.site.com/products. Ruby goes and looks for a controller called “products_controller”, which has in it an “index” definition. This definition attempts to retrieve data via the model “products” and then Bob sees the results of the query because of the template called “index”. A little confusing at first, but then I got the hang of it. And then I realised i’d seen something like this before…
I realised that I’d used a very similar concept to MVC when designing and implementing utsdesign. I had decided then to separate all the logic into one set of includes, templates into another, and then control how dynamic data gets fiddled with in one central location. The first big difference to that approach and Ruby is that in Ruby you don’t really have “pages” like index.php. Instead you have those def calls in the controller. Which is a much neater way of doing things.
Anyway, that’s day one of my learning. A good start.
Posted in Development
Flash isometric engine
At the start of this year I began work on an isometric engine for a Flash game I was developing at work. Now there are heap of books that deal with the logic of game dev in Flash, and to get me started, I went out and bought Flash game dev demystified.
Now, because I was specifically interested in isometric engines, and knowing a fair bit about Flash already, I thought that reading the whole book wouldn’t really be a worthwhile experience… but I was wrong. It turned out to be a great read, and even though in my engine I didn’t really use much of the new knowledge I gained, it certainly helped round out some missing information – in particular basic physics.
Another good source of information was the web, most notably Kirupa, a site which continues to be a great source of information and techniques, and includes posts from the endlessly giving Senocular. There were more, but I can’t lay my hands on the addresses at the moment. The important thing to note though, was that both the books and the web had similar and differring ways to approach the same problem – which is a truth for EVERYTHING in Flash. And by exposing myself to them all, I was able to understand enough to get me a long way into my own attempt at an isometric engine.
So, why the rant? Well, I wanted to share with you some things that I’ve learnt from the experience, and for what it’s worth, here they are :
NB : The isometric engine I worked on was for Flash player 7. If you were unaware, Flash player 8 and above do many things MUCH MUCH better than 7, and this information is probably irrelevant for the newer Flash players – but very relevant if you are still making content for Flash player 7.
1. Optimizing code performance at runtime AND at compilation stage.
I was fortunate enough to come across Odd Hammer which outlines various techniques to make your Flash movie run better when exported from various Flash IDEs. Ill let you read al the good stuff there… its well worth it. What I was unaware of was that writing things in different ways at author time could effect quite dramatically performance at runtime.
2. Extensibility
I stuck with XML to feed my engine. It began using a similar format that other engines used, but as I wanted to add more interesting interactions, I found that I had to extend it. But thats the beauty of XML. On that same token, I also load all my tile artwork in at runtime, so that I can have various levels each with their own look and feel, and not affect the base file size of my SWF.
3. Limitations
The biggest limitation to the approach that I took concerned controlling the speed of the action. Because I introduced depth (that is, stepping up or down stairs or a platform) it became impossible to control the speed of character movement in the isometric world more than regular speed and half speed.
This was because if I moved a character in any direction at less than half a tile’s size, at some stage he would be slightly over the next tile. Normally, not a problem. But because in my world that next tile could also be a step up or down and in any direction, this meant I had to manage the swapDepth of the character in relation to each individual tile, rather than just a single movieclip containing the floor.
4. Artwork and workarounds
The engine I made was designed to have many levels each with different artwork. One thing I tried to do was make producing each level as easy as possible. I explored making a level maker, but time didnt allow. Also, I thought that it would be just as much work to make it as to make the engine. So, what I wanted was for the design of the objects that live in my world not be too difficult. IE, I didnt want the designer to have to cut each piece of artwork up to the size of the tiles and then have me recreate it
in Flash. So instead, I made a workaround that allowed for an object to be placed in the world, via an XML description of where it lived, and what tiles around it would be unwalkable. Flash did all the rest.
5. Link
Here is the engine in all its glory. Im pretty happy with it – i know it could be improved greatly, but I think for what I wanted from this project, it is a good result. I cant show the code for the project im afraid, seeing as it is a commercial project, but it follows the same ideas as outlined in the links above, with some small differences.
6. Future
There are examples of Mario-style 3D from many years ago, like this one, that make my little iso world seem old hat. And now, there is soo much more chances of developing cool and interesting 3D things for Flash, specifically because Flash 8 has added bitmap caching and blitting et al, that improve runtime performance exponentially. (some links : here, and here)
All this means more chances for us Flash developers to do cool things. It’s just a matter of the right output for the right project.
Posted in Development, Interaction
SWFObject for WordPress
Just testing a new plugin I downloaded for WordPress to insert Flash objects using SWFObject. If you can see stuff below, then it’s worked
Find out more here
[kml_flashembed movie="/blog/swf/test.swf" height="150" width="400" /]
Posted in Development, Interaction

