Skip to content

underware-gg/underdark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

  • Mataleone - Game & Engineering
  • Recipromancer - Renaissance Chaos Mode (& Sound)
  • Mononoke - Art & Website
  • Jubilee - Game Art & 3D
    • Only the dark night follows Jubilee, so that it may collect the glittering baubles he leaves behind

Resources

  • Starter from open-source Loot Underworld current rev (f3b317f) CC0
  • threejs depth texture example by @mattdesl CC0
  • Color reduction and dither shader by whiteshampoo
  • Ordered Dithering (Bayer) shader by *Tech_
  • three.js for graphics
  • tween.js for animation
  • Original art made lovingly by hand by Mononoke, semi-original art made lovingly with AI assistance by recipromancer
  • 3D Assets made by Jubilee
  • Music by recipromancer:
    • Title Track: Biodecay -- Mazzive Injection (Bonus Track) [1999]
    • Ambient: Biodecay -- Down (Depression) [1999]
  • Sound effects built by recipromancer using sounds from freesound.org

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
Loading

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