On Chain Summer 2024 hackathon project (incomplete).
The idea for this project is a 'crafting-while-falling' gameplay experience where crafting happens on-chain.
Here's some AI-generated concepts for sprite sheets
The crafting tree is somewhat represented below. Check out /hardhat/contracts/Jetsam.sol
to see the current WIP (incomplete).
- not every hosted node can keep up w/ block syncs every 60s
- re: pflow.xyz generated code - TODO: re-think templates w/ Libraries to support larger state machines
- pg_cron + pg_net from supabase postgres node worked out well, auto-syncing db every 1m
- generating the Golang data types from .Sol makes interfacing w/ on-chain metamodels much easier
- ^ Same for TS-chain usage w/ hardhat to get contract types
The Actual game implementation in phaser.js is completely missing.
During hackathon -- work was done mostly on DB syncing w/ chain and smart contract model for crafting.
- make pflow.xyz generate better solidity for larger model definitions
- refine the DB sync useage to process meaningful data from contract event logs
- actually build the game
- refine existing sample smarrt contract to support storing state-per-addess