Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
70 changes: 70 additions & 0 deletions teams/1324405-43003-烟跑跑/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# 🚂 烟跑跑 - 绿皮火车禁烟大作战

## 🎮 游戏简介

### 创作背景
这是一个源于真实生活的游戏。开发者在一次绿皮火车旅行中,被二手烟困扰,突发奇想:**"如果有个游戏能让大家体验劝导吸烟者的过程,会不会很有趣?"**于是,这款充满中国特色的像素风游戏诞生了。

### 玩法目标
- **核心任务**:在有限时间内,引导吸烟者到指定区域
- **挑战要素**:乘客耐心有限,烟雾会扩散,时间紧迫
- **最终目标**:让整节车厢保持空气清新,稳定乘客情绪

### 设计理念
- **寓教于乐**:用轻松方式传递公共场所禁烟意识
- **文化共鸣**:还原中国绿皮火车的独特氛围
- **策略思考**:不是简单驱赶,而是巧妙引导,体现人文关怀

## 🎯 操作说明

### 如何开始
1. **在线游玩**:直接打开浏览器访问游戏链接即可。游戏链接:http://117.72.49.116:9000/
2. **本地运行**:
```bash
python -m http.server 8000
# 然后在浏览器访问 http://localhost:8000
```

### 控制方式
- **移动**:方向键控制角色移动
- **交互**:靠近吸烟者,`Q`键引导吸烟者到车厢外吸烟;靠近乘客,`A`键安抚乘客情绪
- **策略**:观察玩家耐力值、乘客耐心值、烟雾扩散位置,优先劝导吸烟者离开车厢,注意安抚乘客情绪

### 游戏流程
1. **观察阶段**:查看车厢布局,识别吸烟者位置
2. **规划路线**:制定最有效的劝导顺序
3. **执行行动**:快速移动,巧妙引导

## ⚡ 技术特色

### 关键实现方式
- **路径寻优**:BFS算法实现角色智能移动
- **状态管理**:乘客、烟民、玩家状态机
- **碰撞检测**:像素级精确碰撞判定

### 难点攻克
- **AI平衡**:让吸烟者行为既真实又不至于太难
- **像素艺术**:确保符合绿皮火车主题且不失观赏性
- **音效设计**:让游戏更生动,更符合真实场景

### MoonBit使用亮点
- **类型安全**:充分利用MoonBit的强类型系统,减少运行时错误
- **函数式编程**:使用不可变数据结构,简化状态管理
- **模块化设计**:清晰的包结构,便于维护和扩展
- **WebAssembly编译**:一键编译到WASM,性能接近原生
- **AI辅助开发**:结合Moon Agent提升开发效率

### 技术栈
- **语言**:MoonBit → WebAssembly
- **图形**:Canvas 2D + 像素艺术
- **音频**:Canvas Audio API 音效

## 🥛 团队信息
- **团队名称**:43003
- **成员名单**:Li Yizhe
- **联系方式**:[email protected]
---

*这不是一个简单的游戏,这是程序员对二手烟的温柔抗议* 😄

**立即体验**:打开浏览器,加入这场别开生面的"禁烟战争"!
22 changes: 22 additions & 0 deletions teams/1324405-43003-烟跑跑/artifact/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>My Game</title>
<style type="text/css">
@font-face {
font-family: "LXGWZhenKai-Regular";
src: url("./LXGWZhenKai-Regular.ttf") format("truetype");
font-weight: normal;
font-style: normal;
}
</style>
<script src="/target/js/release/build/smoketrain.js" defer></script>
</head>

<body>
<canvas id="canvas" style="display: block; margin: 0 auto;" height="32" width="32"></canvas>
</body>

</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading