Nibbles is a simple and addicting game, like Tetris and Arkanoid. You command a snake that can only make 90 degree turns on a two-dimensional maze, hunting for the 'fruits' that litter the landscape. Your snake grows longer with each fruit eaten. Colliding either with the arena walls or the snake itself costs a life or Game Over, depending on the game port.

No, I have no idea why I HAD to write this in.

Also one of the first games ported to the TI calculator series in both TI-BASIC and Assembly code. As far as I know, there is a version of Nibbles for every programmable calculator from TI. Very distracting, very addictive, very fun, very dangerous as far as maintaining your GPA.

Nibbles also happens to be the name of the Springfield Elementary hamster.
Also in a recent show this very creature saved the lives of the children of Springfield that were snowed in at the school.
Nibbles was last seen after Principal Skinner, who at the time was tied up in a dodge ball sack, asked Nibbles to chew through his ball sak.
Brief description
Nibbles is a QBASIC1 game created by Microsoft2 in 1990, where 1 or 2 players must control a snake (or snakes) as they move around a playing area trying to eat numbers which appear.

Playing the game
To play the game, you must run the NIBBLES.BAS file which came with your version of DOS (or if you've got it off of your Windows 95 CD, or if you've downloaded it). Pick whether you want to play a 1 or 2 player game. Select a game speed from 1 to 100 inclusive. Choose whether or not you want the game to get progressively faster, then pick either monochrome or colour display. Now, move the snake around the playing screen with the four arrow keys, and run into the numbers that appear. Once you've eaten a 1, it disappears, your score goes up by 100, and a number 2 appears, which you must then eat.
Once you have eaten 9 numbers, the next level starts. Each level is harder than the next, due to the addition of barriers. If you collide with the edge of the playing field, a barrier, or your own tail, then you lose a life.

In the original version of the game, there are 10 levels, and you start with 5 lives. Each time you eat a number, you get (that number * 100) points, so you can gain a maximum of 4,500 points per level. Each time you lose a life by hitting a wall or yourself, you lose 1,000 points. You can pause the game by pressing "p".
The entire game uses ASCII characters only (no flashy graphics), and the standard 80x25 display size.

Getting the game
Edited versions of the game can be found on the WWW. The original version can be downloaded from http://members.aol.com/bigbutter/NibblesHomepage/nibbles.bas
Once you've downloaded the game, just load it in QBASIC and run it.

Fixing the game
If you have a reasonably fast computer which has been made in the last few years, the program may crash with a "Division by zero" error on line 47 of the GetInputs subroutine. This is because Nibbles actually works out an approximate speed for your computer by dividing a number by the time it takes your computer to do a FOR..NEXT loop 1000 times. The way in which QBASIC times this is only accurate to about 1/10 of a second, so if it takes less than this to do 1000 loops it divides by zero.
To fix this, we need to make a small kludgy edit to the program. Go to line 55 of the subroutine PlayNibbles and change

FOR a# = 1 TO curspeed: NEXT a#

to

FOR a# = 1 TO 100000: NEXT a#

Then go to line 47 of the subroutine GetInputs and put an apostrophe at the start of the line (this makes it into a comment rather than a piece of code).

If this runs too slowly for you, change 100000 to a smaller number. If it's too fast, change 100000 to a bigger number.

Footnotes
1 In this writeup, I'll use the terms QBASIC and QuickBASIC interchangably, even though one is a free interpreter and the other is a $100 compiler which you pay money for.
2 TheBooBooKitty informs me that MS did not actually make this game, and that it has been around since the early 70s, under a variety of different names. However, it is interesting to note that MS have put a copyright on their version of the game. (jrn elaborates: "you can't copyright the idea of a game, but you can copyright source code. So it's the implementation, not the game, which was copyrighted")
3 2004.04.14 at 20:48 Orange Julius says re Nibbles: To second TBBK's assertion, this game is very much pre-Microsoft. DECs in the 1980s had this game, executable under the name 'worm'. The worm's head was an @ symbol.


The contents of this writeup are in the public domain.

Log in or register to write something here or to contact authors.