Conway's Game of Life

Conway's Game of Life

by plyingfig

πŸ‘ 324 ❀️ 26 ⭐ 20 πŸ”„ 0
Created: Mar 21, 2021 Last modified: Jun 20, 2021 Shared: Apr 11, 2021

Description

If too laggy on your PC, you can instead run on turbowarp: https://turbowarp.org/504922751 https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life This project started as me explaining to my kids what Conway's Game of Life is. I then thought that it would be a good idea to "finish" it and share it. So I added the instructions, and improved the editor, and added ability to import/export grids, and provided pre-defined patterns, and ... etc. I was litterally assailed by a gang of feeping creatures! All scratch code is by me. This project wasn't properly planned, and the resulting code is a bit messy... The simulation engine is pretty-much a straight implementation of the algorithm, without much optimisation. Those interested in better ways of implementing it should check out HashLife, which uses hashing and quad trees to speed the simulation up (it is quite cool!). Description of the methodology can be found here: https://github.com/mafm/HashLife The style of the instructions are very much inspired by the tutorials from @papipupepappa . Thx to @helloitsme23496 for beta-testing.

Instructions

β–Ί Hit the green flag. Then click or press any key to get to the main menu. β–Ί Listen/watch the Β«InstructionsΒ» [I] if you don't know what Conway's Game of Life is. β–Ί Β«Draw & SimulateΒ» [D] to explore the Game of Life. Draw/erase cells on the grid with the pencil/eraser, and let the cells evolve, step by step or in automatic mode. (More details below.) β–Ί If you lack inspiration, just Β«Simulate a Random SoupΒ» [S]. ══ Keyboard short-cuts ═════════════════ [Space] displays/hides command buttons. [M] returns to the main menu. β–Ί Drawing [D] selects the pencil. [S]/{Play button} starts the simulation. [C]/{Clear button} clears the grid. [R]/{Reset button} resets the grid to its state at the start of the last simulation. [E] selects the eraser. [L]/{Pattern button} lets you select and load a pre-defined pattern (see below). {Import button} imports a saved grid. {Export button} exports the current grid. [Right arrow]/{Forward button} evolves the grid by one generation. [1], [2], [3], [4]/{Resol. button} changes the resolution of the grid, from high resolution (80x60) to low resolution (40x30). High resolution is slower and requires more CPU. Changing the resolution clears the grid. β–Ί Simulation [D]/{Stop button} stops the simulation and enters drawing mode. [P]/{Pause/Play button} pauses/resumes the simulation. [Right arrow]/{Forward button} evolves the grid by one generation (while simulation is paused). ═════════════════════════════════ ══ Predefined patterns ══════════════════ You can look at some interesting patterns via the Pattern command. β–Ί Still life: pattern that is stable (it doesn't change). β–Ί Oscillator: pattern that repeats itself in a stationary way. β–Ί Spaceship: pattern that "moves"; it repeats itself, like an oscillator, but after a translation. β–Ί Gun: pattern that repeats itself after spawning a spaceship pattern (e.g. glider gun). β–Ί Methuselah: pattern that evolves for a LONG time before stabilizing or dying (the highest resolution grid is in fact too small to see the full evolution, but it nevertheless gives an idea). β–Ί Puffer: pattern that moves like a spaceship, but leaves debris behind. β–Ί Fuse: a sequence of stable/oscillator patterns that are "burnt" by a moving pattern. β–Ί Eater: stable pattern that is able to destroy another pattern, while restoring itself to its initial state. ═════════════════════════════════ The grid is a cylinder (kind of). Left and right sides are connected, but offset by one line. This is because I went for a basic implementation of the grid... ═════════════════════════════════ Share your cool patterns in the comments, by using the Export command (paste the export code in a comment). ═════════════════════════════════ #game #gameoflife #simulation

Project Details

Visibility
Visible
Comments
Enabled

More Cool Projects

Project thumbnail
View Project

γŠγΎγ‘γ“γ‚γ“γ‚ ι¬Όη•œ remix-9 γƒͺプレむ

by 05hyuuu

Project thumbnail
View Project

Fireworks Show Maker v1.0

by samuelspinelli1

Project thumbnail
View Project

Diep.io Tower Defence! (Beta) remix

by Trackmaniadude

Project thumbnail
View Project

Angry Birds Level Maker

by 11011335

Project thumbnail
View Project

Beat Up Smiley Guy Added Sounds And Buttons

by zzhhookk

Project thumbnail
View Project

Beat Up Scratch Cat (3)

by thiagobri

Project thumbnail
View Project

Blue Mist Plus - All Jumpscare 2000s (update)

by Afty_16020

Project thumbnail
View Project

The Battle Bees - Version 1.0.2

by sisayisback

Project thumbnail
View Project

The longest and scariest emerald pingu error in the dimension (part 7.3)

by DanielSapinho9IsBack

Project thumbnail
View Project

Galaxy Note9 Crazy Error Maker (One UI2.1)

by WindowsAstron

Project thumbnail
View Project

Massive Multiplayer Platformer v1.4 (Mobile friendly #game)

by ADHRIT-1234

Project thumbnail
View Project

Beat up Edward 2

by hyd3ns33k

Project thumbnail
View Project

protect stormtrooper.

by starwars2035

Project thumbnail
View Project

-<[{(Collabs)}]>- talking tom and ben news beta remix

by jayjayy1809

Project thumbnail
View Project

Outfit7 Talking Santa

by nathygames9087

Project thumbnail
View Project

Totally accurate battle simulator.

by tyler111112

Project thumbnail
View Project

γƒ’γƒγ‚€γƒ«ε―ΎεΏœγ€€ 3d レースゲーム スープラドラむビング γ‚·γƒŸγƒ₯レーター remix

by arihaya

Project thumbnail
View Project

Bitcrushed them all

by RGYBRises

Project thumbnail
View Project

Vyond Effects Kit [Runs All Effects] remix

by clanito12

Project thumbnail
View Project

Destruction

by Fire_pants

Project thumbnail
View Project

Stickman Fighter Epic Battle

by ksj0070

Project thumbnail
View Project

Double Bitsy Interrupts Nickelodeon Creatures On Bridge Template

by siddharth1717

Project thumbnail
View Project

the full RALR cast! remix-3

by toocoolBoy1

Project thumbnail
View Project

(10,000 VIEWS) Beat up Edward DLC Remastered but..... remix

by 3mil123