Skip to content

cartridge-gg/enter-the-dojo

Repository files navigation

Enter the Dojo

Welcome to Enter the Dojo, a super simple on-chain game built on Starknet using the Dojo Engine. This project aims to showcase the simplicity and power of Dojo Engine for building on-chain games using ESC (Entity Component System) concepts.

Description

Enter the Dojo is a turn-based 1v1 combat game. Take turns attacking your opponent with different moves, but be careful, each attack deals varying damages and has a potential to miss. Choose your attacks wisely!

Development

Install the Dojo toolchain, make sure to grab version 0.2.2 installation guide

# Install Dojo binaries
dojoup -v 0.2.2

# Start Katana
katana --disable-fee

# cd into contracts dir
cd contracts

# Build the game
sozo build

# Migrate the world, this will declare/deploy contracts to katana,
# update the world address in Scarb.toml
sozo migrate

# Setup some basic authorization between system and components
./scripts/default_auth.sh

# Start torii indexer
torii --world {world_address}

# Start frontend
yarn && yarn dev

How to play

To play the game from the frontend, open up two browsers - one in normal mode and one in incognito mode. Create burner wallets in both windows. Burner wallets are tied to the current browser profile being used thus the reason for two windows. Create a game in one window and in the other window click on Available Games to find that game and join. Now take turns between the two windows to battle!

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published