★ AMSTRAD CPC ★ GAMESLIST ★ LIFE (c) COMPUTING WITH THE AMSTRAD/AMSTRAD SEMANAL ★ |
Computing with the Amstrad | Amstrad Semanal |
LIFE is a fascinating program which simulates the growth of a colony of cells. It was invented around 1970 by John Conway of Cambridge University and is basically a pattern generating program. Initially the screen is blank and using the program's editor you have to set up the first generation of the colony. The cursor keys move the cursor, and cells can be placed anywhere on the screen by pressing Copy and deleted by pressing Delete. If you've never played Life before try placing a straight line of about 10 cells and press Enter on the CPC464 or Return on the CPC6128 to show you've finished. Now watch what happens. The patterns generated are based on four simple rules:
These rules mean you have to be careful when setting up the colony. You may find that some patterns die out very quickly, while others last for several hundred generations. It's up to you. When the main program is running you can hold down the spacebar to pause or Enter/Return to start afresh with a new colony. To make it more interesting there are options to tamper with the rules of Life. These generate different patterns. The editor is a simple Basic program but Life itself is pure machine code for speed. There are almost 4,000 cell positions on the screen each with eight neighbours, so with each generation the program must scan 32,000 cell positions and redraw up to 4,000 cells. This takes about one second. Blank positions can't be ignored since a new cell may be born if there are three neighbours. To achieve a reasonable speed the machine code is quite complex with its own plot routines, ignoring the firmware altogether. You can use the disassembler in the November 1985 issue of Computing with the Amstrad to see how it works. CWTA |
|
|
Page créée en 330 millisecondes et consultée 1486 fois L'Amstrad CPC est une machine 8 bits à base d'un Z80 à 4MHz. Le premier de la gamme fut le CPC 464 en 1984, équipé d'un lecteur de cassettes intégré il se plaçait en concurrent du Commodore C64 beaucoup plus compliqué à utiliser et plus cher. Ce fut un réel succès et sorti cette même années le CPC 664 équipé d'un lecteur de disquettes trois pouces intégré. Sa vie fut de courte durée puisqu'en 1985 il fut remplacé par le CPC 6128 qui était plus compact, plus soigné et surtout qui avait 128Ko de RAM au lieu de 64Ko. |