BOX2DAS3 Simple 2 Player Game – Steering a ship through space with Blur trail
May 24th, 2009AS3, Motion Graphics, Physics No CommentsIn 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
Recent Comments