ethereum-optimism / ecosystem-contributions

Find ways to contribute to the Optimism Collective
MIT License
303 stars 120 forks source link

🧪 Mad Science Project Idea: Conway's Game of Life Onchain #42

Open smartcontracts opened 1 year ago

smartcontracts commented 1 year ago

What is an Mad Science Project Idea?

A Mad Science Project Idea is an idea for a project within the Optimism ecosystem that may not have clear value but is generally cool as heck. Mad Science Project Ideas make great hackathon projects and tend to be a great way to explore Optimism, OP Mainnet, and the OP Stack.


Summary

Conway's Game of Life is a classic cellular automaton with straightforward rules. It should be possible to implement the Game of Life in a smart contract either on OP Mainnet or on a custom OP Stack chain. Can you make it happen?

The Game of Life is a tick-based simulation. At each tick, a new system state is computed and the simulation updates. Consider using the mechanism introduced by Ticking Optimism to create an OP Stack chain that automatically triggers an update function whenever a new L2 block is produced. This would make the simulation update in real time without the need for transactions to update the simulation state.

Possible Features

ferrodri commented 1 year ago

We will take on this one

therealbytes commented 1 year ago

I believe ticking-conway already does all of these

philliprossii7 commented 9 months ago

What is an Mad Science Project Idea?

A Mad Science Project Idea is an idea for a project within the Optimism ecosystem that may not have clear value but is generally cool as heck. Mad Science Project Ideas make great hackathon projects and tend to be a great way to explore Optimism, OP Mainnet, and the OP Stack.

Summary

Conway's Game of Life is a classic cellular automaton with straightforward rules. It should be possible to implement the Game of Life in a smart contract either on OP Mainnet or on a custom OP Stack chain. Can you make it happen?

The Game of Life is a tick-based simulation. At each tick, a new system state is computed and the simulation updates. Consider using the mechanism introduced by Ticking Optimism to create an OP Stack chain that automatically triggers an update function whenever a new L2 block is produced. This would make the simulation update in real time without the need for transactions to update the simulation state.

Possible Features

  • Allow users to spin up their own Game of Life system on chain
  • Allow users to initialize the Game of Life board with a starting state
  • Allow users to start the simulation by sending a transaction
  • Allow users to see the simulation progress with each tick
  • Allow users to pause the simulation or reset it to start over