BOX2DAS3 Simple 2 Player Game – Steering a ship through space with Blur trail

AS3, Motion Graphics, Physics No Comments

In this Box2dAs3 example I want to demonstrate the Multiplayer (hotseat) implementation of driving / steering a sort of ship / vehicle through an empty space.



In this example gravity is zero so the ships "float" in space.



Summary of classes:



CORE.as - the base for the whole thing, and the blur trail processing.

Main.as - construction of the Box2dAs3 World, walls and players.

Player.as - definition of players and keyboard control.

ContactListener.as - the place to deal with collision detection and reaction.



To spice it up I've added a blur trail effect to the players.



This example is a pointless game. But I must confess I had some fun playing "catch" with a friend of mine. If you catch your opponent, it's his time to hunt you.



Controls:



USE THE ARROW KEYS FOR PLAYER ONE AND the W.A.D. keys FOR PLAYER 2.



Suggestion: Grab a friend and play catch.



Get the SOURCE



ActionScript 3 Motion Blur / Blur Trail with custom background

AS3, Motion Graphics, Physics 5 Comments

Ever wondered how to make those smooth looking blur trails with AS3? Well if you did and still don't know, you have just found it. I's done using BitmapDatas drawing a Bitmap with a given BlurFilter in a given Sprite or MovieClip which contains all the contents we want to have the motion blur. Some examples in the internet don't handle this properly because they flood the backgound with a colour, but in this one we are using a custom background to demonstrate how it is implemented. The trick is that the BitmapData must apply the "draw()" method only in a given Sprite or MovieClip where all the contents-to-be-blurred are nested.


The background pattern is a great technique developed by the guys at Bumpslide.


Get the SOURCE


data recovery software