- Reset Game
- Book
- BASIC
-
Bug
Original Resources
Download the original BASIC code. Check out the original page the text below was taken from in the Book.
Instructions From the Book
"The object of this game is to finish your drawing of a bug before the computer finishes.
You and the computer roll a die alternately with each number standing for a part of the bug. You must add the parts in the right order; in other words, you cannot have a head until you have a neck, and so on. After each new part has been added, you have the option of seeing pictures of the two bugs.
If you elect to see all the pictures, this program has the ability of consuming well over six feet of terminal paper per run. We can only suggest recycling the paper by using the other side.
Brian Leibowitz wrote this program while in the 7th grade at Harrison Jr-Sr High School in Harrison, New York."
Modifications For This Version
I stayed pretty true to the original game, conceptually, on this one. Just like the original, you can choose to see the bugs or not. With each roll, the screen clears and shows all of the events that occurred leading up to the next bug part that was built.
A button then appears asking you if you want to see the bugs. Rather than using text print-outs like the original, these are pixels plotted in a grid giving a bit of the retro vibe. I've also added the ability to toggle between the type of bug style (either little bubbles or little squares).
Technical Stuff
The main functionality of the game is written in JavaScript. PHP is, of course, used to generate the basic HTML content. The bugs are plotted on a grid of a whole bunch of divs. These were generated by PHP.
The Future
Currently, I'm pretty happy with the game play. It's pretty much the same (in spirit) as the original. I'm considering adding a feature that counts the total number of times each player wins. I think letting the user choose their bug color would be fun. Maybe I'll let them choose the computer's color too (or just make that random). but other than that I haven't thought of any features I want to add. Maybe someday. Until then . . .
Enjoy Bug!