Development for this game has been halted
π΄ --- Not done
π’ --- Done
π --- Half way done
π΅ --- Getting close to finishing
π£ --- Error or major issue present
β« --- Probably impossible to do or most likely going to change
----------------------------------- CAIRO CONTRACTS (Last full code clean up and commenting 25/06/22) ALL TO REDO --------------------------------------
Test token for pay transactions: 0x03e41c33cfb4081c8a40f08bc61d7b62396485587415b967e1dc295a156d03e9
CONTRACT 1: SKIRMISH MAIN CONTRACT
Main contract of the game
Status | Tested | Function | Type | Description |
---|---|---|---|---|
π’ | π’ | SetTokenAddress | @external | Set the token address to be payed with |
π’ | π’ | SetFee | @external | Set the fee the contract takes when the game ends |
π’ | π’ | SetSNSCost | @external | Set the cost to make an SNS, times by 10**18 |
π’ | π’ | SetSNS | @external | Set the SNS of the calling address |
π’ | π΄ | WithdrawToken | @external | Withdraw tokens from the contract |
π’ | π΄ | GameLobbyStart | @external | Function called on the start of the lobby by the "host". pays wager into contract |
π’ | π΄ | GameLobbyJoin | @external | Function called by the joiner. pays wager into contract |
π’ | π΄ | GameOutcome | @external | Action depending on outcome of the game |
π’ | π’ | GetSNSFromAddress | @view | Given an SNS(felt) return the holder's address. Return 0 if not held |
π’ | π’ | GetAddressFromSNS | @view | Given an Address return the SNS associated. Return 0 if available |
π’ | π’ | GetAcceptedTokenAddress | @view | Return the Address of the ERC20 token accepted for payments |
π’ | π’ | GetSNSCost | @view | Get the cost of setting an SNS. divide by 10**18 |
π’ | π΄ | SeeBalanceOfContract | @view | Get the current balance of the contract (possibly will be deleted in future) |
π’ | π΄ | GameLobbyView | @view | Given a RoomCode of a current game (felt) return the address of the two players and the wager |
π’ | π΄ | GetServerStatus | @view | |
π’ | π΄ | SetServerStatus | @external | |
π΄ | π΄ | GetClientGameManager | @view | |
π΄ | π΄ | SetClientGameManager | @external |
Most current deployed test contract: --------
CONTRACT 2: TALK TO REALMS NFT
Status | Tested | Function | Type | Description |
---|---|---|---|---|
π΄ | π΄ | GetAllRealmsOfAnAddress | @view | |
π΄ | π΄ | GetAllTroopsOfARealm | @view |
Contract used to get the data from the realms NFT to the game, data like the Realms available and the troops inside and the adventurers available Just needs to be implemented into the realms repo
CONTRACT 3: DATABASE ACCOUNT TROOPS
Status | Tested | Function | Type | Description |
---|---|---|---|---|
π’ | π’ | SetDeckData | @external | |
π’ | π’ | GetDeckData | @view |
Contract used as onchain database, when the player decideds its team it will be saved on the chain
Additional Notes:
Need to add all of the owner stuff and the asserts
Look into Account abstraction
Look into events look into changing states of the games straight from cairo instead of doing something from the server cli
LOOK INTO SNARKS INSTEAD OF THE CURRENT WAY OF WINNING THE GAME (most likely STARKs)
Find ways to start to transition the server into the chain
add the possibility (in conjuction with unity) to get back into lobby by looking at the address might need another storage var
Possibility of breaking down the contract
__________________________________________
Other usefull links related to this project:
https://github.com/jrkosinski/crypto-champ
https://github.com/jrkosinski/crypto-champ/blob/master/sports-bets/contracts/SportsBets.sol
https://medium.com/visionary-hub/building-a-sport-betting-dapp-d5f1048ba524
GitHub - iden3/snarkjs: zkSNARK implementation in JavaScript & WASM
iden3 | Circom
----------------------------------- REACT BACKEND (Last full code clean up and commenting 24/06/22)----------------------------------------
Progress | Task | Notes |
---|---|---|
π’ | Implement Unity and be able to call functions | |
β« | Full screen on Unity startup | web.Js doesnt allow calls to make applications full screen |
π’ | Send transaction updates | |
π’ | Send address data on connect | |
π£ | Block game if the wallet is not connected or account is switched | contacted devs and they have opened a ticket |
π’ | Connect argent wallet | |
π£β« | Connect braavos wallet | this is broken and probably wont be implemented in the final stage |
π£ | Disconnect wallet voluntarily | contacted devs and they have opened a ticket |
π΅ | Turn array from cairo to json to be sent to unity for troops | |
π’ | Handle view functions | |
π’ | Handle uint256 values | |
π’ | Add token to wallet via code | |
π’ | Add Util script | |
π’ | Add encryption and decryption | |
π’ | Multicall for the deckDataSet | |
π | Add contract 1 | |
π΄ | Add contract 2 | |
π΅ | Add contract 3 | |
π | On contract 1 deduct fee for the contract to keep | |
π΄ | Deploy Website somewhere |
Additional Notes:
Open issue on the starknet react github for the braavos wallet
implement the starknet ID or look into it
Other usefull links related to this project:
----------------------------------- UNITY PROJECT (Last full code clean up and commenting 25/06/22) ----------------------------------------
Progress | Task | Notes |
---|---|---|
β« | Autoconnect on game startup if server is available | the first scene will be used as a landing page for the game/website so no autoconnect |
π΅ | Offline scene finished | |
π’ | Receive address data on connect | |
π | change from the playerprefs or put ifend regions int he code | the way that saved data is stored in between scenes is not a permanent way, if anything use react backend to store data inbetween scenes |
π΅ | Main util script to be accessed from everywhere | |
π’ | Check if two of the same players exist in the server if so kick | |
π | Implement keys used for encryption | |
****** | ****** | ****** |
π’ | Host game menu section | |
π’ | join game menu section | |
π΅ | Deck building menu section | |
π’ | Loading menu section | |
π’ | Setting menu section | |
π | Contract view menu section | this menu is a mess |
π’ | Receive transaction updates | |
π΅ | Finish the menu UI | check the contract menu and have the final UI in place |
π’ | Show all availabe games | |
π’ | Basics of matchmaking and player made lobbies | |
π’ | Webhook to discord to be used as a database | |
π | Send webhooks to discord on starting lobby and joining lobby | all implemented in the Util script, just need to set up the lobby the correct way |
π’ | Pop up error UI | |
π’ | Sorting algos for the various menus | |
π΄ | Basic all roudn progression checks | example: the player is able to join a lobby without selecting a team, should not be allowed |
****** | ****** | ****** |
π’ | Basics of RealmsUI | |
π’ | Basics of troopsUI | |
π | Basics of adventurerUI | |
π΅ | Tooltip on hover over units and realms | core logic is done just needs to be implemented everywhere |
π’ | Able to select the realms by looking for their ID | |
π΅ | Player is able to make its team and save it to be then used in game | if the player goes back into the deckmenu there are errors, probably issues with references |
π΄ | Receive data from NFT | |
π΄ | Lobby exists until the original host goes | |
π΅ | Write data to Database account troops contract | |
β« | Implement a resource folder so every prefab is available there in conjunction with the generalUtil script | |
****** | ****** | ****** |
π΅ | function to update the player ont he server side with the client side data | use the specific targetRPC example to improve on the efficiency of the server calls |
π΄ | divide the game into different states/rounds | |
π’ | Fix the names so they show in the lobby | |
π | Connect the skirmish main contract to the game | |
β« | Only allowed to start the game after both players are ready | |
π΅ | Turn based functionality setup | there but not implemented with the card placing |
π΅ | Once the game starts send data to server so both clients can communicate | this is implemented but for now only works with a button, should be called at the start of the scene |
π΅ | Once a player places a card replicate action on the other client | cards do appear on the other client but issue thrown, something along the lines of missing reference and its not turn based yet |
π΅ | Prohibit client from interacting with the other client's card | should be implemented but not tested |
π | Add basic game score mechanic | score mechanic is there but for some reason only works on the first call, probable issue with the detection of child objects |
π | Add basic server checks in the middle of moves to validate moves | previous states of the deck and possible cards are all stored in the turnmanager, just need to call it to compare so no "added" cards via exploits are possible |
π΄ | Before the start of the game check the deck is valid | same as above ^^^^^^^^^^^^^^^^^^^ |
π΄ | Deal with the outcome of the match | there are no turns states implemented yet |
π | Deal with instances from either players disconnecting early or server failure | |
π΄ | Deploy mock server on AWS |
Additional Notes:
Other usefull links related to this project: