Beyond The Fog
A fully on-chain AI-driven narrative RPG built natively on the 0G Mainnet. Every NPC conversation is AI-generated, every game state is anchored to 0G decentralized storage, and every item
Videos
Description
Beyond The Fog
An AI-native mystery world where conversation becomes gameplay, identity becomes an evolving iNFT, and on-chain value becomes part of the player journey.
Beyond The Fog is a narrative mystery game built around three ideas:
AI should create live play, not static flavor text
Player identity should persist as an on-chain intelligent asset
Game outcomes should connect to real economic behavior through 0G infrastructure
Instead of sending players through a fixed quest tree, Beyond The Fog drops them into a living village wrapped in fog, secrets, and suspicion. The player must talk, infer, collect, decide, and finally accuse. Every run becomes a different social puzzle. Every villager interaction can change the pace of discovery. Every key player action can tie back to assets, state, and rewards.
This repository contains the full product stack:
a Next.js + Phaser game client
a FastAPI orchestration backend
a Foundry-based smart contract system
an iNFT identity layer
a 0G-integrated storage and execution design
The project was originally developed around 0G network flows and is written here in a mainnet-ready product framing. Where the current codebase still reflects testnet-era addresses or environment assumptions, this README describes the intended production architecture and launch posture rather than locking the product story to a temporary deployment stage.
NEXT_PUBLIC_GAME_ITEMS_ADDRESS=0x02762535d0c005bb95dbcb6e1814dc4e38486a80
NEXT_PUBLIC_USER_REGISTRY_ADDRESS=0xe36bbfc7767cb6ea98a6fe072dccd80f499d02c2
NEXT_PUBLIC_STAKING_MANAGER_ADDRESS=0x4134c9eb31097693f79c16ef69e12006f68d0daa
NEXT_PUBLIC_NARRATIVE_INFT_ADDRESS=0xb7d1af8bda86bde064ee7842cc4a6bd201a8461a
NEXT_PUBLIC_TRADE_MANAGER_ADDRESS=0xafbc3f2b0b47275e0d8d483da19d0ecd3bbd81f5
Demo Vedio: https://drive.google.com/drive/folders/1N3jH3Ri-HMPmneRdzWkz6qvGhr4a-NiJ
Backend Link: https://celestix.onrender.com/
Frontend Link: https://celestix-tau.vercel.app/
GitHub Link: https://github.com/Aaditya1273/Celestix
Introduction
Most Web3 games fail in one of two ways:
they are technically on-chain but not meaningfully fun
they are visually interesting but use blockchain only as decoration
Beyond The Fog is designed to avoid both failures.
The game loop is built around deduction, trust, memory, and consequence. Players arrive in a village where something is wrong. People know pieces of the truth, but no one reveals everything immediately. Progress depends on how well the player reads the social environment, interprets clues, manages risk, and acts before the mystery collapses.
What makes the system different is that the gameplay stack is not isolated from the economy stack:
villager dialogue is AI-generated and session-aware
dialogue history can be persisted through 0G-backed flows
items exist as on-chain assets
player identity is represented as an evolving iNFT
stakes, rewards, and tradeability can be linked to actual player outcomes
This creates a product with stronger retention hooks than a normal puzzle game:
players return because runs feel different
players collect because items are assets
players care because identity evolves
players speculate because outcomes can be economically meaningful
In short, Beyond The Fog is built as a playable mystery economy, not just a game scene wrapped around a wallet button.
Game Information
Core premise
The player wakes inside a fog-covered settlement with incomplete context and a clear objective: uncover what happened, identify the correct hidden location, and solve the run before misinformation, bad judgment, or poor relationship management ruins the outcome.
What the player actually does
explores a village environment
speaks with AI-powered NPCs
collects clues distributed across characters and interactions
obtains item NFTs that can support progression or status
manages trust and familiarity with villagers
forms a theory about the hidden truth
locks in a final guess
receives a result tied to game logic and on-chain systems
Design Pillars
1. Social deduction over menu clicking
This is not a game where players only spam buttons until a quest marker updates. The player has to think about motive, sequence, emotional tone, and missing information.
2. AI as a system, not a gimmick
Dialogue exists to drive uncertainty, pacing, and replayability. The AI layer is there to generate variation and behavioral texture, not to fill the screen with generic text.
3. On-chain identity with meaning
The iNFT layer is not just a profile picture wrapper. It is intended to become the persistent player identity that reflects progression, memory, achievements, and future utility.
4. Economy tied to outcomes
The game supports an ecosystem where rewards, stakes, collectibles, upgrades, and market activity can all emerge from actual play rather than arbitrary token emissions.
Player Fantasy
Beyond The Fog sells a specific fantasy:
You are not grinding mobs. You are entering a suspicious settlement, reading people under pressure, uncovering a buried truth, and turning intelligence into advantage.
That positioning matters because it helps the project stand out in both gaming and Web3 categories.
Why This Game Can Be Profitable
1. Replayability increases session value
Games become expensive when new content must be authored line-by-line for every future session. Beyond The Fog reduces that burden by using AI-generated conversational variance and system-level clue distribution. That means:
the same world can generate many play sessions
content freshness does not require fully rewriting every run
player curiosity has a direct retention loop
Higher replayability generally improves:
session count per wallet
time spent per player
collectible attachment
conversion into paid, staked, or premium modes
2. iNFT identity creates long-term player retention
Most casual games reset player value every time the player leaves. Beyond The Fog can keep identity persistent through the iNFT layer. If the player's avatar evolves across runs, seasons, ranks, items, and story achievements, then the player has a reason to return beyond one mystery clear.
That supports monetizable behavior such as:
premium identity upgrades
prestige evolution paths
status-linked cosmetics
access-gated events
secondary-market demand for rare evolved states
3. On-chain items are naturally monetizable
GameItems can move beyond pure utility and support:
limited seasonal drops
clue-tier utility items
collectible sets
marketplace trading
tournament reward distribution
This turns inventory from a closed database mechanic into a more durable economic layer.
4. Stakes and payouts create competitive engagement
When players can enter higher-risk modes, attention rises. Even a simple stake-and-resolve structure changes the emotional texture of play. Solving a mystery matters more when a player has real value on the line.
Used carefully, this supports:
higher-value sessions
leaderboard seriousness
repeat competitive attempts
creator-driven community events
tournament formats
5. 0G gives the infrastructure story real weight
The value proposition is stronger when the project can say:
player-linked state is not purely local
important records can be persisted through 0G-backed flows
asset logic is compatible with a broader decentralized economy
the architecture is built for larger network participation rather than isolated demo logic
That narrative matters for:
ecosystem grants
launch partnerships
infrastructure alignment
long-horizon community trust
6. This is not only a game, it is a framework
The strongest business case may not be just one game title. Beyond The Fog can also become the blueprint for:
AI-native village mysteries
multi-chapter narrative seasons
creator-authored story modules
branded mystery events
iNFT-driven identity ecosystems
If the architecture is generalized, the project becomes more than a single product. It becomes an expandable content and economy engine.
How To Play
Step 1. Enter the world
The player launches the client, connects a wallet, and enters the landing experience. From there, they transition into the narrative game flow.
Step 2. Establish identity
The player can mint or use an avatar identity represented through the iNFT layer. This identity is designed to become the player's persistent on-chain presence in the game ecosystem.
Step 3. Start a new mystery run
A new session is created by the backend. The game issues a session token and builds the current mystery state, including villagers, inaccessible locations, and hidden truth conditions.
Step 4. Investigate the village
The player explores and interacts with villagers. Each NPC conversation can reveal:
trust signals
direct clues
partial contradictions
item opportunities
social resistance
misdirection
Step 5. Collect assets and evidence
As the run progresses, players may mint or earn item NFTs connected to the game logic. These items create a stronger bond between progression and ownership.
Step 6. Build a theory
The game is not about hearing one magic line. The player has to synthesize multiple clues and decide which interpretation is correct.
Step 7. Make the final guess
The player chooses the target location or resolution path. The backend validates the result and resolves the session.
Step 8. Resolve value
Depending on the game mode and future mainnet configuration, the outcome can feed into:
ranking
item progression
reward handling
stake resolution
avatar evolution
persistent narrative state
Step 9. Persist the run
Important dialogue or metadata flows can be anchored through the 0G-integrated architecture so the player journey becomes part of a larger persistent system rather than disposable app state.
Product Flow

How The System Works
High-level workflow

Main Components
Frontend
The frontend is built in Next.js and renders the playable experience through Phaser scenes. It handles:
wallet connection
player interaction flow
scene transitions
session persistence in browser storage
calls to backend gameplay APIs
contract interactions for items and identity
Backend
The backend is the orchestration layer. It handles:
session creation
authentication through session tokens
AI dialogue generation
prompt sanitization
rate limiting
reward and settlement logic
dialogue persistence
0G upload flows
metadata generation and avatar update support
Contracts
The smart contract layer exists to make progression economically and socially durable. The repo includes contracts for:
user registry
item NFTs
staking and settlement
iNFT avatar logic
trading flows
iNFT ArchitectureThe iNFT system is one of the most important parts of the product story.
The idea is simple:
the player should not only own a static token; the player should own an intelligent, evolving identity asset.
Why iNFT matters here
it gives continuity across sessions
it can hold metadata linked to progression
it can become a prestige layer
it creates stronger emotional attachment than disposable save data
it opens the door to future interoperability, agent behavior, and personalized progression systems

Full Architecture
Progress During Hackathon
<p>Deployed To Mainnet</p>
Tech Stack
Fundraising Status
<p>NA</p>