Games JavaScript Code Snippets

These snippets are all JavaScript games. Play the classic games Mastermind or Tic-Tac-Toe or any one of the dozen other games. If you plan to use these snippets, please remember that these snippets have some of the longest and most complicated source codes of any snippets in our archives.

Results via Envato Market

This is the first time I post in the Games. I usually post in utility, even though I make a lot of non-javascript games with regular programming languages. This is by far the most primitive unadvanced game/program I have ever created. I actually made it a long time ago when I knew very little about Javascript. You take turns with the computer guessing a number. There is several glitches in it, so be careful. The most common is the one after you restart the game when you win/lose. Just choose ‘Cancel’ when it asks.

Move yourself through multiple levels of this maze striving to get to the goal, you can move in all directions including diagnals

Slot-machine script. Full graphic interface, no alerts or text boxes, non-random reels. Features nudges and holds. My first script, let me know if you like it.

The Life Game (a cellular robot) using DHTML/JavaScript for version 4 browsers (Netscape & Microsoft) only !

This JavaScript is another version of a role playing game. Fight against up to ten people.

Use a crop duster to exterminate little e-mail smilies that stick out their tounges. NO GIFS, JUST CODE FUN!! Gives you that classic gaming feeling.