project screenshot 1
project screenshot 2
project screenshot 3
project screenshot 4

Starkgo

A Go Game World build with the Dojo Engine - Currently supports 2-player 9x9 games

Starkgo

Created At

StarkHack

Project Description

This project aims to provide a decentralized and universal experience for go players.

At this stage, players can create 9x9 games, choose their color and place stones in turn. Stones are automatically removed when they have no liberties, forbidden moves (including ko) are prevented. Players can pass when they desire, and if both players do so consecutively, the game ends.

The games state and interactions are fully onchain, as a Dojo Engine world deployed on Starknet Sepolia at 0x04bd02570b8aa604b8e8600f5d7a1ed066f31e912efbdfc1c9d6e840a826d0a2 with its systems at 0x028cae7e1119b28fe219659dd83e70a7ed6d5b20f2f026c731c67e9873c3cf05. A frontend is deployed on a demo instance (not Sepolia due to time) available at https://sepolia.starkgo.world.

The frontend allows to switch games in order to play multiple ones at the same time, or observe other games too.

The engine's source code is available at https://github.com/trevis-dev/starkgo and the frontend client's at https://github.com/trevis-dev/starkgo-client

How it's Made

The games state and interactions are fully onchain, as a Dojo Engine world deployed on Starknet Sepolia. It uses the latest versions of Dojo.

What could seem hacky is the encoding of the board as a large number (u256) where . It makes it cheap to store, and not too hard to manipulate, although I'm sure I could work on optimizing that.

The contract doesn't take arguments for other game rules, or other board sizes, but it's not a prevented development either.

I couldn't make a cartridge controller with my android phone so I had to go the long server way to deploy the frontend + katana + torii....

I used the starter codes for both the cairo and react parts (after loosing some time on the phaser one where I couldn't figure out how to use the selected gameId to only render its component and not all games as one is defined dynamically and the other as setup? (no prior experience with it though). There were some quirks I'll be happy to open issues/PR with to try and help too.

background image mobile

Join the mailing list

Get the latest news and updates