Rakshit.sol
Back to Projects

SimCity Solana

A 3D city-building simulation on Solana using MagicBlock Ephemeral Rollups for high-speed, gas-free gameplay.

SolanaEphemeral RollupsReactThree.jsRust
Play Demo Video

A fully functional 3D city-building simulation game that runs on the Solana blockchain, utilizing MagicBlock Ephemeral Rollups for high-speed, gas-free gameplay.

Architecture

The project follows a hybrid architecture where the Client handles the rich, visual simulation, while the Blockchain (Ephemeral Rollup) enforces the authoritative state and settlement.

  • Frontend (Web): Built with React and Three.js, responsible for the 3D visualization and simulation logic.
  • Ephemeral Rollup (MagicBlock): Runs the Rust-based Smart Contract for high-frequency interactions (place_building, bulldoze).
  • Solana Mainnet: Serves as the settlement layer where the final city state is persisted.

Game Mechanics

  • Simulation Loop: Power distribution, zone growth, and traffic simulation.
  • Zoning: Residential, Commercial, and Industrial zones with unique growth requirements.
  • Power Grid: BFS-based power propagation logic.
  • Vehicle System: Real-time traffic visualization and commute impact calculation.

Tech Stack

  • Frontend: React 19, Vite, Three.js, TailwindCSS
  • Blockchain: Solana, Anchor Framework, MagicBlock SDK
  • Language: TypeScript, Rust