About & Contact

JavaScript Game - Browser Shooter

As a programmer who likes working with JavaScript, I always wondered whether HTML+JavaScript is that bad compared to Flash for game development. This is obvious, because there are thousands of web sites dedicated to Flash games and only a few JavaScript games. As a test I decided to make a simple game, which you can at the bottom of the screen. This is a clone of the game called Snood, which I really enjoyed playing on my first PC.

It is also of interest that some phones can also run Flash and HTML+JavaScript. Typically these may be Smartphones or Multimedia phones which tend to be often used as a business phone or with people who are often on the go. However, the comparison of games running on phones is a debate for another time and another post.

Game on empty page

As you see, it is really basic, but it is best what you can achieve if you want to support Internet Explorer (no canvas in the near future). Even with this game, I encountered a few problems:

To rotate an arrow I used IE filter DXImageTransform, but you can't set a transform origin with it, because of that arrow in IE moves incorrectly.

Also I wanted the browsers to slowly move down, but because CSS doesn't support sub-pixel values for position, it looked really bad. The animation wasn't smooth at all.