Game of Life sizecoding contest
- MustardTiger
- Microbot
- Posts: 130
- Joined: Tue May 02, 2023 8:05 pm
Re: Game of Life sizecoding contest
I have an version written but I haven't submitted yet. I was looking at some entries for a different size competition and how small the entries are so now I'm thinking I should remove the sound fx from my Game Of Life entry. I'm not even joking.
Re: Game of Life sizecoding contest
Three (?) years ago I did something that looks exactly like the assignment. In Forth with a bit of assembler thrown in. After compilation, it has 889 bytes, so pure assembler is half the size.
https://codeberg.org/DW0RKiN/M4_FORTH/s ... me/life.m4
q up
a down
o left
p right
s swap cell
c clear all
f fill all
e exit
Rules:
Any live cell with two or three live neighbours survives.
Any dead cell with three live neighbours becomes a live cell.
All other live cells die in the next generation. Similarly, all other dead cells stay dead.
Endless playing area. One edge follows the other edge.
https://codeberg.org/DW0RKiN/M4_FORTH/s ... aster/Game
PS: I'm not sure, but I have a feeling that when displaying, only the blue color for ink is turned on, otherwise it turns black.
https://codeberg.org/DW0RKiN/M4_FORTH/s ... me/life.m4
q up
a down
o left
p right
s swap cell
c clear all
f fill all
e exit
Rules:
Any live cell with two or three live neighbours survives.
Any dead cell with three live neighbours becomes a live cell.
All other live cells die in the next generation. Similarly, all other dead cells stay dead.
Endless playing area. One edge follows the other edge.
https://codeberg.org/DW0RKiN/M4_FORTH/s ... aster/Game
PS: I'm not sure, but I have a feeling that when displaying, only the blue color for ink is turned on, otherwise it turns black.
Z80 Forth compiler (ZX Spectrum 48kb): https://codeberg.org/DW0RKiN/M4_FORTH
Re: Game of Life sizecoding contest
Back in time I remember at least two versions exists.
For example: https://vtrd.in/full_ver/LIFEGAME.ZIP
Re: Game of Life sizecoding contest
I ordered some extra autorcopies of my book "81 1K hires games for the ZX18" so I can sent a signed book as a prize.
- ParadigmShifter
- Manic Miner
- Posts: 785
- Joined: Sat Sep 09, 2023 4:55 am
Re: Game of Life sizecoding contest
Surely you will win though?
- MustardTiger
- Microbot
- Posts: 130
- Joined: Tue May 02, 2023 8:05 pm
Re: Game of Life sizecoding contest
Is the competition still open? I forgot to send in my entry.
Re: Game of Life sizecoding contest
@MustardTiger
sorry for the late reply.
Although officially closed I will allow you to sent in the program this week
due to your question in february.
sorry for the late reply.
Although officially closed I will allow you to sent in the program this week
due to your question in february.
- MustardTiger
- Microbot
- Posts: 130
- Joined: Tue May 02, 2023 8:05 pm
Re: Game of Life sizecoding contest
Thanks Dr Beep, I'll send it through tonight.
Re: Game of Life sizecoding contest
WE HAVE A WINNER!!!!!
This is a short announcement first. I am working on a full reply but.....
The response was low..... 2 entries in the contest.
TOM DALBY is the winner with a version in 166 bytes
Peter Featherstone is second with a version in 333 bytes , so double the size.
Tom's version comes close to my own version of 148 bytes, although with Tom's editor I could take off a few bytes more.
So congratulatiosn to TOM!
TOM, i will sent you a signed copy of my book..... however you may make a choice.
Book 1: 81 hires games on the ZX81 ( a book with ideas and pictures of the games, NO CODING)
Book 2: My latest 1K coding book for the ZX81 ( I still need to order my own copies for this)
Johan "Dr Beep" Koelman
This is a short announcement first. I am working on a full reply but.....
The response was low..... 2 entries in the contest.
TOM DALBY is the winner with a version in 166 bytes
Peter Featherstone is second with a version in 333 bytes , so double the size.
Tom's version comes close to my own version of 148 bytes, although with Tom's editor I could take off a few bytes more.
So congratulatiosn to TOM!
TOM, i will sent you a signed copy of my book..... however you may make a choice.
Book 1: 81 hires games on the ZX81 ( a book with ideas and pictures of the games, NO CODING)
Book 2: My latest 1K coding book for the ZX81 ( I still need to order my own copies for this)
Johan "Dr Beep" Koelman
Re: Game of Life sizecoding contest
AwesomeDr beep wrote: ↑Fri Apr 05, 2024 7:34 pm WE HAVE A WINNER!!!!!
This is a short announcement first. I am working on a full reply but.....
The response was low..... 2 entries in the contest.
TOM DALBY is the winner with a version in 166 bytes
Peter Featherstone is second with a version in 333 bytes , so double the size.
Tom's version comes close to my own version of 148 bytes, although with Tom's editor I could take off a few bytes more.
So congratulatiosn to TOM!
TOM, i will sent you a signed copy of my book..... however you may make a choice.
Book 1: 81 hires games on the ZX81 ( a book with ideas and pictures of the games, NO CODING)
Book 2: My latest 1K coding book for the ZX81 ( I still need to order my own copies for this)
Johan "Dr Beep" Koelman
Really enjoyed the compo and getting the last byte out of my code but never thought I would win. I actually got an extra 3 bytes off my 166 version but never submitted it so glad the 2nd person didn't come in at 164bytes. Didn't get anywhere close to your 148byte version though, will be interested to see how you managed it.
Would love a copy of Book 2 once you get hold of it.
Cheers
Tom
Retro enthusiast and author of Flynn's Adventure in Bombland, The Order of Mazes & Maze Death Rally-X. Check them out at http://tomdalby.com
- MustardTiger
- Microbot
- Posts: 130
- Joined: Tue May 02, 2023 8:05 pm
Re: Game of Life sizecoding contest
Congratulations Tom.
I'm looking forward to seeing how you and dr beep got your code size so low.
I'm looking forward to seeing how you and dr beep got your code size so low.