Web3GameNftPolygonSolidityTypescriptJavascriptAwsTerraformAlchemy

invaders.sampleweb3.dev

A Space-Invaders-style web game enhanced with web3: customize your ship with NFTs and trade items on a built-in marketplace. Runs on Polygon Amoy testnet.

Overview

WEB3 INVADERS is a retro shooter built for the Alchemy University Ethereum Bootcamp. It plays like classic Space Invaders, then layers in on-chain items and a simple marketplace.

Wallet & network: use a wallet on Polygon Amoy Testnet. The game is best on a desktop/laptop (not optimized for small screens).

Features

  • Playable Space-Invaders-style game with 3 levels.
  • Customize your spaceship and projectiles via NFTs.
  • In-game marketplace with a custom smart contract to buy/sell items.

Security disclaimer & improvements

  • This is a fun/learning project and needs hardening before real-world use.
  • On-chain functions are permissive: leveling and item ownership can be spoofed without stricter checks.
  • Code readability, TypeScript types, and unit tests to be improved.

Credits

Tech stack

TypeScriptJavaScriptSolidityViteEthers.jsOpenZeppelinHardhatAWSS3CloudFrontTerraform

Architecture overview

Navigation tips

  • Wheel to zoom. Cursor stays on the same point.
  • Drag (left or middle mouse) to pan.
  • Double-click to zoom in at the cursor.
  • Shift + Double-click to zoom out.
  • Keyboard: +/ zoom, 0 fit, 1 1:1, arrow keys to pan.