显示HN:光标派对 – 一个用Elixir Phoenix在1小时内构建的MMO光标游戏
Show HN: Cursor Party – An MMO cursor game built in 1 hour with Elixir Phoenix

原始链接: https://github.com/jidohyun/cursor-party

## 光标派对:一个1小时MMO实验 光标派对是一个使用Elixir和Phoenix LiveView构建的、基于浏览器的实时MMO,展示了服务器端实时处理的强大功能。该项目受到Discord可扩展性的启发,旨在在一小时内创建一个功能性的多人游戏——玩家的光标可见并合作击败Boss。 该游戏在*不*依赖复杂的客户端JavaScript的情况下,实现了光标位置和Boss血量的实时同步。所有逻辑都位于服务器端,利用WebSockets和Phoenix LiveView的状态化架构(GenServer)。 使用Tailwind CSS构建,并通过Docker & Koyeb部署,光标派对展示了Elixir高效处理并发用户的能力。该项目是开源的,目前处于公开测试阶段——任何人都可以加入实时演示中的突袭!([https://github.com/jidohyun/cursor-party.git](https://github.com/jidohyun/cursor-party.git))

一位开发者挑战自己,使用Elixir和Phoenix LiveView在短短一小时内构建了一款多人在线游戏“Cursor Party”,以测试分布式处理。这款游戏允许玩家实时查看和互动彼此的鼠标光标,目前专注于合作对抗一个Boss。 游戏已部署在Koyeb(使用日本地区的免费套餐),目前处于测试阶段,计划每周更新。初步反馈显示存在潜在的性能问题,尤其对于亚洲以外的用户,以及一些浏览器/操作系统兼容性问题(非Chrome和Linux系统上存在延迟)。 开发者承认这些问题并正在积极调查。他们还承诺在Hacker News帖子中添加演示GIF,以便感兴趣的用户可以预览。项目可以在GitHub上找到:[github.com/jidohyun](github.com/jidohyun)。
相关文章

原文

Elixir Phoenix Tailwind CSS v4 Koyeb

"Can I build a real-time MMO game in just 1 hour?" A project to experiment with the distributed processing capabilities of Elixir and Phoenix LiveView.

🇰🇷 Read in Korean

👉 Live Demo (Currently in Open Beta. The server is always open, so come join the raid!)

Cursor Party is a massive multiplayer browser game where every user's cursor is visible in real-time, and players cooperate to defeat a boss monster.

Inspired by how Discord handles millions of concurrent users using Elixir, I started this "1-Hour Challenge" to verify if I could handle real-time synchronization purely with server-side logic.

  • Real-time Cursor Tracking: Share cursor positions with all connected users via WebSockets with near-zero latency.
  • Boss Raid System: Synchronized Boss HP managed by Server-side state (GenServer).
  • No Client-side Logic: All real-time logic is handled by Phoenix LiveView, without complex JavaScript frameworks.
  • Backend: Elixir, Phoenix LiveView (1.7+)
  • Styling: Tailwind CSS v4.0 (Alpha)
  • Deployment: Docker, Koyeb
  • Architecture: OTP (Open Telecom Platform) based distributed system

Prerequisites: Elixir and Erlang must be installed.

  1. Clone the repository

    git clone [https://github.com/jidohyun/cursor-party.git](https://github.com/jidohyun/cursor-party.git)
    cd cursor-party
  2. Install dependencies

  3. Install Tailwind v4 (Local)

  4. Start the server

Now you can visit localhost:4000 from your browser.

Bug reports and pull requests are welcome on GitHub at this repository. This project is intended to be a safe, welcoming space for collaboration.

联系我们 contact @ memedata.com