Inspiration
The very idea behind our new project is to create a decentralized and thus fully autonomous gaming experience for our investors and customers. A game that only needs to be launched to be played, without any influence by or hindrance through ourselves or any other centralised agent. Once deployed the entire system functions autonomously: a form of decentralised autonomous gaming or “DAG”. The game runs and remains on-chain and therefore needs no and has no graphical user interface (GUI). This means that we as developers have no influence on it whatsoever. Neither the developers nor any other outside force can intervene in any way. The game belongs entirely to the players. In order to receive rewards you will have to play the game. This includes the developers who are also forced to play the game in case they want to receive any rewards. By doing so we want to create an independent community of gamers in constant interaction with each other without anybody else’s say-so. A game by players for players.
What it does
We plan to create a turn based game in which players are to interact with each other through their respective wallet addresses by throwing snowballs at each other. Users toss snowballs (NFTs) at other users (addresses). An address that has been “hit” by a snowball automatically mints a snowball of the same level. Snowballs have a chance of containing a stone. When an address is hit with a stone it cannot toss snowballs for a specified amount of blocks. Once a snowball has been thrown at a specific number of different addresses (currently 1 + level) a snowball of level + 1 gets randomly minted to an address from the set {user, “hit” addresses}. Once a snowball of max level has been minted the round ends. Once a snowball of max level would be minted the round ends. Payout uses an Escrow Contract that is created and funded when the round ends, the player that threw the snowball to end the round gets a small boost to their winnings. Players have to pull their winnings from this contract (or the main one). By creating this game we want to establish a community with a focus on interaction between players. The most important aspect of this project is the fact that, once deployed, the entire game runs completely autonomously, thus giving the concept the name of decentralised autonomous gaming or “DAG”. Noone – not even the developers themselves – is able to exert any influence on this process. Only the players involved hold power over the game and only the players can receive rewards. The game remains on-chain and requires no GUI. The entire experience belongs to the players alone and no one else.

How we built it
While creating our game we have made sure to keep our eye on older projects and to learn from both their mistakes as well as the things they succeeded in. We have developed our game using an agile approach and used a combination of Hardhat, Solidity and TypeScript. Part of our development process was writing unit and integration tests, for that we made extensive use of hardhat. We use the Akash Blockchain to host our frontend, that means the only centralized service that is required is a Proxy for SSL termination, as Akash currently only supports the Kubernetes Ingress fake certificate.
Challenges we ran into
During development we ran into four noteworthy challenges. One of these was to create ERC721 based events with a turn based token – something ERC721 was, in fact, not built for. Another issue we ran into was the calculation of individual payouts: gas fees are not to correlate with the number of (active) players, but rather be based on the individual activity of the respective player. We were able to reconstruct the payout calculation so as to make sure that everybody pays exclusively for their own gas fees. Furthermore, the scalability of more than a thousand snowballs (token) was a hurdle to be dealt with. We were able to conduct a gas-optimisation in order to make sure that the algorithms involved did not correlate with the amount of token available or only did so in a very limited capacity. Lastly, we were also focused on reducing gas fees in order to ensure that our project is as inclusive as possible and does not deter potential players from getting involved by exceedingly large gas fees.
Accomplishments that we're proud of
We have managed to create a turn based ERC721 token despite ERC721 never having been built for that very purpose. We were also able to test and simulate several turns of our game successfully using a script. We are proud to have developed our most complex and extensive Smart Contract to date.
What we learned
From our efforts in creating this game we have learned how to utilize a Hardhat node and ethereal as local node explorer. We have also been able to successfully test and simulate interactions within the smart contract. Furthermore, we now know how to conduct a smart contract debugging with Hardhat. What's next for Schneeballschlacht There are several steps that lie ahead in our development process. Firstly, we will configure parameters for our decentralized autonomous gaming concept, including timeout, cooldown, maxlevel, fees for minting (“throwing”) as well as payouts. We also plan to limit access to the game to valid addresses only. This includes the requirement that for example the address in question contains an „f”. We are going to conduct research regarding the Diamond Pattern for Storage/Logic and increase the efficiency of payout allocations within the game, as well.
Built With
- akash
- evmos
- hardhat
- ipfs
- node.js
- pinata
- solidity
- typescript
Log in or sign up for Devpost to join the conversation.