# 多人对战游戏
**Repository Path**: firfe/mp_game
## Basic Information
- **Project Name**: 多人对战游戏
- **Description**: 多人联机对战游戏,汉化和docker镜像制作
github仓库 https://github.com/Firfr/mp_game
原项目 https://github.com/vzhou842/example-.io-game
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: main
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2025-08-25
- **Last Updated**: 2025-10-15
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
An Example .io Game
An example multiplayer (.io) web game. Read the walkthrough: [**How to Build a Multiplayer (.io) Web Game**](https://victorzhou.com/blog/build-an-io-game-part-1/).
一个多人在线(.io)网页游戏示例。阅读完整教程:《手把手教你开发一款多人在线(.io)网页游戏》。
Built with [Node.js](https://nodejs.org/), [socket.io](https://socket.io/), and [HTML5 Canvas](https://www.w3schools.com/html/html5_canvas.asp).
使用 Node.js、Socket.IO 和 HTML5 Canvas 构建。
To see this code with [Flow](https://flow.org/) typing, visit the [flow branch](https://github.com/vzhou842/example-.io-game/tree/flow).
如需查看带有 Flow 类型注解的代码版本,请访问 flow 分支。
## 汉化&修改
- 原项目地址
- 官网 https://example-io-game.victorzhou.com
- GitHub仓库 https://github.com/vzhou842/example-.io-game
- 我汉化和构建docker镜像的仓库
- GitHub仓库 https://github.com/Firfr/mp_game
- Gitee仓库 https://gitee.com/firfe/mp_game
当前制作镜像版本(或截止更新日期):2025年08月25日
首先感谢原作者的开源。
原项目没有中文和docker镜像,我制作了docker镜像
具体汉化了那些内容,请参考[翻译说明](./翻译说明.md)。
欢迎关注我B站账号 [秦曱凧](https://space.bilibili.com/17547201)
有需要帮忙部署这个项目的朋友,一杯奶茶,即可程远程帮你部署,需要可联系。
微信号 `E-0_0-`
闲鱼搜索用户 `明月人间`
或者邮箱 `firfe163@163.com`
如果这个项目有帮到你。欢迎start。
有其他的项目的汉化需求,欢迎提issue。或其他方式联系通知。
### 镜像
从阿里云或华为云镜像仓库拉取镜像,注意填写镜像标签,镜像仓库中没有`latest`标签
容器内部端口`5138`,可通过设置环境变量`PORT`的值来指定监听端口。
- 国内仓库
- AMD64镜像
```bash
swr.cn-north-4.myhuaweicloud.com/firfe/mp_game:2025.08.25
```
- ARM64镜像
```bash
swr.cn-north-4.myhuaweicloud.com/firfe/mp_game:2025.08.25-arm64
```
- DockerHub仓库
- AMD64镜像
```bash
firfe/mp_game:2025.08.25
```
- ARM64镜像
```bash
firfe/mp_game:2025.08.25-arm64
```
### docker run 命令部署
```bash
docker run -d \
--name mp_game \
--network bridge \
--restart always \
--log-opt max-size=1m \
--log-opt max-file=1 \
-p 5138:5138 \
swr.cn-north-4.myhuaweicloud.com/firfe/mp_game:2025.08.25
```
### compose 文件部署 👍推荐
```yaml
#version: '3'
name: mp_game
services:
mp_game:
container_name: mp_game
image: swr.cn-north-4.myhuaweicloud.com/firfe/mp_game:2025.08.25
network_mode: bridge
restart: always
logging:
options:
max-size: 1m
max-file: '1'
ports:
- 5138:5138
```
### 修改说明
这里对除了汉化之外的代码修改的说明。
增加修改部分具体见 [修改说明](./修改说明.md)。
`./README.md` 文件翻译,增加 `## 汉化&修改`
增加目录 `./图片`
新增文件 `./.dockerignore`、`./Dockerfile`、`./翻译说明.md`、`./修改说明.md`、`./本地调试命令记录.md`
### 效果截图

## Development 开发指南
To get started, make sure you have Node and NPM installed. Then,
开始之前,请确保你已安装 Node 和 NPM。然后,
```bash
$ npm install
$ npm run develop
```
on your local machine.
在你的本地机器上执行。
To run the project in a production setting, simply
如需在生产环境中运行项目,只需
```bash
$ npm install
$ npm run build
$ npm start
```
## Tests 测试
To run the tests for this this project, simply
要运行本项目的测试,只需
```bash
$ npm install
$ npm test
```