Article Focus:
Everyone needs a diversion now and then, so Chris Zwar took some time to write a game in After Effects just to see if he could. Here's the result: Tanx-AE, the world's first game written for Adobe After Effects. Take a moment, download the aep and have some fun with this. It's for version 5.5 and up.
Tanx-AE is the worlds first game written for Adobe After Effects (ver 5.5 and up).
Tanx-AE is a 2 player game in which each player aims their tank at the other players by varying the angle of elevation of the tanks barrel, and the power of each shell. The player who can find the correct combination of barrel elevation and power, to hit the other players tank first, is the winner.
Tanx-AE was inspired by an old game called Tanx which I used to play against my neighbour on the Commodore 64 more than 15 years ago. These were the days of typing in BASIC programs which were published in magazines, running on a machine which had a 1mhz processor, only 16 colours, and a TV as the monitor.
The obvious question is Why? Why write (and play) a game using a graphics and compositing program?
The answer, quite simply, is to prove that you can. It also demonstrates how useful and interesting expressions can be. Tanx-AE demonstrates the power of expressions by using them to link together several After Effects compositions, which together make up the game.
Expressions are used throughout the After Effects project in a variety of ways including:
An expression is used to generate pseudo-random numbers, which produces the varying height of the terrain (and tanks) in a repeatable and calculable manner.
Expressions are used to render the landscape, automatically positioning small land units to create an overall terrain.
Expressions are used to allow each player to alter their tanks power and barrel elevation, using standard After Effects controls. The tanks barrels raise and lower to match the settings entered by each player.
The trajectory and movement of each players shell is calculated using expressions.
Expressions are used for the collision detection, to see if a player has hit either the ground or the other player.
Expressions are used to determine which message is displayed at the end of each shot, and whether to display an explosion at the site of any impact.
Tanx-AE runs best on beefy machines with plenty of RAM, and a display size of at least 1024x768. It was written in After Effects 5.5 on a Mac. Future revisions of Tanx-AE will see the battle move to a 3D world, with the ability of the players to alter the position of their tank between shots, but this may have to wait for faster machines because its fairly slow already
Theres some old saying about watching dancing bears at the circus you dont admire how well they dance, just that they dance at all. Keep this in mind when playing Tanx-AE.