MCPcopy
hub / github.com/feichao93/battle-city

github.com/feichao93/battle-city @v0.3.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.3.0 ↗
741 symbols 1,384 edges 134 files 10 documented · 1%
README

坦克大战复刻版(Battle City Remake)

游戏地址: http://shinima.pw/battle-city/

游戏详细介绍见知乎专栏文章: https://zhuanlan.zhihu.com/p/35551654

该 GitHub 仓库的版本是经典坦克大战的复刻版本,基于原版素材,使用 React 将各类素材封装为对应的组件。素材使用 SVG 进行渲染以展现游戏的像素风,可以先调整浏览器缩放再进行游戏,1080P 屏幕下使用 200% 缩放为最佳。此游戏使用网页前端技术进行开发,主要使用 React 进行页面展现,使用 Immutable.js 作为数据结构工具库,使用 redux 管理游戏状态,以及使用 redux-saga/little-saga 处理复杂的游戏逻辑。

如果游戏过程中发现任何 BUG 的话,欢迎提 issue

开发进度:

Milestone 0.2(已完成于 2018-04-16)

  • [x] 游戏的基本框架
  • [x] 单人模式
  • [x] 展览页面
  • [x] 关卡编辑器与自定义关卡管理

Milestone 0.3(已完成于 2018-11-03)

  • [x] 性能优化
  • [x] 完整的游戏音效(有一些小瑕疵)
  • [x] 双人模式(已完成)

Milestone 1.0(看起来遥遥无期 /(ㄒ o ㄒ)/~~)

  • [ ] 更合理的电脑玩家
  • [ ] 完整的设计、开发文档
  • [ ] 基于 websocket 的多人游戏模式

本地开发

  1. 克隆该项目到本地
  2. 运行 yarn install 来安装依赖 (或者使用 npm install
  3. 运行 yarn start 开启 webpack-dev-server,并在浏览器中打开 localhost:8080
  4. 运行 yarn build 来打包生产版本,打包输出在 dist/ 文件夹下

devConfig.js 包含了一些开发用的配置项,注意修改该文件中的配置之后需要重启 webpack-dev-server

Extension points exported contracts — how you extend this code

SVGAttributes (Interface)
(no doc)
custom-tyings.d.ts
ImageProps (Interface)
(no doc)
app/hocs/Image.tsx
TankFireInfo (Interface)
(no doc)
app/types/index.ts
State (Interface)
(no doc)
app/reducers/index.ts
P (Interface)
(no doc)
app/components/Score.tsx
CollisionWithBrick (Interface)
(no doc)
app/utils/Collision.ts
StageResult (Interface)
(no doc)
app/sagas/stageSaga.ts
FireEstimate (Interface)
(no doc)
app/ai/fire-utils.ts

Core symbols most depended-on inside this repo

get
called by 81
app/utils/common.ts
asRect
called by 30
app/utils/common.ts
iter
called by 27
app/utils/Timing.ts
delay
called by 25
app/utils/Timing.ts
testCollide
called by 20
app/utils/common.ts
getNextId
called by 14
app/utils/common.ts
logAI
called by 10
app/ai/logger.ts
getDirectionInfo
called by 9
app/utils/common.ts

Shape

Function 347
Class 174
Method 166
Interface 53
Enum 1

Languages

TypeScript100%

Modules by API surface

app/utils/actions.ts82 symbols
app/components/Gallery.tsx34 symbols
app/utils/common.ts24 symbols
app/types/StageConfig.ts23 symbols
app/ai/env-utils.ts20 symbols
app/components/tanks.tsx18 symbols
app/components/Editor.tsx18 symbols
app/sagas/powerUpManager.ts16 symbols
app/components/StageList.tsx16 symbols
app/utils/bullet-utils.ts15 symbols
app/sagas/bulletsSaga.ts15 symbols
app/components/GameTitleScene.tsx11 symbols

Dependencies from manifests, versioned

@types/classnames2.2.0 · 1×
@types/file-saver1.3.0 · 1×
@types/history4.6.2 · 1×
@types/lodash4.14.105 · 1×
@types/node10.9.4 · 1×
@types/prop-types15.5.2 · 1×
@types/react15.0.21 · 1×
@types/react-dom15.5.1 · 1×
@types/react-hot-loader4.1.0 · 1×
@types/react-redux6.0.8 · 1×
@types/react-router-dom4.2.5 · 1×
@types/react-router-redux5.0.12 · 1×

For agents

$ claude mcp add battle-city \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact