project screenshot 1
project screenshot 2
project screenshot 3

AI Sentinels

AI Sentinals: Cosmic Clash is a sci-fi digital card game where players build decks of ships, crew, and events to explore the galaxy and battle opponents. Manage energy crystals, unleash powerful combos, and conquer the cosmos in single-player and PvP modes.

AI Sentinels

Created At

ETHOnline 2024

Project Description

AI Sentinels: Cosmic Card Battles Game Overview: AI Sentinels is a single-player digital card game set in space. Players use a small set of AI-generated cards to battle against cosmic monsters. The game showcases the power of on-chain AI for content generation and efficient blockchain transactions. Key Features:

AI-generated space-themed cards with unique attributes Strategic single-player battles against cosmic monsters Efficient on-chain gameplay using Stackr's Micro-Rollup technology Regular updates with new AI-created cards

Detailed Description:

Card Generation (Using Galadriel):

At the start of each game, Galadriel's AI generates 4-5 unique cards Each card represents a spaceship or cosmic entity AI-generated attributes for each card include:

Attack power Defense capability Special abilities

Galadriel also generates a unique image for each card

Card Attributes:

Attack: Determines the damage dealt to monsters Defense: Represents the card's ability to withstand monster attacks Special Ability: A unique power that can turn the tide of battle (e.g., healing, boosting attack, weakening monsters)

Single-Player Gameplay (Using Stackr):

Players face a series of increasingly difficult cosmic monsters Each turn, the player selects one card to use against the monster Stackr's Micro-Rollup SDK handles:

Game state management (player health, monster health, cards in play) Turn sequencing Card-monster interactions and battle calculations Victory/defeat conditions

Monster Battles:

Monsters have their own set of attributes (health, attack power) Players must strategically choose which card to play each turn based on the monster's characteristics The battle continues until either the monster is defeated or all player cards are destroyed

Game Progression:

As players defeat monsters, they advance to face stronger opponents The difficulty increases with each battle, requiring more strategic use of the AI-generated cards

On-Chain Transactions (Using Stackr):

All game actions (card generation, battles, progression) are recorded on-chain Stackr ensures fast, low-cost transactions for a smooth gaming experience

Regular Updates:

Periodically, new card types and monster varieties are added to the game Galadriel generates new card attributes and images for these updates, keeping the game fresh

Leaderboard and Achievements:

Stackr manages a global leaderboard tracking players' progress Achievements for defeating certain monsters or reaching milestones are recorded on-chain

How it's Made

Core Game Logic (Stackr Micro-Rollup):

Implemented the game's core logic using Stackr's Micro-Rollup SDK Created custom state machines for handling player stats, card attributes, and battle mechanics Used Stackr's efficient on-chain storage for player progress and game state Implemented smart contracts for managing game rules and player interactions

AI Card Generation (Galadriel):

Utilized Galadriel's on-chain AI to generate unique card attributes and images Created a custom prompt engineering system to guide the AI in generating balanced and thematic card stats Implemented an image generation pipeline that converts AI-generated descriptions into card artwork

Frontend Application (React and TypeScript):

Developed a responsive web application using React for the game's user interface Utilized TypeScript for type-safe development and improved code maintainability Implemented state management using Redux for handling complex game states Created custom React hooks for interfacing with Stackr and Galadriel services

Game Engine (Godot):

Used Godot engine for creating the game's visual elements and animations Implemented the battle system and card interactions within Godot Created a custom shader for space-themed backgrounds and card effects Utilized Godot's scripting language (GDScript) for game logic that required more complex visual interactions

Integration and Communication:

Developed a custom API layer to facilitate communication between the React frontend, Godot game engine, and blockchain components Implemented WebSocket connections for real-time updates between the game client and the Stackr rollup Created a caching layer to optimize performance and reduce unnecessary blockchain calls

Asset Pipeline:

Developed a custom asset pipeline that takes Galadriel-generated card data and converts it into game-ready assets Implemented an automated system for updating the game with new AI-generated content

background image mobile

Join the mailing list

Get the latest news and updates