{"id":22998386,"url":"https://github.com/tablelandnetwork/example-game-state-polygon","last_synced_at":"2026-05-09T04:32:56.388Z","repository":{"id":104455776,"uuid":"578776794","full_name":"tablelandnetwork/example-game-state-polygon","owner":"tablelandnetwork","description":"A simple multiplayer game example where the game state is stored on Tableland and a dynamic NFT is rendered from that data.","archived":false,"fork":false,"pushed_at":"2023-04-14T23:04:01.000Z","size":36,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-02T13:27:40.624Z","etag":null,"topics":["games","ipfs","nfts","sqlite","tableland"],"latest_commit_sha":null,"homepage":"https://testnets.opensea.io/collection/tableland-game-state-example-v2","language":"Solidity","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tablelandnetwork.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-15T21:23:50.000Z","updated_at":"2023-01-04T01:36:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"76b8ecb9-198b-4360-86e5-69f1e266ec67","html_url":"https://github.com/tablelandnetwork/example-game-state-polygon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tablelandnetwork/example-game-state-polygon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tablelandnetwork%2Fexample-game-state-polygon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tablelandnetwork%2Fexample-game-state-polygon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tablelandnetwork%2Fexample-game-state-polygon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tablelandnetwork%2Fexample-game-state-polygon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tablelandnetwork","download_url":"https://codeload.github.com/tablelandnetwork/example-game-state-polygon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tablelandnetwork%2Fexample-game-state-polygon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32807219,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["games","ipfs","nfts","sqlite","tableland"],"created_at":"2024-12-15T06:13:17.730Z","updated_at":"2026-05-09T04:32:56.374Z","avatar_url":"https://github.com/tablelandnetwork.png","language":"Solidity","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Game state management - a game of hangman\n\nThis is a game of hangman. A user can mint a new game using `safeMint` just like any NFT. Other players can play the NFT using `guessLetter` by submitting a target tokenID and their letter guess. \n\nAll game state and updates are shipped off to a table on Tableland. \n\nThe NFT is built on IFPS and reads that state to render the live game. \n\nYou could also easily build a dapp for viewing leaderboards, open games, etc. \n\n## Gameplay\n\nA user calls `safeMint(addr, \"secret\"). That user (addr) now owns an NFT for the game, awaiting people to guess \"secret\".\n\nA player can now call `guessLetter(tokenId, \"x\"). Because \"x\" is not in \"secret\" one fail will be recorded. If 6 fails are recorded, the game ends and the NFT transfers back to the smart contract. If all the letters of the word of guessed before the game is over, the person submitting the final letter will get the winning NFT.\n\nThe state at each level is pushed to Tableland for rendering, query, search, etc. \n\n## Example deployment (how to play)\n\nhttps://mumbai.polygonscan.com/address/0xb5fa5f64f811df209ef7cc431575870860b29cfb#writeProxyContract\n\nUse `safeMint` and `guessLetter` above to play.\n\n## Example game state table on Tableland (how to view state)\n\nhttps://testnets.opensea.io/assets/mumbai/0x4b48841d4b32c4650e4abc117a03fe8b51f38f68/4448\n\nYou can view the full state of the example deployments below running in the above table. \n\nYou can query that state here,\n\nhttps://testnet.tableland.network/query?s=select%20*%20from%20game_store_80001_4448%20limit%201\n\n## Example NFT (how to visually see the game and game nfts)\n\nhttps://testnets.opensea.io/collection/tableland-game-state-example-v2\n\nYou can see multiple examples of open and completed games. Chose any open ones (white background) to make your own guesses. \n\nView the React app in the /nft folder.\n\n## Develop\n\nYou must have a `.env` file with the following information\n\n```\nPRIVATE_KEY={your wallet key with a balance of matic}\nPOLYGONSCAN_API_KEY={your polyscan api key for pushing the abi}\nPOLYGON_MUMBAI_API_KEY={your alchemy api key for mumbai}\nREPORT_GAS=true\n```\n\n### Install\n\n`npm install`\n\n### Start Tableland locally\n\n`npm run tableland`\n\n### Deploy to local hardhat\n\n`npm run local` or upgrade `npm run localup`\n\n### Deploy to Mumbai\n\n`npm run deploy`\n\n### Update\n\n`npm run update`\n\n## Develop the NFT\n\n`cd nft`\n\n`npm install`\n\n`npm run start`\n\n# Warning\n\nThis example is not maintained.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftablelandnetwork%2Fexample-game-state-polygon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftablelandnetwork%2Fexample-game-state-polygon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftablelandnetwork%2Fexample-game-state-polygon/lists"}