Ajax & Games & YahooSunday, January 21st, 2007

Space Invaders!

My first contact with “Space Invaders” was about 6 years ago. It was an assembler version found in programmersheaven.com. I think this game is a grand grandmother of all space shooter games, look at the first release date - 1978. WOW! (four years older than me :)).

Couple of weeks ago I decided to create my own version of “Space Invaders”. The code was written by me but the sprites (aliens, UFO, laser gun) is taken from the original version. Everything is written in JavaScript, with the little (read big) help of Yahoo User Interface (same as the last two games).

I had the problem with Firefox, because instead of Opera and IE, in the Firefox the use of the processor while the game was running, was very big (maybe because that a lot of loops were running at the same time). So, I have to rebuild the first project and optimize it for the Firefox. However, still you can see some delay while aliens and UFO are moving (maybe it is some proof that the Gecko engine is slower than IE’s engine :/, no it can not be!). (If you have some time you can check which browser is faster, just turn on window.setInterval(); function (three or four different at the same time) with some loops (not infinite, you can change top and left attributes of some div elements).

This game also wasn’t tested in the Safari browser. Works fine in the latest version of Opera, Firefox, and IE.

Enjoy…

Space Invaders!


Leave a Reply

  • Name: (required)
  • E-mail: (not required/will not be published)
  • Website:
  • Comment: (required)
  • Enter Above Code:
  • Letters left: 255
  • Note: Your comment will appear on the site within a few hours after you submit it.