RSS
 

Flipit Beta 1

02 Aug

I spent just under three hours this afternoon recoding Actionscript 2 game of mine named ‘Flipit’ into AS3, using a lot of the original graphics.

Here’s the video …

Flipit Beta 1 from Terry Paton on Vimeo.

The game is a simple tile colour game where each tile will flip over it’s neighboring tiles, with the aim to make all the tiles white. The tiles are a pre-rendered png sequence placed on a timeline, that I then blit and rendering using similar techniques in my other recent games.

The performance is really quite slow at the moment, around 16 fps which I’m not sure why of yet, but it should be no problem speeding up. Probably just a bit of clumsy code from developing it so fast.

Wow, that’s all I can say. Flash combined with Air makes for some magic stuff.

 
2 Comments

Posted in Game Dev

 

Tags: , , , ,

  • http://twitter.com/Jayenkai Jayenkai

    2 layers.
    Layer one does the grid, but when flipping, remove flipping tiles from layer one, and draw them, instead, in layer two.
    (If you pause mid-flip, flipped tiles are occasionally under unflipped ones.. looks odd)

    http://socoder.net/uploads/1/flipit_midflip.png

    Additionally, depending on how Flash/Air is doing this, could be a “Per-item, Check” issue. I noticed this doing my iPhing coding.
    Rather than leave tapping to every single item on the screen, strip away touchability from everything, and instead shove a great big touchable blank box over the screen. If player touches box, find x/y, figure out where x/y is in the grid, use that figure to do your flip.
    It means that instead of having 16 items all going “Am I touched?!?! Where am I touched?!?! Is it me!?!? What do I do!?!?” you've only got the one, then that tells everything else what to do. Speeds things up dramatically!
    (Assuming you've not already done that)

  • http://www.terrypaton.com Terry Paton

    Thanks for the comments mate, turns out the slow down was due to me using a transparent bitmap for the gameplay area, I'd done this when I quickly through the game together. The Mouse events I'm using are pretty quick – I'm using AS3 Signals – and when disabled made no difference to performance. Once I simply turned the bitmap to opaque the speed jumped up to the 20/21 fps I expected.

    I didn't quite have enough time to add in depth sorting to this build, which will fix the tiles appearing under others.

    Thanks for the suggestions ;)