Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
hallazie committed Dec 3, 2024
1 parent fc736c8 commit b5fe440
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# Getting Started

This is a simple Tetris Demo that applied with a Block Chain (Optimium) based Leaderboard.
This is a simple Tetris Demo that applied with a fully on-chain leaderboard, showcasing the ability to develope Fully on-chain game with Godot Engine, with our custom module https://github.com/qingfengzxr/gdscript-web3 for GDScript.

In this demo, all the score you submit will stored in a OP contract, and holding a global leaderboard of the Tetris game.

The communication with OP network is based on the Godot module https://github.com/qingfengzxr/gdscript-web3

## Login & Logout

You can create a account for the leaderboard by login with Username and your OP PrivateKey.
Expand All @@ -14,8 +12,23 @@ The PrivateKey will only stored at local for communicating with the contract. Yo

## Play

You can play Tetris either you have login or not. You will be able to submit your score to OP contract once you login.
You can play Tetris either you have login or not. Once the current game is finished, you will be able to submit your score to OP contract if you have login.

## Leaderboard

pass
The leaderboard will show top 100 score on the chain, and your personal best score.

# Eth Tool

We use functions in ./Scripts/eth_tool.gd to communicate with block chain.

The contract address is `0x811c5976EACB0A81dB447885F76C81172a782484`

* `func get_top_scores` will call `getTopScores` function in the contract, and return top 100 scores and their usernames respectively.

* `func get_best_score` will call `getBestScore` function in the contract, and return the best score for current login user.

* `func upload_score2` will call `uploadScore` function in the contract (with signed_transaction function), and upload the current score of current user.



0 comments on commit b5fe440

Please sign in to comment.