Home

Awesome

<a href="https://twitter.com/lootrealms"> <img src="https://img.shields.io/twitter/follow/lootrealms?style=social"/> </a> <a href="https://twitter.com/BibliothecaDAO"> <img src="https://img.shields.io/twitter/follow/BibliothecaDAO?style=social"/> </a>

discord License: MIT

background

đŸĒĻ Loot Survivor

Go and die with glory

Play Loot Survivor

Table of contents


🕹ī¸ Game Design

Loot Survivor is an onchain Arcade machine game. You add some tokens, try to get the highscore and live for eternity onchain.

Each play through will be different and there is no end to the game. Every level just gets progressively harder.

<details> <summary>Game Statistics</summary> Each level up grants adventurers 1+ upgrade to help them survive their explorations. Although Luck cannot be upgraded directly, it can be increased by equipping jewelry items: </details> <details> <summary>Combat Logic</summary>

There are three categories of weapons and armor materials:

Weapons: Blade, Bludgeon, Magic

Armor materials: Cloth, Hide, Metal

Weapon vs. Armor Efficacy Chart

Weapon TypeMetalHideCloth
BladeWeakFairStrong
BludgeonFairStrongWeak
MagicStrongWeakFair
</details> <details> <summary>Weapons and Materials</summary>

Weapons

The items are based off the OG loot contract

Weapon Types and Ranks

Weapon TypeItem NameRank
BladeKatana1
BladeFalchion2
BladeScimitar3
BladeLong Sword4
BladeShort Sword5
BludgeonWarhammer1
BludgeonQuarterstaff2
BludgeonMaul3
BludgeonMace4
BludgeonClub5
MagicGhost Wand1
MagicGrave Wand2
MagicBone Wand3
MagicWand4
MagicGrimoire1
MagicChronicle2
MagicTome3
MagicBook4

Encounters

</details>

🏗ī¸ Contributing

The game is a work in progress and contributions are greatly appreciated.


⛓ī¸ Technology

Loot Survivor is an onchain game, designed to be immutable and permanently hosted on Starknet. We use advanced gas optimization to reduce costs on Starknet. A player's gamestate exists primarily in a single felt252, every action the player takes only updates a single storage slot.


đŸ–Ĩī¸ Infrastructure

Servers

Goerli


Deploying

Setup Starkli Account

bash scripts/starkli_setup.sh

Deploy Contract

bash scripts/deploy.sh.sh

Run UI

cd ui
yarn dev

Deploy Katana & Run UI

bash scripts/katana/setup.sh

Play

Mint $lords and approve LS to spend

source "/workspaces/loot-survivor/.env"
starkli invoke $LORDS_ADDRESS mint 0x1feb9c05d31b70a1506decf52a809d57493bfcd5cc85d6a3e9fd54a12d64389 1000000000000000000000 0 --account $STARKNET_ACCOUNT --private-key $PRIVATE_KEY
starkli invoke $LORDS_ADDRESS approve $CONTRACT_ADDRESS 1000000000000000000000 0 --account $STARKNET_ACCOUNT --private-key $PRIVATE_KEY

Start New Game

starkli invoke $CONTRACT_ADDRESS new_game 0x020b96923a9e60f63a1829d440a03cf680768cadbc8fe737f71380258817d85b 12 123 0 0 0 --account $STARKNET_ACCOUNT --private-key $PRIVATE_KEY

Explore

starkli invoke $CONTRACT_ADDRESS explore $ADVENTURER_ID 0 --account $STARKNET_ACCOUNT --private-key $PRIVATE_KEY

Attack Starter Beast

starkli invoke $CONTRACT_ADDRESS attack $ADVENTURER_ID 0 --account $STARKNET_ACCOUNT --private-key $PRIVATE_KEY

Upgrade Adventurer

starkli invoke $CONTRACT_ADDRESS upgrade $ADVENTURER_ID 0 $CHARISMA 1 --account $STARKNET_ACCOUNT --private-key $PRIVATE_KEY

View Adventurer Details

Adventurer State
starkli call --watch $CONTRACT_ADDRESS get_adventurer $ADVENTURER_ID 0 --account $STARKNET_ACCOUNT --private-key $PRIVATE_KEY
Get Adventurer Health
starkli call --watch $CONTRACT_ADDRESS get_health $ADVENTURER_ID 0 --account $STARKNET_ACCOUNT --private-key $PRIVATE_KEY
Get Adventurer Gold
starkli call --watch $CONTRACT_ADDRESS get_gold $ADVENTURER_ID 0 --account $STARKNET_ACCOUNT --private-key $PRIVATE_KEY
Get Adventurer XP
starkli call --watch $CONTRACT_ADDRESS get_xp $ADVENTURER_ID 0 --account $STARKNET_ACCOUNT --private-key $PRIVATE_KEY
Get number of stat upgrades available
starkli call --watch $CONTRACT_ADDRESS get_stat_upgrades_available $ADVENTURER_ID 0 --account $STARKNET_ACCOUNT --private-key $PRIVATE_KEY