Rig bird game #1 in After Effects

Today we will rig a bird game character with 1 null object.
Follow step by step to learn (recommended) or download the project. You can find all assets and the final project in the AEJuice Pack Manager – Newsletter – Rig Bird Game. Here are direct links for the latest plugin version:
Windows / macOS

Preparation

Any project begins with composition. We have pixel art here, so 200×150 will be enough. FPS is not particularly important; let it be 24.

Create a Null Object that will control everything. A bit of preparation:

Rename Null to Control.

Change the size to 16×16.

Move the Anchor Point to the center (Ctrl+Alt+Home).

Re-center (Ctrl+Home).

Add a background.

Jump
Let’s add our character to the composition.
We would need 2 sprites: Static and Jump (available for download in AEJuice Pack Manager – Newsletter – Rig Bird Game).

Center them (Ctrl+Home).

Create a Control layer and parent our 2 layers to the Control.

 

Get 10% off when you subscribe to our newsletter

By subscribing you agree to your email being stored and used to receive the emails in accordance to our Privacy Policy
descount
Now when you move Control all sprites move too.
IMPORTANT! Enable the pixel mode so pixels stay in place when the layer moves. It is required for all layers in this project.
Place Control so the character stands on the ground.
You can turn off the Jump layer so it does not distract you for now.
In order for our character to understand when it is in the air we need to set the ground level. The easiest way to do it is manually. Thankfully it does not change.
Add a Slider Control and call it Land Level.
As a value set Control’s Y Position (it is on the ground right now).
Add another slider and call it [Character] (I use square brackets for properties that will have an expression).
Add the following expression to the slider:
Land = effect("Land level")(1); //ground level
y = transform.position[1];  //character's y position

if (y < Land) 1 //if character is higher than ground level then 1
else 0 //0 in all other cases
The only thing left is to set opacity.
For Jump layer:
M = thisComp.layer(“Control”).effect(“Character”)(“Slider”); 
if (M == 1) 100
else 0
For Static layer:
M = thisComp.layer(“Control”).effect(“Character”)(“Slider”);
 
if (M == 0) 100
else 0

Great! Our bird can jump (or fly) now.

In the next lesson, we will teach the bird to run.

Part 2

Part 3

Click here to receive more tips by email.