Pixel Smash Test 1 – Smash the heck out of some pixels

I was chatting to Ilija tonight about doing a real fast turn-around game (1 week max). The projects we’ve got in build right now are really big, and I felt like I needed a “quick win” to kick-off the year good and proper. We bounced a couple of ideas around and stuck on the concept of basically blowing the crap out of over-sized sprites, pixel by pixel.

So I built a quick prototype just to see if this idea had wings, and here it is. There’s no “game” as such because this was a 1 hour proof of concept tech demo. It was to see if we could actually blow sprites up, and have it look nice. And I’m very happy with the result. Now we’ve confirmed that we’ll move onto the next stage.

Click the pic above or here to play. It is massively un-optimised. Those are just Sprites with drawRects in them! But I still get a solid 60fps in Release player, but it dips lower in Debug Player (and I’ve noticed on Macs). So your fps mileage will vary. But hey, it’s Flash, when doesn’t it? In talking to Adam he reckoned throwing a blitting engine behind it (ala Flixel) with baked sprite rots would speed it up massively. I’ll give it a bash and see. The slow-down might be my abuse of the physics engine rather than the rendering. But there is a definite overhead there we can eliminate too.

And no, it’s not Box2D. I’m usingย Nape which is the new darling physics engine on the block. It’s doing all the heavy lifting. And wow, does it do it well! It’s one killer physics library that I urge you all to check out. Simpler than Box2D and considerably faster. Use it, love it, support it :)

Also one final random bit: read this excellent blog post by Ben McGraw on the dynamics of Super Mario Brothers 3! Go enjoy.

Posted on January 6th 2011 at 1:06 am by .
View more posts in Experiments. Follow responses via the RSS 2.0 feed.

5 Responses

Leave a comment
  • January 6th 2011 at 2:45 am

    Hah! Neat method for pixel destruction, wonder what you’ll build it into. Pixel-level destruction seems to be making the rounds (Voxatron looks interesting too). I built a pixel-level destruction engine as well (flixel-based, in fact), but it manipulates bitmapData so it’s very fast–no physics. Guess I should release a demo as well heh

    Keep it up, see you on the Flixel forums :)

  • January 6th 2011 at 9:07 am

    Nice richard :) I like it. Actual box2d physics will be alot more expensive then simple particle physics however!

    I have already had quite abit of play with the concept in the past:



  • January 6th 2011 at 9:36 am

    Doing it in XNA is cheating Mike ๐Ÿ˜‰ (btw I had to approve your post, WP thought it was spam!) – I could use proper particles, but I have bigger plans for it than this demo shows.

  • January 6th 2011 at 9:38 am

    Haha indeed XNA is cheating but its all possible in flash as the first two examples show ๐Ÿ˜‰

    Cool I look forward to seeing what you have in store for us!

  • January 6th 2011 at 11:02 am

    Yeah but let’s face it, it’s the XNA videos you showed that actually look cool :) The Flash versions just look like Flint :) (I know they probably aren’t). BTW the sponsor logo obscuring the bat made me :(

Make yourself heard