A high-stakes, tactical multiplayer memory game built for the modern web.
Memory Wars is not your typical card-matching game. It's a strategic battleground where memory meets tactical abilities. Compete against a friend in real-time or challenge the Cortex AI Engine in a race to clear the board using energy-charged power-ups.
Accumulate energy by making matches and unleash devastating abilities:
- Radar Pulse (40 Energy): Briefly reveal the entire board to spot hidden pairs.
- Scramble (60 Energy): Reshuffle all unmatched cards on the board to disrupt your opponent's memory.
- Ghost Eye (30 Energy): Permanently reveal a random hidden card for yourself.
- EMP Shield: (In Development) Block your opponent's ability to match cards for a turn.
- Room System: Create a private battleground with a unique 4-character code.
- Instant Sync: Every flip, match, and power-up usage is broadcasted instantly via Socket.io.
- Authoritative Server: The central server manages turns, validates moves, and prevents cheating.
- Turn Management: Integrated "Referee" logic ensures players follow turn sequences and handles timeouts (15s).
- Cross-Device Synchronization: Action relay and authoritative state management keep all players in sync, even with varying connection speeds.
- Cross-Device: Play seamlessly on mobile, tablet, or desktop.
Challenge a sophisticated AI with multiple difficulty levels. The AI doesn't just match cards—it strategically uses power-ups to gain the upper hand when you're winning!
- 3D Card Mechanics: Realistic card flips and tactile interactions.
- Multiple Themes: Switch between Space, Tech, Food, and Animals themes.
- Responsive Grid: The game board automatically adapts to any screen size without scrolling.
- Node.js (v16+)
- npm or yarn
git clone <your-repo-url>
cd memory-wars
npm installCreate a .env.local in the root:
VITE_SOCKET_URL=http://localhost:3001Run Backend:
cd server
npm install
npm startRun Frontend:
# In the root directory
npm run devThe server is Docker-ready. To deploy the backend:
-
Build and Push Image:
gcloud builds submit --tag gcr.io/[PROJECT_ID]/memory-wars-server ./server
-
Deploy to Cloud Run:
gcloud run deploy memory-wars-server --image gcr.io/[PROJECT_ID]/memory-wars-server --platform managed --allow-unauthenticated
-
Build the Project:
npm run build
-
Deploy: Upload the contents of the
distfolder to your favorite static hosting provider. -
Note: Ensure
VITE_SOCKET_URLis set to your deployed backend.
Want to host your game online for $0/month? Follow this 5-minute setup using the industry's best free tiers.
- Create a free account on Render.com.
- Click New + → Web Service.
- Connect your GitHub repository.
- Settings:
- Root Directory:
server - Build Command:
npm install - Start Command:
npm start - Instance Type:
Free
- Root Directory:
- Once deployed, copy your service URL (e.g.,
https://memory-wars-api.onrender.com).
- Create a free account on Vercel.com.
- Click Add New → Project and import your repository.
- Framework Preset:
Vite. - Important Environment Variable:
- Add a variable named
VITE_SOCKET_URLand set its value to your Render URL from the previous step.
- Add a variable named
- Click Deploy.
- Frontend: React 18+, TypeScript, Tailwind CSS, Vite.
- Backend: Node.js, Express, Socket.io.
- State Management: Custom React Hooks & Reducers.
- Icons: AI-Generated Custom Assets.
Developed with ❤️ for Memory Masters everywhere.