
Astroblock
The onchain galaxy
About
The problem it solves The Astroblock game through it's onchain map, puts all player actions, movements, and positions fully onchain, turning the game world into a trustless, permissionless layer any contract can build on. This unlocks a new class of composable onchain gameplay, where anyone can deploy contracts that react to where players are in space, what stars they control, or how they move. It makes building persistent, interoperable modules (like loot systems, PvP combat, NPC encounters, staking zones, or exploration quests) safe and easy, without relying on centralised servers or off-chain game logic. Smart Contract Address(es) 0xe9C9B180B465718b611978040F6080Cd3BfdB51a (AstroblockMap Contract) 0xf61aFF7D2DC231aa11e56c3de5e0ADFF999b66d7 (AstroblockLoot Contract) 0x7bc1D45faD40A87642D619029831AC525195f03A (AstroblockStories Contract) Other Onchain Proof ### AstroblockMap Basescan https://basescan.org/address/0xe9c9b180b465718b611978040f6080cd3bfdb51a ### AstroblockLoot Basescan https://basescan.org/address/0xf61aFF7D2DC231aa11e56c3de5e0ADFF999b66d7 ### AstroblockStories Basescan https://basescan.org/address/0x7bc1d45fad40a87642d619029831ac525195f03a ### Activity Dune Dashboard https://dune.com/nezzar/astroblock ### AstroblockMap Opensea https://opensea.io/collection/astroblock-map The map hosts Entities (space objects like starts & wormholes as NFTs) stored in the Map contract itself for now.
How it's made
Challenges we ran into ## Frontend Rendering the Astroblock Map was one of the toughest challenges: players need to seamlessly explore a 10 million by 10 million universe in first-person, flying through space while seeing thousands of stars and entities around them. Creating a pannable, zoomable, and performant map at this scale required aggressive optimization. I implemented spatial chunking, render culling, and memoization to avoid drawing unnecessary objects, while also ensuring the map remained responsive even when new stars or players appeared onchain. Balancing smooth camera controls with accurate first-person positioning was particularly tricky, especially when syncing with onchain player states. ## Smart Contract On the smart contract side, I hit a major hurdle with storage layout during an upgrade. I had appended new properties to a struct that sat at the root of the storage layout, unintentionally shifting all subsequent storage slots and effectively corrupting the state. This caused unexpected behavior and risked breaking the entire map. I managed to recover by carefully rebuilding the storage layout and appending new variables only at the end of available storage slots, following upgradeable contract best practices. ## Cross Platform & Indexing Making the game work across both web and miniapp environments added extra complexity. Input methods, screen constraints, and performance budgets are very different between the two, forcing me to rethink how movement, interaction, and rendering would work across platforms. Additionally, indexing performance became a bottleneck as the number of onchain entities (stars, players, modules) grew. I had to implement and design smarter indexing strategies to avoid overwhelming both the frontend and the backend.