BeamNG.Earth
A 1:1 scale streamed Earth for BeamNG.drive: real elevation and satellite imagery, floating origin, LOD streaming from a companion server
翻譯準備中
尚未偵測到更新。GitHub 發布版本後會顯示在這裡。
個人 GitHub 帳號下公開儲存庫的擁有者可以登入並驗證所有權,自行管理介紹,無需管理員核准。
登入並產生驗證檔案,在 30 分鐘內將其提交至此儲存庫的預設分支。其他分支或分叉儲存庫中的檔案無效。然後在下方檢查檔案,即可無需管理員核准直接管理專案。請保留檔案以維持管理權限。
如需登入,將前往登入頁面。登入後請回到此處,再次點擊所選的驗證按鈕。
在專案資料夾中執行 /nomorevibe verify,即可驗證所有權並自行管理介紹。
一分鐘完成驗證multiplayer chess game
翻譯準備中
取自儲存庫 README
正在載入完整 README。 以下為已儲存的摘錄。
A modern, mobile-friendly two-player online chess game built with Next.js (App Router).
Two people log in with a shared password, each claim a color from their own device, and
play in near-real-time. Game state is persisted server-side so it survives refreshes,
new devices, and Vercel's stateless serverless functions.檢視完整 README ↗A modern, mobile-friendly two-player online chess game built with Next.js (App Router). Two people log in with a shared password, each claim a color from their own device, and play in near-real-time. Game state is persisted server-side so it survives refreshes, new devices, and Vercel's stateless serverless functions.
chess.js, validated server-side so no illegal moves are possible.npm install
cp .env.example .env.local # then edit the values
npm run dev
Open http://localhost:3000. A .env.local with a dev password is already included
(GAME_PASSWORD=letmein). With no Redis credentials set, the app uses in-memory storage —
perfect for local testing (state resets when the dev server restarts).
To play a real 2-player game locally, open the app in two different browsers (or one normal
| Variable | Purpose |
|---|---|
GAME_PASSWORD | The single shared password both players type to enter. |
SESSION_SECRET | Long random string used to sign the auth cookie. |
| Edge Config | |
EDGE_CONFIG | Read connection string, auto-injected when you connect an Edge Config store. Read-only. |
VERCEL_API_TOKEN | Vercel API token (Account → Settings → Tokens) — required for writes, since Edge Config writes go through the Vercel REST API. |
VERCEL_TEAM_ID | Only if the Edge Config store belongs to a Vercel team. |
| or Redis / KV | |
KV_REST_API_URL / KV_REST_API_TOKEN | Redis REST credentials (Vercel KV). UPSTASH_REDIS_REST_URL / UPSTASH_REDIS_REST_TOKEN also work. |
The backend is chosen automatically: Edge Config if EDGE_CONFIG is present, else Redis if the KV/Upstash vars are present, else in-memory.
Generate a session secret:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
EDGE_CONFIG).
Then create a Vercel API token (Account → Settings → Tokens) and add it as
VERCEL_API_TOKEN so the app can write moves. Add VERCEL_TEAM_ID too if the store
lives under a team.KV_REST_API_URL / KV_REST_API_TOKEN).Without any store the app still runs, but in-memory state resets on cold start — fine for a demo, not for real games.
GAME_PASSWORD and SESSION_SECRET under Settings → Environment Variables.Edge Config notes: it's read-optimized (ideal for the polling reads) and writes are rate-limited, but a turn-based game only writes on a move / seat claim / reset, so the write volume is tiny. Writes propagate globally within a second or two, so an opponent sees your move on their next poll. Because Edge Config is eventually consistent (a read just after a write can briefly return the previous version), each game state carries a strictly-increasing
updatedAt, and the client ignores any polled state older than the one it already shows — so the board never regresses (e.g. flips back to a finished game right after "New game"). If you want snappier, strongly-consistent sync, switch to Vercel KV / Upstash Redis by setting theKV_*env vars instead; no code changes needed.
middleware.ts gates / and /api/game behind the signed auth cookie.lib/game.ts holds the single source of truth. Every move is re-validated against the
stored FEN with chess.js; the server enforces turn order and seat ownership.chess_client id used to bind it to the White or Black seat.GET /api/game every 1.5s and re-renders on change.A seat is bound to the browser that claimed it (via an httpOnly cookie). If a player clears
their cookies they'll rejoin as a spectator; use New game or clear the Redis key
(chess:game:main) to free the seats.