I’ve just enrolled on the premium plan with a view to building Unity games that interact with the Ethereum network or some faster layer 2 solution. My goal is to create skill based games with financial rewards.
Whilst I expect to use the Unity engine to calculate physics simulations etc I want to have the player activity recorded on the blockchain as much as possible so the game feels transparent and trustless.
This is my suggested setup:
Client (player) - opens game > sends request to server to start new instance of game
Authoritative Server (headless mode) - generates a new scene, accepts the player into the scene, check credentials (eth or other balance)
Client (player) - sends tx to contract on blockchain to qualify for game turn
Authoritative Server (headless mode) - acknowledges player status to ‘ready’, sends game level scene to client (player)
Client (player) - loads game scene from server > sends player input back to server
Authoritative Server (headless mode) - receives player input > calculates physics simulation > sends result to client (player) AND sends result to blockchain. Every 24hr period sends out rewards to all prize qualifying players.
In terms of UX speed and tx fees:
Tx fees can be paid for by the developers fund, UX speed will be too slow using ethereum.
So my question is what layer 2 solution can you recommend and can this solution be invisible to the user, ie. they pay with eth but the game uses layer 2 in the background?
Secondly does your course explain how to interact with blockchains from within Unity? I’m aware of the Enjin course but I’m not sure if this can offer the functionality I’ve outlined above?
Many thanks for your thoughts on this subject.