chenchujian/skull-king
0
Skull King Web Game (骷髅王网页版)
A multiplayer trick-taking card game built with React, Node.js, and Socket.io.
🎮 Game Rules
Skull King is a trick-taking game where players bid on how many tricks they will win each round.
- Suits: Parrot (Green), Map (Purple), Treasure (Yellow). Numbered 1-14.
- Trump: Jolly Roger (Black). Beats all suits.
- Special Cards:
- Escape: Value 0. Usually loses.
- Pirate: Beats all suits and Jolly Roger.
- Skull King: Beats everything EXCEPT Mermaid.
- Mermaid: Beats all suits and Jolly Roger. Beats Skull King if played in same trick.
- Tigress: Can be played as Escape or Pirate.
🛠 Tech Stack
- Frontend: React, Vite, Tailwind CSS, Zustand
- Backend: Node.js, Express, Socket.io
- Language: TypeScript
🚀 Development Setup
- Install Dependencies:
npm install
npm run install:all- Start Development Server:
npm run dev- Client: http://localhost:5173
- Server: http://localhost:3001
📦 Deployment Guide
This project is set up as a Monorepo, which makes it easy to deploy on Render.com as a Web Service.
Option 1: Deploy as Monorepo (Recommended)
- Create a new Web Service on Render.
- Connect your GitHub repository.
- Configure Settings:
- Name:
skull-king-game - Environment:
Node - Build Command:
npm install && npm run build(This builds both client and server) - Start Command:
npm start - Root Directory:
.(default)
- Environment Variables:
NODE_ENV:productionPORT:10000(Render default)
Option 2: Deploy Client and Server Separately
Server (Web Service):
- Root Directory:
server - Build Command:
npm install && npm run build - Start Command:
npm start
Client (Static Site):
- Root Directory:
client - Build Command:
npm install && npm run build - Publish Directory:
dist - Environment Variable:
VITE_SOCKET_URL=https://your-server-url.onrender.com
📝 TODOs & Future Improvements
- [ ] Implement proper Tigress card selection (Escape vs Pirate).
- [ ] Add bonus points (Pirate capture, etc.).
- [ ] Improve UI animations for card playing.
- [ ] Add chat functionality.
