README.md (1527B)
1 # sdl2-life 2 3 [Conway's Game of Life](https://www.conwaylife.com/wiki/Conway's_Game_of_Life) 4 5 This implementation uses a [SDL2 Go library](https://github.com/veandco/go-sdl2/) to draw the world. 6 7 * It currently supports loading [Life 1.05 pattern files](https://www.conwaylife.com/wiki/Life_1.05) 8 * Supports plaintext pattern files like those from the [Life Lexicon](https://www.conwaylife.com/ref/lexicon/lex_1.htm) 9 * Hit 'h' to display they key help on the console while it is running. 10 * Pass '-help' on the cmdline to see the available options. 11 * Pass '-empty' to start with an empty world, this is useful when combined with '-server' which normally starts 12 with a random seed. 13 14 The window size (width, height) should be evenly divisible by columns and rows 15 respectively. Otherwise the cell size is rounded down, so that they are square, 16 and the world may not use all of the available space. 17 18 Resizing the window with a window manager is likely to also cause problems -- 19 this code was written suing dwm and a floating window with no decorations so I 20 haven't added any resize support. 21 22 ## Server 23 24 Passing '-server' will listen to port 3051 for pattern files to be POSTed to it. This supports the same formats 25 as the cmdline -pattern argument (Life 1.05 and plain text). You can easily send it a pattern file using curl like 26 this: 27 28 curl --data-binary @./examples/glider-gun-1.05.life http://127.0.0.1:3051/ 29 30 ## Building 31 32 Run `go build` 33 34 The only dependency is on the [SDL2 Go library](https://github.com/veandco/go-sdl2/)