All entries for Thursday 19 July 2007

July 19, 2007

Sumotori Dreams; bi–pedal physics in 96K.

Ben sent me a link to this gem. This guy has managed to squeeze in a proper and ace bi-pedal physics engine and 3D into a 96K game. It’s basically sumo wrestling and it’s a great fun for two players.

But, by design or otherwise it also manages to be the funniest thing I’ve ever played – over to Ben:

The game is short-lived; the real comedy is the end of each round, when the AI tries to stand both characters up and turn them around to face each other and bow.

Rather me trying to explain the hilarity, this clip is a typical example…

Total genius. 5 games in and my sides are still aching. Get Sumotori Dreams here.

Papervision3D planets

I’ve been looking at the Papervision3D libraries recently. A while ago we had a request for a planets animation in Flash, and no amount of z-axis trickery would make it look realistic enough for me, so we moved the job into Director, which proved difficult (learning curves being what they are) and I ran out of time and gave up.

Papervision3D has achieved what many Flash developers have been waiting for – a proper 3D engine. It has support for primitives, but also allows import of 3D models via collada XML files. With a few simple commands you can set up a scene and instantiate some 3D objects:

private var planet:DisplayObject3D = rootNode.addChild(new Sphere(null ,50, 20, 20), "Planet" );

And there’s your wireframed primitive sphere. Next job is to start it spinning:


Easy isn’t it? Now all we have to do is make it travel around a centre point. In this case we’ll make the vector a simple circle. Flash talks in radians, so we need to convert degrees to radians when calculating the angle.

private function deg2rad(degree) {
    return degree * (Math.PI / 180);
private var originX:Number = 0;
private var originY:Number = 0;
private var radius:Number  = 400;
private var radian:Number = deg2rad(angle);
planet.x = originX + radius * Math.cos(radian);
planet.z = originY + radius * Math.sin(radian);

So once you’ve created a couple of those, and made a simple ‘sun’ for them to travel around, here’s the resulting Flash movie. I’ve added some simple controls to allow the mouse to move around the scene:


MXNA link



    Other blogs I like...

    Black Pepper Software

    Eismann-sf Go to 'Comments on: Design News for Web, Graphic Designers'

    Ted On Flex Go to 'Ted On Flash'



    Not signed in
    Sign in

    Powered by BlogBuilder