什么是康威生命游戏?
What is Conway's Game of Life?
康威生命游戏(Conway's Game of Life)是英国数学家约翰·霍顿·康威于 1970 年发明的细胞自动机。它不是一个可以"赢"的游戏,而是一个零玩家的数学模型——一旦给定初始状态,演化过程完全由规则决定,无需任何输入。
Conway's Game of Life is a cellular automaton devised by mathematician John Horton Conway in 1970. It is a zero-player game: given an initial state, the entire evolution is determined by its rules with no further input.
无限的二维网格上,每个格子处于"存活"或"死亡"两种状态之一。每一代,所有格子同时按以下四条规则更新:
On an infinite two-dimensional grid, each cell is either alive or dead. Each generation, all cells update simultaneously by four rules:
这四条极简规则能产生令人惊叹的复杂行为:稳定结构、振荡器、滑翔机、乃至图灵完备的计算机。这正是"涌现"的魅力——简单规则,无限复杂。
These four minimal rules produce astonishing complexity: stable structures, oscillators, gliders, and even Turing-complete computers. This is the beauty of emergence — simple rules, infinite complexity.
如何使用
How to Use
| ✍️ 创世模式 | ✍️ Draw Mode | 点击或拖拽画布,在网格上放置存活细胞。支持多指同时绘制,松手后整笔细胞一次性上传。你的操作会实时同步给所有在线玩家。 | Click or drag on the canvas to place live cells. Multi-finger drawing is supported; all cells are uploaded at once when you lift. Your actions sync in real time to all connected players. |
| ✋ 漫游模式 | ✋ Pan Mode | 拖拽画布以平移视口,探索无边界的世界。支持双指捏合缩放。 | Drag to pan the viewport and explore the boundless world. Pinch-to-zoom is available in this mode. |
| 🖱️ 快捷平移 | 🖱️ Quick Pan | 鼠标右键或中键拖拽可在任意模式下平移视口,无需切换模式。 | Right-click or middle-click drag pans the viewport in any mode, no need to switch. |
| 🔍 缩放 | 🔍 Zoom | 鼠标滚轮可随时缩放 (任意模式),触屏双指捏合仅在漫游模式下缩放。范围 0.3× ~ 5.0×,以光标/双指中心为锚点。 | Scroll wheel zooms anytime (any mode). Pinch-to-zoom works in Pan mode only. Range 0.3×–5.0×, anchored at cursor / pinch center. |
| 🌙 / ☀️ 主题 | 🌙 / ☀️ Theme | 切换深色 / 浅色界面主题。 | Toggle between dark and light UI theme. |
| 🌐 语言 | 🌐 Language | 切换中文 / 英文界面,设置会被记住。 | Switch between Chinese and English UI. The preference is saved. |
| STATUS | 显示当前视口坐标、活跃细胞数量与在线人数。所有面板均可拖拽移动。 | Shows current viewport coordinates, active cell count, and online players. All panels are draggable. | |
| HISTORY | 记录系统事件与你的操作日志,保留最近 5 条。 | Logs system events and your interaction history. Keeps the 5 most recent entries. | |
| MINIMAP | 全局小地图:自动跟踪细胞群分布,黄色框显示当前视口位置。点击可跳转到对应区域,滚轮/双指可缩放小地图视野。 | Global minimap: auto-tracks cell clusters, yellow box shows current viewport. Click to jump to a location, scroll/pinch to zoom the minimap view. |
🎵 声音引擎(实验性)
🎵 Audio Engine (Experimental)
点击控制面板中的「声音引擎」按钮打开音频面板,开启后游戏世界的细胞活动将被转化为实时生成的环境音景。
Open the Audio Engine panel from the control panel. When enabled, cell activity in the game world is converted into a real-time ambient soundscape.
| 🌊 粉红噪声 / 红噪声 | 🌸 Pink / 🌊 Red Noise | 每个细胞映射到 20Hz–20kHz 频谱中的一个固定频段。大量细胞激活时,密集频段叠加收敛为连续的粉红噪声(等幅)或红噪声(低频更强、更温暖)。 | Each cell maps to a fixed band in the 20 Hz–20 kHz spectrum. When many cells are active, the overlapping bands converge into pink noise (flat amplitude) or red noise (stronger low frequencies, warmer tone). |
| 🌊 环境背景 | 🌊 Ambient Buffer | 播放视口及其周围缓冲区内的所有细胞音符,感受局部生命活动的宏观氛围。 | Plays notes for all cells within the viewport and its surrounding buffer — the ambient pulse of life around you. |
| 📍 当前视口 | 📍 Viewport | 仅播放屏幕可见范围内的细胞,音效随你平移镜头实时变化,探索不同区域会听到完全不同的声景。 | Only cells visible on screen are sonified. The soundscape changes as you pan — each region of the world has its own sonic character. |
| ⏱ 时序打散 | ⏱ Staggered onset | 新生细胞的音符激活在 400ms 区间内随机散布,避免数百个频段同时触发产生冲击噪声。 | New-cell note onsets are randomly spread over a 400 ms window, preventing hundreds of simultaneous triggers from causing transient clipping. |
💡 音量和噪声模式偏好会自动保存,刷新页面后恢复。首次使用须与页面产生交互后(点击任意位置)才能初始化音频上下文,这是浏览器的安全限制。
💡 Volume and noise-type preferences are saved automatically and restored on reload. The audio context requires a user gesture (any tap or click) before it can initialize — this is a browser security requirement.
🎮 单机版
🎮 Solo Mode
不想联网?可以在本地单机版中自由探索康威生命游戏,无需 WebSocket 连接,完全离线可用。
Prefer to play offline? The solo version lets you explore Conway's Game of Life locally with no WebSocket connection required — fully offline-capable.
👉 /solo
👉 /solo
多人机制
Multiplayer
这是一个实时多人共享世界。所有玩家在同一张无限网格上放置细胞,服务端统一计算每一代的演化,结果广播给所有客户端。你的每一笔创作都可能与他人的产生交互,催生意想不到的涌现结构。
This is a shared real-time world. All players place cells on the same infinite grid. The server computes each generation and broadcasts the result to every client. Your creations may interact with others', giving rise to unexpected emergent structures.
客户端采用乐观预测:你的输入会立即在本地渲染,再由服务端权威状态同步修正,保证流畅手感的同时确保一致性。
The client uses optimistic prediction: your input renders immediately on your screen, then is reconciled against the server's authoritative state — smooth feel with guaranteed consistency.
环形世界 (Torus)
Torus World
这是一个 10048×10048 格的环形世界 (Torus 拓扑):向右走出边界会从左边回来,向下走出边界会从上面回来——就像在甜甜圈表面行走。这意味着你永远不会到达"边缘",细胞结构也可能跨越边界与自身产生交互。
This is a 10048×10048 toroidal world (Torus topology): moving past the right edge wraps you back to the left, and moving past the bottom wraps you back to the top — like walking on the surface of a donut. There are no "edges", and cell structures can interact with themselves across the boundary.
首次进入时,画面会自动跳转到细胞最密集的区域。之后你可以自由探索——通过小地图或平移/缩放找到其他玩家的创作。
On first load, the camera auto-jumps to the densest cell cluster. From there, explore freely — use the minimap or pan/zoom to discover other players' creations.
联系我们
Contact