HTML and JavaScript for Classic Computer Games © Copyright 2004 by James Larson
James Larson
Programmer/Analyst Consultant
A.K.A. Computer Guy
A.K.A. Internet Grandpa
Resume
Remember, it takes hard work to make computers easy to use.

Classic Computer Games

A word about browsers.

Coming Soon!
JavaScript Tutorial Videos!
www.youtube.com/user/BinaryTutor

I am asking for your support so I can continue adding original content to this site and start my new enterprise, Internet Grandpa Do you have a precosious child asking a lot of computer questions you can't answer? Let me try! Just have her/him type their question under your email account and send it to me. I'll respond to you as best I can. At the very least, my explanation might help you answer your child's question.
The animation on the left tells a story. Can you figure it out? Can your child? If not, then read the explanation here.

Home-schoolers, Educators, Teachers, Professors, and Instructors -- Please take note!
Ok, ok -- these games can't hold a candle to the modern, high-performance programs your students are used to. Yet these pages are simple enough that anyone sufficiently motivated can readily comprehend them. More importantly, all the software needed to get started in creating your own comes standard in Windows XP:
  • Notepad -- to write HTML and J(ava)Script code
  • Paint -- to draw graphics
  • Internet Explorer -- to run programs your students create.
Also, all the documentation needed can be found at Microsoft's web site:
  • JScript reference, the powerful scripting language built into Internet Explorer. To download this documentation, you will need to run the genuine Windows product authentication program.
  • HTML and DHTML, the markup language used to render web content in browsers.
Finally: Best part of all -- this neat stuff is free!

Any competant instructor can teach rudimentary programming. With a good book from your local library, you've got all you need to introduce your class to this essential modern skill. My own introduction came in High School from an enlightened Freshman Algebra teacher who taught a module on BASIC to his class. To this day, I look back with deep appreciation for his effort.
www.motherboardbooks.com Computer Guy meets Computer Lady! Object: matrimony! A marriage of convenience between two web sites that see teaching Computer Science to youngsters as important in our technologically advanced, automation saturated society.
Number Square Rearrange tiles numbered 1 to 15 in a 4 x 4 grid. But there is a catch, though. Check it out.
Nim Grab a handful of objects, put it in a pile. You and your opponent start taking objects from the pile. The player left with the last object, looses.
Four Pile Nim Set up four piles of matches. You and your opponent take at least one, and up to all, from any one pile at a time. Player grabbing last match wins.
Taxman You and the Taxman take integers from a list. When you take one, it's added to your score, and the Taxman gets all divisors and multiples of that number added to his score. Play proceeds until there are no more numbers left in the list with divisors or multiples still in the list, and the rest of the list gets added to the Taxman's score.
Bagels Guess the computer's secret three digit code. After each attempt to crack it, you are given special clues. Get it right in six or less guesses, and you win.
Tic-Tac-Toe The classic game played by children everywhere. This version plays a pretty good game, but you can win. You can go first, or let the computer go first. And it learns...
Adventure A true classic! Developed by the brainiacs of Digital Research, it was a favorite around computer labs back when they were big, expensive, and rare. This text based fantasy game combines luck, reading, thinking, determination and imagination.
BlackBox Deduce the location of randomly placed atoms on and 8 x 8 grid. User fires rays into the grid and the computer reports where the rays come out. User may specify the number of atoms placed in the grid.
Mu-Torere A game played around a spoked wheel. Move your markers until the computer has no more legal moves, or visa versa. Be warned, computer plays a good game! This game works under FireFox and IE4.
JalTrek This virtual adventure game pits the player against a horde of nasty aliens bent on galactic domination. A perennial favorite among early computer aficionados, this is a new adaptation to the Internet. Not a dexterity tester, it will challenge young student's ability to think logically, plan strategically, adapt tactically, and grok basic trigonometric math.
Battleship Remember playing Battleship with your best friend? This version pits the Admiral (you) agains the Enemy (computer) in a no holds barred, knock-down, drag out, winner-takes-all epic naval battle. The computer employs a powerfull strategy that is hard to beat, but only uses the same clues available to the human player.
Boxes This is a rendition of the classic kid's game played with paper and pencil. The object is to draw boxes. Each box is worth one point. Player with most boxes wins.
Awari An ancient game played with pebbles. Each player takes pebbles from one of his/her pits, and sows them into other pits. Player with most pebbles in their home pit wins.
Speed Hanoi Here is an arcade version of the venerable Tower of Hanoi puzzle. My nephew did the graphics for his own version, and they were so good I appropriated them for my version.
Hex Build unbroken chains from one edge of a hex matrix to the other. Play solitaire or against the computer.
Cross Letter Puzzle A letter oriented developmental exercize. Match the characteristics of a letter's four sides based on their shape: curved, pointed, or straight. Choose a word from 5 to 8 letter long and then arange them on a cross shaped graph.
Asteroids with Space Gravel This page will serve as a basis for an upcoming video on JavaScript. It is my version of the veverable Atari game by the same name. Shoot big rocks which results in medium sized rocks; shoot medium sized rocks to get small rocks; shoot small rocks to get Space Gravel. Fly around like a real space ship while shooting at all these rocks!
Remarkable Program By Dave Ahl Dave Ahl wrote a BASIC program to demonstrate a mathematical concept that he found interesting. Unfortunately, he neglected to explain what he meant, and I honestly can't noodle it out. However, I converted his effort to JavaScript for the intellectual joy it brought.
BASIC Lab This page implements a version of line numbered BASIC. It is intended for old-timers who know BASIC and want to teach youngsters how to program. You can create your own programs with it, or entertain yourself with one of the "Tapes" in the library.
Checkers The classic board game, Checkers. This is a port and upgrade of a BASIC version I found on the 'net, which you can play using BASIC Lab (listed above).

I played the BASIC version several times while developing BASIC Lab - you really had to want to play checkers against the computer back then! This is because the old user interface is very tedious and difficult - my new JavaScript version is much easier to use. I recommend playing both versions to appreciate what modern Graphical User Interfaces (GUI) do for computer usablility.
Yahtzee Dice Rolling The game of Yahtzee is played uses 5 die to generate a series of random number which are then scored according to 13 specific rules. I found a Yahtzee game written in BASIC which I am rewriting in JavaScript. This page is significant because it does not use IMG files to create the die graphics. It also shows the significant advances in user interface engineering.
Yahtzee The classic game of Yahtzee is played using 5 die to generate a series of random numbers which are then scored into 13 categories. This game was introduced 2 years before I was. Enjoy!
Reversi Reversi (also known as Othello) is a board game played on a 8 x 8 matrix of squares. The object is to populate the grid with more of your colored discs than your opponent. The rules are simple and straightforward. This page will give most humans a very good game.
Connect 4 This is a classic board game of strategy. Similar to Tic-Tac-Toe only with a couple of twists -- more squares, more markers in a row to win, and pieces are played from the bottom up, rather than just any ol' where.

Pit yourself against the computer! Also, the game supports several levels of psychological warfare -- just to make the game more edgy. WARNING: Play the No Quarter at your own risk!
Mad-Lib A takeoff of "Ad-Lib" where the computer accepts as input some 40 words and then puts them into one of four plots. Depending on your word choice, the potential for hilarity is enormous. The program has enough built in words that if you can't think of enough on your own, just click on your desired story and the computer will fill in any blanks. An example of how a computers can replace even gag writers!
VAX DIG-DUG II This game is from the DEC VAX world. Ported from Pascal for your enjoyment, it originally ran on a big, expensive computer owned by some university. You played it on a VT100 Terminal. The object is to collect points digging for Uranium while running from and zapping Mangy Mad Mutant Moles.
Red State - Blue State A political game - sort of. Take a map of the 48 contiguous states of the USA and claim them for your side. But beware, there is a rule. Good drill for young people trying to learn the names of all the states and where they are located in the country.
FIAR - Five In A Row This is a port from FORTRAN 66 of a game played long ago on an IBM1130. Try your hand against the computer as this is a tough program to beat.

These games were all developed and tested under Microsoft Internet Explorer 4. Under IE4, all described features of the game work. They have been tested under IE 5.5 and NetScape 6.2, with minor problems. Your particular browser may not work at all.

I have also tested these games under Firefox 0.8. If you'd like to check out an alternative Web Browser, I recommend this one. It supports MAC, Linux, and Windows. You may download the version of your choice from the following web site:

http://www.mozilla.org/download.html



Visitor #
These classic computer games have been written and distributed by

James Larson
Programmer/Analyst Consultant
http://www.dst-corp.com/james
E-mail address
In God We Trust...