Pizza Brick: all about developing a Play-to-Earn commercial crypto game with a smart contract on Binance Smart Chain by Avivi
21 September 2023next article
Games are an integral part of the IT world, which is constantly developing, attracts millions of people and operates with billions of capital. Gamedev greedily absorbs almost all innovations and turns them into unique game opportunities. Better lighting, three-dimensional animation, dynamics and the ability to attract players from all over the world — at one time, each of the technologies that allow the implementation of such ideas went through the stages of creation and improvement, so that today they delight fans of virtual games all over the planet. At the same time, new game mechanics play an important role, which also became possible due to the introduction of modern computing technologies. Blockchain was no exception and significantly expanded the functionality of games with various useful options. Of course, this is not about improving visual effects or management — the use of distributed decentralized lists allows you to effectively solve economic issues: both internally in-game and externally related to real finances. This is what attracted the attention of Avivi developers and motivated them to create a new crypto game. And such an opportunity arose: the company received a corresponding order.
Prerequisites for the appearance of Pizza Brick
Play-to-Earn business model games are not as widely popular as action games or shooters, but their target audience is steadily growing at the global level. There are several reasons for this, the main ones being:
Active dissemination of Blockchain technology;
Constant increase in the total number of owners of cryptocurrencies;
Stable demand for alternative entertainment and income solutions.
Of course, only for a small number of users, such games are the main source of income — it's not easy, but true fans of their business can earn more from Play-to-Earn games than top managers of medium-sized companies from their tedious office work. However, there is another side to this situation: cryptocurrency owners are always happy to invest a small part of their crypto portfolio in game currency for the following reasons:
I wonder how much I can win;
I'm interested in playing, but it's impossible for free;
I don't mind setting aside some of my assets for my own entertainment.
Our customer has granted the exclusive right to act at its own discretion regarding key issues of the future project. Therefore, after a detailed analysis of global trends, awareness of the Play-to-Earn business model and monitoring of the 2023 market, Avivi specialists agreed on the idea and format of the future game. It became a combination of experience with smart contracts and Blockchain, marketing activity on the global market and, surprisingly, the generalized preferences of ordinary people. After all, everyone loves pizza, right ;)? The customer approved the proposed concept.
The plot of the crypto-game Pizza Brick
Our game allows you to try on the role of the owner of a chain of pizzerias — small restaurants that delight visitors with tasty and fragrant pizza. The plot is taken directly from life and has no fantastic deviations: the player has his own restaurant, where the main place in production is the stove. It is here that excellent pizza is baked, which is the main object for collection. Each oven has its own characteristics that grow throughout the game: baking speed and volume for storing finished products in a warm form (who needs cold pizza?).
Bricks, the main in-game currency, are required to expand businesses, wet furnaces, and build restaurants. The entire gameplay revolves around the brick: the player exchanges ready-made pizza for a brick, receives it in one-on-one competitions with other restaurateurs, and wins in lotteries. Each restaurant has eight levels of development: from a shabby run-down place to a chic elite establishment, a maximum player can simultaneously own ten buildings of different levels of modernization. For the business to flourish, you need to monitor the filling of the oven, take out ready-made pizzas in a timely manner, plan the expansion of the fast food chain, and also be active in interaction with other players — competitions in the culinary arena and lotteries. Otherwise, it is unlikely that you will be able to become a successful restaurateur and receive a real income. So Pizza Brick players will definitely not have to be bored and will always have something to do in their own account.
Economic component, cryptocurrency
A fairly simple plot, according to the plan of the creators from Avivi, should not distract players from the main economic component. In the game, it looks quite simple and clear:
Bricks can be obtained in the form of passive income from baking pizza or purchased for cryptocurrency;
Collected pizza can be sold for bricks or invested in the development of a restaurant chain;
Additionally, bricks can be obtained from one-on-one competitions or won in the lottery;
Surplus bricks can be withdrawn in the form of cryptocurrency.
The cost of each update is determined in advance and is available in the "Information" section. The player can consult the table at any time and calculate his possibilities. The table can also be found in the PDF manual for the game, which is always freely available.
A unique offer of the game is the sale of the entire game business: a player can sell his restaurant chain to another player and receive +30% of the total check amount as a bonus. This transaction takes place in cryptocurrency only.
One-on-one PvP competition is an integral part of most Play-to-Earn games and is implemented in Pizza Brick as well. This is not a mandatory option, but this is where you can get a lot of extra bricks relatively easily. Avivi specialists have developed a fairly loyal game grid with affordable bets and double profit in case of victory. Therefore, it should be easier for players to dare to challenge each other to a duel and not worry about losing a large number of bricks. The game monitors applications for participation, finds similar ones and automatically starts competitions in case of a match.
However, lotteries are already a unique offer from the authors for the most gambling players. The principle of choosing the winner is purely random, which does not depend on anyone. The player can create his own lottery rooms, where he sets the number of applicants and the bet, or participate in offers from other players. At the same time, you can participate in ten lotteries (your own or someone else's), and the drawing of each takes place automatically when the room is filled with the required number of players.
A good way to earn passive income is to involve friends and acquaintances in the game. Each player receives his own referral link; from new participants registered through him, the player receives 7% of the number of bricks purchased by him and 3% of the pizza. In addition, for every 50 invited participants, the player receives a really generous bonus — +0.5% to his daily income.
And now to the most interesting thing. The Pizza Brick game uses BNB cryptocurrency. To join, simply connect your own wallet to Trust Wallet or Metamask. The game from Avivi is distinguished by a loyal commission: we are interested in popularizing modern games and everything related to Blockchain and WEB 3.0, so we meet caring players from all over the world.
How did we do it?
It's time to look under the hood of Pizza Brick. We will tell you about the technical features and implementation of the project, which in general took about a month of the interesting life of the development team.
One of the important stages was the planning and design, because even the best ideas in game development do not work without an attractive picture. We wanted to make something really good and positive, especially when the plot of the game is tied to your favorite food. The entire color range consists of warm tones, references to autumn landscapes are used. Our creative staff paid a lot of attention to the detailing of the restaurants: eight unique buildings gradually show the progress from an inconspicuous shack to a beautiful expensive establishment. In part, the creation of the visual part of the game was inspired by the unique atmosphere of the legendary City Island series.
Pizza Brick's frontend is built on React.js, one of the best and most powerful solutions for such tasks. At this level, transactions are verified and signed, which are then sent to be stored in the Blockchain.
Most of the necessary operations take place on the backend of the game. This part was created in Python and we talked about the advantages of this programming language in detail in the blog article " Why does Avivi love Python and what is this programming language capable of?" ". The following processes take place on the backend:
Verification of data before forming transactions;
Saving to a centralized user database.
The last component of the Pizza Brick game is a smart contract, which is responsible for all game logic. Written in the Solidity programming language for Binance Smart Chain (BSC), it consists of 531 lines of code and ensures the smooth operation of the entire project. Like everything in Blockchain, the source code of the smart contract is publicly available, and its transparency has been confirmed by two audits by independent experts.
If the developers of Avivi were asked if it was difficult to develop their own new crypto game, each of them would say: "No, it was interesting and even fun." Previous experience in game development prevented many undesirable situations, and impeccable knowledge of all necessary programming languages accelerated the process and gave positive emotions of coordinated teamwork. We hope that Pizza Brick will find new players every day and bring profit to its owner. Meanwhile, the Avivi team does not stand still and is constantly working on new projects for the business.
The concept of development is closely related to the programming language in which it takes place. Different languages are suitable for different tasks, and smart contracts are no exception. Currently, the relevant language for creating smart contracts is and remains Solidity. We use it extensively in Aviva and talk about its features in this article.
In the world of smart contracts and blockchain, the name "Oracle" is often encountered. Of course, we are not talking about some soothsayer, although in the article we mention some real providence. We mainly analyze the issue of hybrid smart contracts, that is, those that use both on-chain and off-chain calculations. And, as always, we make it easy and interesting.
Smart contracts work on blockchain technology, and therefore have all the advantages of this scientific and technical achievement. In this article, we tell you why electronic transactions have almost absolute security and safety, guaranteeing your business stability and prosperity.
We will reach out to within 10 minutes