Thanks to visit codestin.com
Credit goes to github.com

Skip to content

A multiplayer browser game built with Next.js and Cloudflare Workers using WebSockets and Durable Objects.

Notifications You must be signed in to change notification settings

gishmel/cid-game

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CID Game

A multiplayer browser game built with Next.js and Cloudflare Workers using WebSockets and Durable Objects.

Preview

Folders

  • web/ – Frontend (Next.js app)
  • ws/ – Backend (Cloudflare Worker using Durable Objects)

Setup

1. web/ – Next.js Frontend

cd web
pnpm install

Create a .env file and set the WebSocket URL:

NEXT_PUBLIC_WS_URL=wss://your-cloudflare-worker-url

Run in development:

pnpm dev

Build for production:

pnpm build
pnpm start

2. ws/ – Cloudflare Worker

cd ws
pnpm install

Run locally for development:

pnpm dev

Deploy to Cloudflare:

pnpm run deploy

Game Description

  • The game is themed around CID (Crime Investigation Department).

  • Players are randomly assigned one of the following roles:

    • CID (main detective)
    • Killer
    • Other players are regular participants.
  • The first player to join becomes the admin and gets access to the "Start Game" button.

  • When the game is started, roles are shuffled and assigned.

About

A multiplayer browser game built with Next.js and Cloudflare Workers using WebSockets and Durable Objects.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 74.4%
  • CSS 23.2%
  • JavaScript 2.4%