ENGLISH --Instructions-- Click the green flag to start. Enter a number between 1 and 9 to choose the corresponding pattern in this list: 1- Blinker (discovered by John Conway - 1970) 2- "+" shape (I couldn’t find the actual name or its origin) 3- Glider (Richard K. Guy - 1970) 4- Pulsar (John Conway - 1970) 5- Lightweight spaceship (John Conway - 1970) 6- Gosper glider gun (Bill Gosper - 1970) 7- R-pentomino (John Conway - 1970) 8- Puffer 2 (Bill Gosper - unknown year) 9- Max (Tim Coe - 1995) Once you press enter, the simulation will begin. -Controls- - Arrow keys: move around the grid - Space key: hide/show sliders and variables - h: return to "home" (initial) position - r: reset settings -Sliders and Variables- - Size: zoom in/out - Follow cells: will always center and scale itself to view all live cells - Time between gens: controls the speed at which it generates the next iteration - Pause: pause at current generation - Colour R/G/B: controls the live cells’ colour - Show grid: show/hide grid lines - High def: renders the cells as squares/dots - FPS: shows the frames per second rate - Gen count: shows how many generations since the initial pattern --About Conway’s Game of Life-- The Game of Life is not actually a game (sorry if you came here wanting to play a game). It was invented by the mathematician John Conway in 1970. You can read more about the Game of Life here -> http://conwaylife.com/wiki/Conway%27s_Game_of_Life or hear the inventor himself talk about it on Numberphile -> https://www.youtube.com/watch?v=R9Plq-D1gEk (check that channel out as well if you’re interested in maths - they’re great!) but I’ll explain it briefly. The Game of Life is what is called a cellular automaton, which could roughly be described as a simulation of a set of "cells" governed by simple rules. (More on cellular automatons here -> http://conwaylife.com/wiki/Cellular_automaton or here -> http://mathworld.wolfram.com/CellularAutomaton.html - it’s really interesting!) It takes place on a grid of pixels called cells, which can exist in two states: alive (coloured) or dead (empty). The grid undergoes change in units of time called generations. The state of each cell in the next generation is determined by its actual state and the state of its eight surrounding neighbors. The rules are as follows: - A live cell with four or more live neighbors will die of overpopulation in the next generation; - Similarly, with one or no neighbor, it will die of isolation; - A dead cell with exactly three live neighbors will spring to life. --About this project-- I wanted to reproduce Conway’s Game of Life in Scratch, as I’m sure others have done before, but with an endless grid in all direction. And in pen, cause pen is the best, of course. It took me a bit too much time to make this project (as is often the case, haha) but I’m pretty happy with how it turned out. :) I was surprised with how fast it is and how big the grid can get before it starts slowing down too much. I would have added a way for the viewer to edit the initial pattern, but I would have spent way too much time on that, lol. Instead you have to choose between nine patterns. Or you can go see inside and edit the code! I know, it’s not very convenient. When coding this project, I originally tried a different approach, by storing the position of each live cell, instead of the state of each cell. After reconsidering it, I realised that it would just be more complicated and way slower to run. (Really, it was a terrible idea, haha.) Instead I just made it store the grid normally, and I made it without end by making it add or remove rows and columns to follow the live cells. The algorithm applies the Game of Life’s rules by adding to the neighbor count of each of the neighbors of each live cell. In other words, each living cell tells its neighbors that they have a living neighbor. I don’t know if that’s clear. If you have any question, suggestion, or anything to say about this, please comment! Also, please leave a like and favorite if you found this interesting, and maybe check out my other stuff too! :) --Credits-- - I coded everything and made pretty much everything in this project. - I used this site mainly to find the starting patterns I chose -> http://www.conwaylife.com/wiki/Main_Page - Credit goes to those who discovered the patterns I added - And or course, to John Conway for inventing the Game of Life
FRANÇAIS --Instructions-- Cliquez sur le drapeau vert pour commencer. Choisissez un arrangement de départ en entrant le chiffre correspondant : 1- Clignotant (découvert par John Conway - 1970) 2- Forme de « + » (Je n’ai pas pu trouver le vrai nom) 3- Planneur (Richard K. Guy - 1970) 4- Pulsar (John Conway - 1970) 5- Vaisseau léger (John Conway - 1970) 6- Canon à planeurs de Gosper (Bill Gosper - 1970) 7- R-pentomino (John Conway - 1970) 8- 2e puffeur (Bill Gosper - date inconnue) 9- Max (Tim Coe - 1995) La simulation débute quand vous appuyiez sur la touche entrée. -Contrôles- - Flèches: déplacer l’image - Touche espace: cacher/montrer les variables et les potentiomètres - h: retourner à la position initiale - r: réinitialiser les potentiomètres -Potentiomètres et variables- - Size: contrôle le zoom - Follow cells: l’image se cadrera toujours sur les cellules vivantes - Time between gens: contrôle la vitesse à laquelle le programme génère la prochaine itération - Pause: pause à la génération actuelle - Colour R/G/B: ajuster la couleur des cellules vivantes - Show grid: montrer/cacher les lignes - High def: les cellules vivantes sont représentées par des carrés/ seulement des points - FPS: montre le taux d’images par secondes - Gen count: compte le nombre de générations depuis la configuration de départ --À propos du Jeu de la vie-- Le Jeu de la vie n’est pas vraiment un jeu (désolé si vous vous attendiez à un jeu). Il a été inventé par le mathématicien John Conway en 1970. Vous pouvez en apprendre plus sur le jeu de la vie ici -> https://fr.wikipedia.org/wiki/Jeu_de_la_vie ou écouter l’inventeur lui-même en parler (en anglais) -> https://www.youtube.com/watch?v=R9Plq-D1gEk. La chaîne YouTube ScienceEtonnante a aussi fait un excellent vidéo sur le sujet -> https://www.youtube.com/watch?v=S-W0NX97DB0. J’essayerai d’en expliquer brièvement l’essence. Le Jeu de la vie est ce que l’on appelle un automate cellulaire, c’est-à-dire une sorte de simulation d’un groupe de « cellules » qui interagissent selon des règles simples. (Plus sur les automates cellulaires ici -> https://fr.wikipedia.org/wiki/Automate_cellulaire – c’est vraiment intéressant!) Le jeu de Conway se déroule sur un tableau de pixels appelés cellules, qui peuvent exister en deux états : vivantes (colorées) ou mortes (vides). Elles interagissent et changent à chaque unité de temps que l’on appelle générations. L’état d’une cellule à la prochaine génération est déterminé par son état actuel et celui de ses huit voisines. Voici les règles : - Une cellule vivante qui a quatre voisines ou plus mourra de surpopulation à la prochaine génération ; - De même, avec seulement une ou aucune voisine, elle mourra d’isolement ; - Une cellule morte avec exactement trois voisines vivantes renaîtra. --À propos de ce projet-- Je voulais recréer le Jeu de la vie sur Scratch, comme d’autres ont déjà fait, mais avec un tableau sans fin. Et avec la fonction stylo, bien sûr, j’adore le stylo. J’ai pris un peu trop de temps à finir ce projet (comme ça m’arrive souvent, haha) mais je suis content du résultat. :) J’ai été surpris par la vitesse du programme et par combien de cellules il peut y avoir avant qu’il ne commence à trop ralentir. J’aurais ajouté une manière d’éditer l’arrangement initial de cellules, mais j’y aurais passé beaucoup trop de temps, lol. Alors, vous avez à choisir entre neuf configurations. Ou vous pouvez aller éditer le code! Je sais, c’est pas très commode. En codant ce projet, j’ai d’abord essayé une approche différente, en enregistrant en mémoire la position de chaque cellule vivante, au lieu de l’état de chaque cellule. J’y ai repensé, et j’ai réalisé que c’était juste plus compliqué et probablement beaucoup plus lent. (C’était une mauvaise idée, haha.) Alors j’ai juste utilisé la deuxième méthode mentionnée ici, et pour rendre mon tableau « infini », j’ai fait l’algorithme ajouter ou enlever des rangées ou des colonnes pour suivre le groupe de cellules vivantes. L’algorithme applique les règles de Jeu de la vie en ajoutant au compte de voisines des voisines de chaque cellule vivante. En autre mots, chaque cellule vivante dit à ses huit voisines qu’elles ont une voisine vivante. J’espère que c’est assez clair. S’il-vous-plaît, laissez un commentaire si vous avez des questions, suggestions, ou simplement quelque chose à dire à propos de mon projet! Aussi, svp likez et mettez en favori si vous avez trouvé ça intéressant, et allez peut-être voir mes autres projets! :) @MeGacreator22 --Crédits-- - J’ai tout codé et fait tout ce projet. - J’ai utilisé ce site, surtout pour trouver les arrangements initiaux de cellules -> http://www.conwaylife.com/wiki/Main_Page (anglais) - Le crédit va à ceux qui ont découvert ces configurations - Et, bien sûr, à John Conway, l’inventeur du Jeu de la vie.