SubRogue: a simple game with tough problems

Something I put together quicker than you can read this! :-)

SubRogue — what did I propose?

Game Summary

  • Rogue-like that connects to a Substrate blockchain.
  • Uses on-chain randomness for procedural generation of maps and spawning of items.
  • Simple mechanics, but complex enough to be an entertaining challenge.
  • Multiple players and games on one chain.
  • Public and verifiable account history that is protected.
  • Provably fair gameplay (prevents cheating).
  • Trade accounts or items with the guarantee of true ownership.

What are the problems with SubRogue (and how to fix them)?

Problem: passive random values can be ignored

Problem: Entire map is revealed at the start

Mock up to help visualise: seeing the whole dungeon means you can plot the safest path ahead of time.

Problem: Random Number Generation

Problem: Generate random numbers at high speed

Problem: brute-force many possible paths with passive randomness

Left: small segments require fast block times. Right: large segments need brute-force protection.
F = H(random_seed|H(player_location|H(block_hash|H(step_number))))
  • Random_seed — this comes from the network and forces this new dungeon segment to be unique. If a player has actively signed a transaction for this number then we can have some faith that the dungeon generation can not be heavily manipulated by the player.
  • Block_hash — this comes from the chain and I figured it forces the calculation to be unique in time, but this may be redundant with the random seed actually (this was probably more useful before when I was still considering passive random numbers).
  • Player_location — is the coordinates of the player when generating the next dungeon segment. This will have multiple possible inputs and will depend upon the path taken, plus how the current dungeon segment was generated (which in turn relies upon the previous segment). While the number of locations is fairly limited, and can be partially predicted ahead of time, I hope that the nesting of parameters within the hash function make it harder to parallise this calculation.
  • Step_number — is a simple count of the number of steps of the player. I hope it adds extra difficulty since if you walk back on yourself you would affect the output of this function. This value will monotonically increase, it increases even if you visit the same square twice.

Final thought…


About me

Questions / Comments?




Blockchain, Gaming, Web 3. (previously:

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

How Tetris is Homophobic, Sexist, and Racist

Networking 101: A Guide for Indie Game Developers

An analysis of the economies situated in virtual worlds.

The World’s First DeFi Simulation DAPP Game!

“Candies in the Snow” post-mortem

5 life lessons playing video games taught me

Challenges These Boardgame Designers Faced | FOURTATO GAMES

Gameplay Journal Entry #8

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Edward A Thomson

Edward A Thomson

Blockchain, Gaming, Web 3. (previously:

More from Medium

Creativity Before vs. Now

How to build up your confidence from a shy student

Believe in yourself is super important! That is confidence.

CS373 Spring 2022: Tanner Dreiling, Week 10

CS373 Spring 2022: John Powers