A pixel-art survival game built on Arc Network where players dodge enemies in on-chain dungeons, spend USDC to unlock harder levels, and compete for seasonal prize pool rewards.
Play now: arcescape.vercel.app
- Connect your wallet and switch to Arc Testnet
- Pick a dungeon (the first one is free, others require keys + entry fees)
- Survive as long as you can - dodge enemies, rack up your score
- Your run is registered on-chain and scores hit the seasonal leaderboard
- Top 3 players at season end split the USDC prize pool (50/30/20)
- Smart Contracts - Solidity 0.8.30, Foundry, OpenZeppelin v5
- Frontend - Phaser.js 3.80 game engine, ethers.js 5.7, vanilla JS
- Network - Arc Testnet (Chain ID 5042002) - EVM L1 by Circle with native USDC gas
- Hosting - Vercel
| Contract | Address |
|---|---|
| GameItems (ERC-1155) | 0xdD11dBF186738565037fF90Ae02FbD2fcaC8A52B |
| GameShop | 0x5Ceb5bBa1E5C87929f6291321733bdA02B7c5830 |
| ArcDungeons | 0xf9FD51fE97b601f93F4857d1a40884530cbB15E5 |
Runs use a 2-step commit-reveal flow to prevent score manipulation:
startRun()registers the run on-chain before gameplay beginscompleteDungeonRun()validates against the start timestamp- Minimum run duration (30s) prevents instant score submissions
- Score capped at 100 points/second of elapsed time
- 5-minute cooldown between runs
- 50 runs max per season per player
arc-dungeons/
contracts/
src/
GameItems.sol # ERC-1155 items (potions, keys, gear)
GameShop.sol # USDC marketplace with bundles & discounts
ArcDungeons.sol # Core game: dungeons, runs, leaderboard, rewards
test/
ArcDungeons.t.sol # 32 tests including anti-bot coverage
script/
Deploy.s.sol
RedeployDungeons.s.sol
frontend/
index.html
css/style.css
js/
app.js # UI wiring & navigation
blockchain.js # Wallet, contract interactions
config.js # Chain config, contract addresses, item metadata
game.js # Phaser game engine & GameManager
shop.js # In-game shop UI
cd contracts
forge build
forge test -vvvexport PRIVATE_KEY=<your-deployer-key>
forge script script/Deploy.s.sol:Deploy \
--rpc-url https://rpc.testnet.arc.network \
--broadcast --slowServe frontend/ with any static file server, or deploy to Vercel:
cd frontend
npx vercel --prodMIT