Unity 6 LTS + C#
One shared Android and iPhone project, built with IL2CPP. URP 2D renders the mature pixel-art characters, enemies, structures, effects, combat, and interface.

Chapter 05
A Unity mobile game for Android and iPhone renders NFTerra above the native Google map. A server-authoritative .NET world validates location and gameplay, PostGIS understands geography, and an EVM asset rail records currency and successfully minted items.
The local .NET economy connects frozen mint terms, inventory reservations, funded Copper and one saved outcome. It consumes the disclosed inputs and returns the exact charge to the project treasury. Versioned generation preserves the sealed base's level while minter skills influence bounded statistics and names. Generated equipment still awaits blockchain confirmation and cannot equip.
A separate local exchange now moves whole sealed bases and ordinary stacks between two inventories. Items keep their identity and level through return sales. Merchant-skill fees stay fixed before consent; settlement pays the seller and treasury exactly once. The received item remains locked until an explicitly simulated receipt is verified. Encrypted PostgreSQL state, permanent identity guards, audit, outbox and simulated inbox recover together across restarts, duplicate requests and failed writes.
New domain components keep an item's immutable source separate from its current owner and quantity. Combined tests transfer a sealed base, release its simulated receipt and resolve buyer-owned mint inputs while preserving the original level and hidden source. Positive material remainders stay tradeable, and consumed identities cannot return. Recovery checks the original genesis against actual inventory histories. Joining these components with one funded currency ledger and durable shared settlement is the next integration step.
A separate device-key foundation now verifies one-use signed actions for two preregistered test characters. A fresh signature can retrieve the original receipt without repeating the action. Current key activity, expiry and revocation are checked before private access. Encrypted history, permanent identity claims and audit records recover together across concurrent processes and crashes. These test signatures grant no mint, trade or wallet authority; player enrollment and native mobile keys remain separate work.
Exact Copper arithmetic and local contracts enforce three decimals and the one-billion-token ceiling. A local wallet proof generates an address and signs currency transfers; item contracts restrict NFTs to approved internal settlement. These fixtures have no value. Player enrollment, signed economic consent, a shared funded mint-and-trade coordinator, actual custody, public receipt publication, chain reconciliation, marketplace and DAO integration remain ahead.
The Android emulator has booted and reached the local API. Unity gameplay still requires a licensed APK build and physical-device verification; Android/iOS cross-play remains a requirement awaiting implementation. The Yasa-owned Cloud project has billing disabled and no hosted game service. Rewards and content come after the underlying systems.
Read completed work and next stepsAndroid and iPhone cross-play
Android and iOS players are intended to share worlds, the economy, marketplace, guilds, and DAO systems. One Unity client connects to the same authoritative services, with native maps and phone features on each platform. Android is the first build target; cross-play still requires verification on both platforms.
One shared Android and iPhone project, built with IL2CPP. URP 2D renders the mature pixel-art characters, enemies, structures, effects, combat, and interface.
The native bridge hosts Maps SDK for Android, Fused Location Provider, Play Integrity, permissions, lifecycle events, and secure platform storage.
The iOS bridge hosts Maps SDK for iOS, Core Location, App Attest, permissions, lifecycle events, Keychain access, and App Store integration.
Versioned Unity Addressables deliver original game art and content separately from Google map data, allowing safe content updates without copying map tiles.
Each native Maps SDK renders a styled Google map underneath a transparent Unity game layer. A small C# adapter sends camera, bounds, gesture, and marker commands to Kotlin on Android or Swift on iPhone. Google attribution and required controls remain visible.
The buildable system
This is the selected first-playable topology. The phone presents and requests; the authoritative game service validates and commits; the blockchain receives only approved asset operations.
Selected components
These choices are concrete enough to build against while remaining isolated behind adapters where a vendor or network may need to change later.
| Concern | Selected technology | Job in NFTerra |
|---|---|---|
| Mobile game | Unity 6 LTS, C#, IL2CPP, URP 2D | Shared Android/iPhone gameplay, mature pixel-art rendering, UI, animation, audio, and content loading. |
| Real-world map | Native Google Maps SDK for Android and iOS | Styled streets, land, water, labels, camera, gestures, attribution, and geographic context beneath Unity. |
| Device location | Android Fused Location Provider; Apple Core Location | Fresh location, timestamp, accuracy, speed, heading, permission, and reduced-accuracy state for server evaluation. |
| App integrity | Google Play Integrity; Apple App Attest | Add device and genuine-app risk signals to high-value actions without pretending attestation proves physical presence. |
| Game backend | ASP.NET Core 10 LTS, C#, SignalR | Authenticated commands, authoritative gameplay, live world updates, marketplace flows, mint jobs, and reconciliation. |
| World database | PostgreSQL 17 + PostGIS | Players, skills, items, transactions, encounters, settlements, spatial cells, distance queries, and audit records. |
| Live coordination | Redis / Google Cloud Memorystore | Session presence, rate limits, distributed locks, hot geo-cache, and realtime fan-out between service instances. |
| Cloud runtime | Google Cloud Run, Cloud SQL, Cloud Storage, Cloud CDN | Container hosting, managed relational data, Addressables delivery, autoscaling, TLS, backups, and regional deployment. |
| Blockchain | Polygon PoS, Solidity, OpenZeppelin | Low-cost EVM settlement for the NFTerra ERC-20 currency and ERC-721 identity of successfully minted equipment. |
| Player wallet | thirdweb Unity SDK v6 + ERC-4337 smart account | Embedded onboarding, signed transactions, sponsored gas, recovery-capable accounts, and an adapter to external EVM wallets. |
| Delivery and operations | GitHub Actions, Terraform, OpenTelemetry, Google Cloud Operations | Repeatable environments, tested builds, infrastructure review, traces, metrics, logs, alerts, and incident evidence. |
Google currently lists native mobile Maps SDK usage with unlimited no-cost usage, but still requires a billed Cloud project and restricted API keys. Places, Routes, geocoding, Street View, and tile products have separate quotas and prices, so they are excluded until a feature and cost review approves them.
Location gameplay
The native location services supply observations. Only the authoritative game server decides whether a movement, encounter, resource, conquest action, or partner hotspot is valid.
Request foreground location only when the player enters map gameplay and explain why precise location improves the experience.
Collect a fresh Android fused-location or iOS Core Location observation with time, accuracy, speed, and heading.
Attach session, nonce, action, recent movement history, and available Play Integrity or App Attest evidence.
Reject stale, replayed, impossible, low-confidence, rate-limited, unsafe, or policy-ineligible requests.
PostGIS checks spatial cells, distance, region, encounter rules, territory, venue bounds, and server-controlled availability.
The server records one accepted result and returns only the nearby world state the player is allowed to see.
Location is read while the map game is open. Background collection would add battery, safety, store-policy, consent, and privacy scope before it proves any necessary player value.

Currency, NFTs, and wallet
NFTerra targets Polygon PoS because it is EVM-compatible, supports established token and NFT standards, and allows lower-cost transactions with sponsored-gas onboarding.
Your inventory is your wallet
Currency, minted equipment, sealed bases, consumables, quest items, and stacks such as arrows belong in one inventory. Currency can move to compatible external wallets. Minted NFTs represent actual game items and stay inside NFTerra, where players can use and trade them under the game rules.
| State | Canonical authority | Public? |
|---|---|---|
| Position, movement, combat, skills, drops, quests, territory, and buildings | ASP.NET authoritative game world | No |
| Sealed bases, resources, conventional items, and service work orders | PostgreSQL game and exchange ledgers | Ownership no; minimized trade proof where approved |
| NFTerra currency ownership | Polygon ERC-20 contract after confirmed settlement | Yes |
| Successfully minted item ownership | Polygon ERC-721 contract after confirmed settlement | Yes |
| Player signing authority | Player smart account and approved recovery policy; game access uses a separate cryptographic device registration | Address and transactions only; device identity stays private |
| Project treasury and issuance | Isolated multi-party treasury control plane | Balances and disclosures as required |
Primary engineering references
These official references are the current basis for the selected stack; versions, pricing, terms, and store requirements must be rechecked before each release.
LTS and supported-release policy for the shared Android and iOS game engine.
Current Maps SDK, Dynamic Maps, tiles, Places, Routes, and other SKU pricing.
Android fused-location guidance; iPhone uses Apple Core Location and App Attest.
EVM compatibility, finality, execution, Ethereum checkpoints, and network architecture.
Next chapter
Continue to the cooperative organization layer for shared assets, contracts, escrow, member rights, voting, and town operations—or return to the economy that gives those systems utility.