The Elemental Battles tutorial is gamified to take you through the process of creating your own fully-functional blockchain-based application. Each section is structured to provide new concepts, as well as how to include them in existing code.
LESSON 1: Smart Contract and Frontend Setup
In this lesson, you are introduced to two of the most important components of any blockchain application: smart contracts and the frontend intergration. At the end of the lesson, you’ll have created the necessary directory structure and files to start developing an EOSIO Blockchain App.
LESSON 2: Storing State and Login
By utilizing a _login_ action, you will learn how to store player information in a smart contract. From here, we can begin building the frontend and adding the _login_ page. At the end of the lesson, a player will be able to log in and proceed to the first screen in the game.
LESSON 3: Reading State from the Blockchain
As data has now entered the blockchain via frontend-based transactions, you will now turn your sights to fetching data from the blockchain. At the center of this objective, you will learn to use an RPC call (_get_table_rows_), passing in parameters that enable the game to show a _PlayerProfile_.
LESSON 4: Elemental Battles Core
In this lesson, you will work directly with the gameplay elements of Elemental Battles. The central objective of this lesson is to make your first move within the game by working with actions _startgame_ and _playcard_.
LESSON 5: Integrating AI
All classic battle games require an opponent. In this lesson, we will create one. By building the strategies of our AI, the AI will be able to randomly select strategies that are strong enough to make Elemental Battles playable. This lesson will walk you through AI strategies and teach you how to integrate them.
LESSON 6: Playing a Round and Elemental Compatibility
During this lesson, we will introduce the smart contract functions that enable battles between the player and the AI to resolve. By the end, your game will be able to automatically calculate damage based upon card-attack points, types and elemental compatibility (Fire, Wood, and Water).
LESSON 7: Building the Game Flow
The focus of this lesson is to begin weaving the gameplay elements into a larger game flow. The primary objective is to add in the mechanisms for multiple rounds, winning/losing conditions, etc. – the essence of a full game. At the end of this lesson, you will have a complete smart contract for your Elemental Battles game.
LESSON 8: Wrapping Up the Game
Welcome to the final lesson! In this tutorial, we will wrap up the game development with a focus on dialogue, progress indications and front-end tweaks.
Once you’ve completed the tutorials and successfully built your own blockchain-based game, you can progress your EOSIO learning by visiting the EOSIO developer portal.