Loading

Loading sources… all files

    Overview

    EntityAsteroids is a simple, open source entity-based game engine with an example space shooter game, written in ActionScript 3 by Iain Lobb.

    It accompanies his two-part tutorial series. The first part sets up a bare-bones, component-based entity system and explains why you might build games that way instead of relying on deep class inheritance; the second uses that system to create a simple Asteroids game.

    The game is built from six classes: the game logic, the player's ship, the asteroids, the bullets, the gun that fires them, and an enemy ship, a wandering alien that is just there to add some variety to the game.

    Made by
    Iain Lobb
    Released
    2012

    Controls guide

    Flying

    KeyAction
    Left/RightRotate the ship
    UpThrust forward
    DownThrust backward
    W/A/S/DSame as the arrow keys
    Space/ZFire one shot per press

    Starting

    KeyAction
    ClickStart, or start again after you win or lose

    Cheatsheet

    Objects

    Your ship
    Takes 6 hits; destroyed on the sixth
    Asteroid
    10 at the start; each hit shrinks it and splits off a copy, gone after its third shrink
    Enemy ship
    Wanders and fires at random; 6 shots to destroy
    Bullet
    Fades out after under a second
    Collision
    An asteroid that touches you vanishes and costs you one hit

    Rules

    Win
    Destroy every asteroid and the enemy ship
    Lose
    Your ship is destroyed
    Screen edges
    Everything wraps around

    Tips

    1. Each starting asteroid takes seven shots to clear (one big, two medium, four small), so 10 asteroids mean about 70 hits; there is no autofire, so tap rather than hold.
    2. Ramming an asteroid removes it whole instead of splitting it, at the cost of one of your six hits. Use it as a last resort to finish the round.
    3. Asteroids never hurt the enemy ship, and only its bullets can hurt you, so keep moving and stay out of its line while you deal with the rocks.
    4. The ship has drag and rotation eases in, so turn early and use short bursts of thrust; Down is a brake as well as a reverse.