Home

Awesome

Underdark

Losing our mind in the Underdark, a generative, on-chain 3D skin-crawler for the Dojo Game Jam #2.

   __  __     __   __     _____     ______     ______   
  /\ \/\ \   /\ "-.\ \   /\  __-.  /\  ___\   /\  == \  
  \ \ \_\ \  \ \ \-.  \  \ \ \/\ \ \ \  __\   \ \  __<  
   \ \_____\  \ \_\\"\_\  \ \____-  \ \_____\  \ \_\ \_\
    \/_____/   \/_/ \/_/   \/____/   \/_____/   \/_/ /_/
       _____     ______     ______     __  __           
      /\  __-.  /\  __ \   /\  == \   /\ \/ /     scoheth      
      \ \ \/\ \ \ \  __ \  \ \  __<   \ \  _"-.    shobro     
       \ \____-  \ \_\ \_\  \ \_\ \_\  \ \_\ \_\    blubble    
        \/____/   \/_/\/_/   \/_/ /_/   \/_/\/_/     quackir   
  
         ,----------------------------------------------------.         
        (_\                                                    \        
           \       Something ill under  Kurnkornor stirs,       \       
            \       down those crumbling old manor stairs,       \      
             \       dark tar that claws and sucks the light,     \     
              \       a   ghastly   duck  no-one   can  fight,     \    
               \       yet  all  in  life  and  death  be  fair,    \   
                \       there's gold  and treasure  buried there.    \  
               _|                                                     | 
              (_/_________________________(*)_________________________/ 
                                          | |                           
                                          ) )            _            
                                          ^%'          >(~)____/             
                                                        (``~~~/     
                ".....had a nightmare about the Slenderduck last night"
                -- gabe | cartridge                                       

Dripping from the walls, and tangled in your hair, The dark tar saps your lightΒ and strength, 'tis everywhere. Beware the fading light, and your fraying sanity. Treading those dark, tangled halls, oh vanity! Find the treasure, find the key, find stairs to deeper hubris. Most of all, beware the terrible gibbering of Slenderin Duckeris.

Team

Resources

Game Loop

flowchart TD
    MANOR["🏰 Enter the Manor 🏰"] --> |connect wallet + deposit fee| ROOM_SELECT

    ROOM_SELECT["Select Room"] --> ROOM_VIEW
    ROOM_VIEW["View Room data + levels"] --> START_LEVEL

    START_LEVEL["Start Level #1"] --> LEVEL_EXISTS
    START_LEVEL --> LEVEL_NEW

    LEVEL_EXISTS["Level exists, minted"] --> PLAY_GAME
    LEVEL_NEW(("Generate Level<br>⛓️")) --> |mint level + pay gas| PLAY_GAME

    PLAY_GAME["πŸ”₯ Play Game πŸ”₯"] --> DIED
    PLAY_GAME --> FOUND_EXIT

    DIED["πŸ¦† DIED πŸ¦†"] --> PLAY_GAME

    FOUND_EXIT["πŸšͺ Found the Exit πŸšͺ"] --> |gameplay proof| VERIFY_PROOF

    VERIFY_PROOF(("Verify Gameplay<br>⛓️")) --> VERIFIED
    VERIFY_PROOF --> |bug or cheater| VERIFIED_NOT

    VERIFIED_NOT["🚫 Not Verified 🚫"] --> PLAY_GAME
    VERIFIED["πŸ‘ Verified πŸ‘"] --> |update scores + pay gas| NEXT_NEW
    VERIFIED --> NEXT_EXISTS

    NEXT_EXISTS["Next Level exists"] --> PLAY_GAME
    NEXT_NEW(("Generate Next<br>⛓️")) --> |mint level + pay gas| PLAY_GAME

Environment Setup πŸ”—

Install Rust + Cargo + others

# Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# open new terminal to update PATH
rustup override set stable
rustup update

# Install Cargo
curl --proto '=https' --tlsv1.2 -sSf https://docs.swmansion.com/scarb/install.sh | sh

# other stuff you might need
cargo install toml-cli
brew install protobuf

Install the Cairo 1.0 extension for Visual Studio Code

Install Dojo πŸ”—

Using Dojo 0.5.1

curl -L https://install.dojoengine.org | bash
# open new terminal to update PATH
dojoup -v 0.5.1

# test dojo
cd dojo
sozo build
sozo test

# install packages
cd ../client
npm install

Launch Dojo

Terminal 1: Katana (local node)

cd dojo
katana --disable-fee --invoke-max-steps 10000000

# or just...
cd dojo
./run_katana

Terminal 2: Torii (indexer)

Uncomment the world_address parameter in dojo/Scarb.toml then:

cd dojo
torii --world 0x6400412d8083e10058277920b8a4a81338727912bc3435e5413f168221e73c7

# or just...
cd dojo
./run_torii

Terminal 3: Client

cd client
npm install && npm run dev

# or just...
cd dojo
./run_client

Terminal 4: Sozo commands

# build world and systems
cd dojo
sozo build

# migrate to local Katana
cd dojo
./migrate

Browser

Open http://localhost:3000/

Splash Screen

The splash screen code needed to be deployed as separately due to time constraints. The code can be found in this GitHub Repository