Game of Life sizecoding contest

The place for codemasters or beginners to talk about programming any language for the Spectrum.
User avatar
MustardTiger
Microbot
Posts: 122
Joined: Tue May 02, 2023 8:05 pm

Re: Game of Life sizecoding contest

Post by MustardTiger »

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. :lol:
_dw
Dizzy
Posts: 90
Joined: Thu Dec 07, 2023 1:52 am

Re: Game of Life sizecoding contest

Post by _dw »

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
Image

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
User avatar
Bedazzle
Manic Miner
Posts: 305
Joined: Sun Mar 24, 2019 9:03 am

Re: Game of Life sizecoding contest

Post by Bedazzle »

Dr beep wrote: Mon Dec 04, 2023 10:30 pm I didn't find a version on the ZX Spectrum so I was thinking
of a sizecoding contest for GAME OF LIFE on the ZX Spectrum
Back in time I remember at least two versions exists.
For example: https://vtrd.in/full_ver/LIFEGAME.ZIP
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: Game of Life sizecoding contest

Post by Dr beep »

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.
User avatar
ParadigmShifter
Manic Miner
Posts: 670
Joined: Sat Sep 09, 2023 4:55 am

Re: Game of Life sizecoding contest

Post by ParadigmShifter »

Surely you will win though? :snowman
flange
Drutt
Posts: 49
Joined: Tue Dec 12, 2023 5:27 pm

Re: Game of Life sizecoding contest

Post by flange »

Dr beep wrote: Fri Dec 15, 2023 5:35 pm 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.
ZX18 !? was this the cut down economy model Clive always wanted? :lol:

Apologies Johan couldn't resist.
User avatar
MustardTiger
Microbot
Posts: 122
Joined: Tue May 02, 2023 8:05 pm

Re: Game of Life sizecoding contest

Post by MustardTiger »

Is the competition still open? I forgot to send in my entry.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: Game of Life sizecoding contest

Post by Dr beep »

@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.
User avatar
MustardTiger
Microbot
Posts: 122
Joined: Tue May 02, 2023 8:05 pm

Re: Game of Life sizecoding contest

Post by MustardTiger »

Thanks Dr Beep, I'll send it through tonight.
Dr beep
Manic Miner
Posts: 381
Joined: Mon Oct 01, 2018 8:53 pm

Re: Game of Life sizecoding contest

Post by Dr beep »

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
User avatar
TomD
Manic Miner
Posts: 379
Joined: Tue Nov 13, 2018 9:47 am
Location: Leeds UK
Contact:

Re: Game of Life sizecoding contest

Post by TomD »

Dr 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
Awesome :-)

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
User avatar
MustardTiger
Microbot
Posts: 122
Joined: Tue May 02, 2023 8:05 pm

Re: Game of Life sizecoding contest

Post by MustardTiger »

Congratulations Tom.
I'm looking forward to seeing how you and dr beep got your code size so low.
Post Reply