返回 文章 build CMS 文章

用啁啾声实现双手机静态 HTML 双人游戏实验

用麦克风啁啾声在两台手机间传输游戏状态,实现无需服务器的双人游戏。

音频通信双人游戏静态HTML麦克风API
成长分 / 100 61 综合收获、行动、留存与影响

为什么值得读了解一种无需网络服务器的双设备通信新思路:利用音频啁啾声。

看到静态 HTML 在移动端实现双人游戏的可行性验证。

关键洞察
  1. 两台独立手机运行静态 HTML 即可实现双人游戏,无需后端服务器。
  2. 网络代码通过麦克风发送啁啾声,并由网页麦克风 API 解析。
  3. 实验证明该方案可行,游戏状态可通过音频噪声传输。
转成行动

深入阅读

正文与原文对照

原文保真覆盖:全文原文字符:1135

工具 Chirp Pong

又一个游戏实验——我想看看能否在纯静态 HTML 中实现一个双人游戏,分别运行在两部手机上,网络通信代码通过麦克风收发啁啾声(chirp)来实现。看起来行得通!

Build a two player competitive pong like game where two players use their phones close to each other and the game state is sent via audio noises which the web microphone API can interpret - but add graphical and gameplay twists to make it a lot more fun and intertwine than pong

使用 Claude Code 中的 Claude Opus 5.5 Extra。