SRC_JS: Snake Bytes + Sokoban = Puzzle Snake. Yet Another JavaScript game

While I was playing with my version of Snake game, I suddenly got struk by the idea that I can easily extend the game. First I thoght that it could be interesting to just add some maze on the game field, but I dropped the idea cause you can easily end up with a maze that is not passible. Then I decided that after all I could add the maze but also make the snake move only when the player gides it. Finally my idea ended to some weird combination of Snake and Sokoban game.

As usual click on the image to play the game:

This time I made one brief test of the game on Firefox. I thought there would be a lot of compatability problems, but it was not the case. The only thing that I had to change to "port" the code from IE to FF was to expand one line:
var keykode = window.event.keyCode;
var keykode;
if(window.event) // IE
keykode = window.event.keyCode;
else if(e.which) // Netscape/Firefox/Opera
keykode = e.which

Sunday, July 09, 2006

© 2002 - 2008 Kroum Grigorov
This page is powered by Blogger. Isn't yours?