This project is inspired by Loren Carpenter's collaborative pong experiment. A social experiment to show the power of the masses empowered by machines without a central coordinator.
What it does
It seeks to demonstrate a use of the Mutable Resource Update feature of development Swarm, which allows for updating of swarm data under a predictable pointer name, without resorting to ENS.
How does it (suppose to) work
New games and the participants are recorded on a contract, and two teams are formed.
When the game loop starts (after a grace period after contract creation), every participant has one "vote" per second on whether the paddle should go up, down or remain in place.
The votes are submitted in individual Mutable Resource Update streams, which are then retrieved by the client and rendered directly.
The player area has identical pixel sizes and paddle/ball velocities.
Thus, given that all updates can be retrieved without network issues, the game should be able to run identically on every client.
The Mutable Resources are stored as normal data on swarm, chunked up and distributed. In other words, totally decentralized.
How I built it
Plays pong where every move is in swarm and the game itself in a contract on ropsten testnetwork
Works for us with firefox. Chrome seems to have trouble.
- Mike Calvanese @mikec
- Jiří Chadima @JirkaChadima
- Deniel Horvatic @FollowJack
- Louis Holbrook @nolash
- Augusto Lemble @AugustoL
(those are gitter handles)
- Contract: 0x957a63a9c458c5c40b84e558a7d0b279871be622 (ropsten)
- Application: http://126.96.36.199:8500/bzz:/crowdpongeth.test
- Code: https://github.com/nolash/crowdpongeth
- Swarm: http://swarm-gateways.net/bzz:/theswarm.eth
- MRU: https://github.com/ethersphere/go-ethereum/pull/881
Challenges I ran into
Working on platform code not even fully reviewed and merged.
Accomplishments that I'm proud of
Actually seeing that paddle move for the first time
What I learned
swarm, web3, solidity, react, CORS etc etc...
What's next for crowdpongeth
For you to play it (Q = up, A = down)
Then play a game with 1000 peers