Demo Game - ajuna-network/Polkadot.Unity.SDK GitHub Wiki
Date: 7th November, Kick-Off Meeting
Project Informations
Description
- Project Name: Hexalem
- Initial Kickof: 7th November 2023
- Project Type: Multiplayer Mobile Fully On-chain Blockchain Game
- Genre: Strategy / Godgame
- Platform: Android & iOS
Logo
Introduction
Hexalem is a multiplayer strategy game built on a hexagonal grid, designed to leverage the transparency and immutability of blockchain technology. At its core, the game is a strategic contest where players, acting as deities overseeing their realms, manage resources on a personal 5x5 grid to grow their civilization and harness the mystical energy known as Mana.
Players begin with a central home tile, expanding their territory by strategically placing and upgrading tiles that represent various biomes—each with distinct resource implications. The resources—Mana, Humans, Water, Food, Wood, Stone, and Gold—are not just game mechanics but are integral to the game’s economic system and player progression.
The blockchain aspect is crucial, as it records each move, ensuring a transparent gameplay history and providing a foundation for a trustless gaming environment. The use of blockchain also opens the door for unique game features such as proof of ownership, traceable in-game assets, and the potential for player-driven economies.
The game’s round-based mechanics allow for thoughtful, turn-by-turn gameplay, where players' actions are sequential rather than concurrent for now. This design choice respects the need for strategic planning and decision-making, which is central to the game's experience. The shared tile selection pool introduces an element of shared fate and competition, as players must anticipate and react to the choices of their opponents.
The current version of Hexalem allows players to engage with their grids, yet future updates are poised to expand the scope of interaction. Players will be able to influence their opponents' boards by utilizing mana to cast spells, potentially disrupting resource production or demolishing elemental structures. These strategic maneuvers are designed to provide a competitive edge and advance players toward their goals.
Hexalem distinguishes itself as a strategy-god game, offering an immersive single-player experience while boasting robust multiplayer functionality. The integration of blockchain technology is not merely an added feature but a core aspect of the game's architecture. It introduces a layer for digital ownership and an unbreakable backend, to host thousands of games, establishing Hexalem as a prime candidate for a mobile game first and a candidate to become a UNity Demo game for the Polkadot Unity SDK. The ambition of Hexalem is to explore and expand the frontiers of strategy gaming through the lens of blockchain innovation.
Game Core Loop: Start, Place Tile, Gain Resources, Upgrade Tile, End Turn, and Repeat
Hackathon Deliverables & Artifacts
- Documentation
- Initial GDD, align the idea on the game design concept and the game core loop.
- MVP, align for the minimal version to achieve
- Backend Specification, align data model for storage, function calls, and grid algorithms.
- Basic UI/UX, align the basic features and experiences for the UI.
- Testing Workflow, align test coverage to achieve, and agree on certain shortcuts, to achieve the timeline.
- Tooling, align tooling to be used for each artifact.
- Buisness Model Ideation
- Backend
- Reference Hexalem Game Engine (C#)
- Hexalem Unit Tests (C#)
- Hexalem/Substrate Integration & Wrapper
- Hexalem/Substrate Integration Tests
- (generated).NET API Hexalem Extension
- (not used)WebAPI, to simulate Blockchain
- Blockchain
- Hexalem Game Engine Pallet (Rust/Substrate)
- Runtime Integration Solo (Rust/Substrate)
- TANSSI Integration Parachain (Rust/Substrate)
- Client
- Additional
- (WIP)AI Simulations, for simulating opponents, and for load testing
Assets from the Unity Asset Store:
Team
- Rostislav Litovkin (https://github.com/RostislavLitovkin)
- Romain Friot (https://github.com/Apolixit)
- Cedric Decoster (https://github.com/darkfriend77)
Project presentation slides
Project Folders
36-Hexalem
docs
(Concept documents, like the Game Design Document and more)src
generated
(Generated artifacts from the metadata of the node)net
(ref. hexalem game engine, integration, ai modules, unit tests)substrate
(pallet hexalem game, in node template)ui
(unity integration project, apk and abb releases)
Architecture Overview
Datamodel & Entities
Backend
Substrate Blockchain
- Pallet Hexalem
- Testing: Localhost
- URL:
ws://127.0.0.1:9944
- URL:
- Production: Tanssi
- URL:
wss://fraa-dancebox-3023-rpc.a.dancebox.tanssi.network/
- URL:
- Testing: Localhost
More info in Substrate node readme.
Frontend Client
Unity Mobile Client
- Unity Client
- Testing:
- Methods: Unity Simulator and Android Live Debug on Device
- Production:
- Google App Store - Internal Testing
- App Store Link
- Testing:
Additional Repository for Tanssi Integration
Demo & Visuals
Screenshots (Samsung S23)
Presentation
Future Features planed
The Lobby Matchmaker
To have proper matchmaking, that queues players looking for a game according to their ranking in different clusters. pallet_matchmaker
The Hidden Agenda (Private Player Goals)
Add multiple target goals and a selection at the beginning of the game that uses the Choose & Reveal concept, to add a small privacy layer.
- Player choose 1 of 5 exposed winning conditions.
- Player hash, the choice with a seed.
- Hash is stored, on chain, seed is kept private on the player client.
- When achieving the game goal, the player can call for the win, by revealing his seed and proving his choice from the begining
- If verified and true, he won the game
- Else the game continues, with the player having exposed his target, and making him easier to combat.
Account/Wallet Creation
To make sure we can add new players and accounts, we need to add the .NET API Wallet project and integrate an onboarding workflow, similar to the one The Big Ballz of Bajun did.
Why Pallet and not EVM
Pallets offer enhanced flexibility and integration, especially in C# environments, by exposing comprehensive metadata like types, calls, events, errors, and constants. This allows seamless interaction with the Substrate blockchain, similar to conventional backend systems. Current advancements aim to reduce latency to around 6 seconds.
Using a pallet as a game engine enables leveraging extensive on-chain functionalities. For instance, pallet_nfts provide on-chain attributes, significantly enhancing NFT utility.
While this flexibility is advantageous, it also brings greater responsibility.