Creating an algorithm
It's essential to create a unique battling strategy for your gladiator.
Last updated
It's essential to create a unique battling strategy for your gladiator.
Last updated
git clone
run cargo build --release
in vara-arena/contracts directory
find .wasm examples from character / mage / berserk templates in vara-arena/target/wasm32-unknown-unknown/release/
run cargo test
(for all tests) in /contracts/arena directory or only character algorithm test -
cargo test --package arena --test tests -- game --exact --nocapture
make changes to existing templates or create you custom code within lib.rs
customise /arena/tests/tests.rs to upload your custom code
Create a strategy using gstd
(), compile, and upload your .wasm strategy file as a smart-contract onchain.
Find strategy examples in the Arena repository:
Please note that each player (wallet) can own only one gladiator.
Algorithms fight on 1D map by exchanging message onchain.
The initial distance between characters is ten cells.
Total arena map range = 0..15 cells, ie 16. Plater 1 starts at 6, and Player 2 starts at 10.
Pre-requirements: Using gtest before uploading code onchain
Click on the Default strategy dropdown field and click Upload code
Use your Code id
for creating a character
Choose your initial character attributes and proceed by clicking Mint character
Please note that each player (wallet) can own only one gladiator.
Go to
Connect Substrate wallet, and click