Archive for the ‘Flash Games’ Category

Space Shooter 2D Flash Game

Friday, November 14th, 2008

Space Shooter 2D Flash GameAs preparation to take on my new job role, I wrote a small flash game using ActionScript 3 and OOP (object oriented programming) to brush up on my flash scripting skillz.

So far, so good.  It is still a work in progress, and there are many known issues:

  • the enemy you shoot isn’t always the one that is removed from the game
  • player may leave the screen (need to add screen limits)
  • placeholder art asset for explosion & torpedoes
  • no enemy AI beyond basic movement
  • enemies pop into view rather ugly sometimes
  • ship heading is suffers from rounding errors
  • torpedo heading suffers from the same rounding errors
  • …and lots more

Features to add:

  • radar
  • lasers
  • shields
  • enemy combat AI
  • pick-ups
  • scrolling background
  • …and whatever else I find time to add

The game is composed of several class files which can easily be reused for other 2D space shooters:

  • Main.as (main game loop)
  • PlayerShip.as
  • EnemyShip.as
  • Torpedo.as
  • Explosion.as
  • UserInterface.as
  • Collision.as (code thanks to gSkinner)

You may download a full source code zip file, or play the game from here (World Building).

Rating: 0.0/5 (0 votes cast)