What if birds had a siege machine? Let's explore this gameplay, but first let me explain which kind of siege machine I want to build using only distance and revolute joints.
The siege machine consists of two carts mounted on wheels. The first cart can be controlled by the player and acts as a truck tractor. The second cart is just a trailer but has something between a trebuchet and a morning star mounted on it.
A bit confused? Let me show you the prototype:
There is a lot to do, so let's start running. What do we need to include in our package?
First, the same old classes,
Joints
included:import flash.display.Sprite; import flash.events.Event; import Box2D.Dynamics.*; import Box2D.Collision.*; import Box2D.Collision.Shapes.*; import Box2D.Common.Math.*; import Box2D.Dynamics.Joints.*;
And obviously the class-level variables you are already used to now:
private var world:b2World; private var worldScale:Number=30;
The beginning of this step is not that different...