展示 HN:我逆向工程了《Test Drive III》(1990 年 DOS 游戏)的世界地图
Show HN: I reverse-engineered the world maps of Test Drive III (1990 DOS game)

原始链接: https://github.com/s-macke/Test-Drive-3-Maps

本项目旨在归档并重构经典 DOS 游戏《Test Drive III: The Passion》的世界地图。开发者出于儿时的怀旧之情,历时五年对该游戏的 3D 格式进行了逆向工程,从而实现了精确的数字化重构。 在技术实现上,该项目解码了一个 32x16 的图块 ID 网格,并利用 16 位顶点坐标的并行数组来构建 3D 网格模型。项目包含一套基于 Node.js 的强大命令行工具,用于提取这些资源,包括: * **OBJ 导出器:** 将地图和对象转换为标准的 Wavefront 3D 文件。 * **资源提取器:** 将游戏特定的 DAT 文件转换为 PNG 图像并提取场景精灵图的工具。 * **格式文档:** 一个详尽的 `spec/` 目录,记录了逆向工程后的文件结构。 代码库提供了一个基于浏览器的查看器(使用 Three.js 构建),用于探索重构后的环境;此外还设有展示游戏界面、精灵图和地图设计的图库。这一成果成功地将 90 年代的游戏数据与现代 Web 技术相结合,为日后的探索保留了该游戏独特的开放世界几何结构。

Hacker News | 过往 | 评论 | 提问 | 展示 | 招聘 | 提交 | 登录 Show HN: 我逆向工程了《Test Drive III》(1990年 DOS 游戏)的世界地图 (github.com/s-macke) 11 分,由 s-macke 于 1 小时前发布 | 隐藏 | 过往 | 收藏 | 1 条评论 | 帮助 sedatk 5 分钟前 [–] 我以前玩过《Test Drive III》的演示版。我记得它只有一张地图。但我很喜欢它的沙盒模式,你可以开车去任何地方。我特别记得沿着铁路开。在当时,这游戏远超其时代。回复 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 加入 YC | 联系 搜索:
相关文章

原文

Reverse engineered and extracted maps of the DOS Game Test Drive III: The Passion by Accolade

As a kid, I played Test Drive III a lot. Not because of the racing, but simply to explore the world.

There was so much to see, so much to discover. This project is an attempt to reconstruct those maps as accurately as possible. Over the past five years, I have worked on it on and off. Now, with the help of AI, I am close to success. Apart from the occasional flying car and missing sprites.

The 3D format itself is nothing too exotic, but it does contain a few special cases. Each tile or object is a small mesh stored as three parallel arrays of 16-bit signed X, Y, and Z vertex coordinates, followed by 8-byte polygon records containing the polygon type, vertex indices, and palette color. These are preceded by a short 4- or 8-byte header.

A map is a 32×16 grid. Each cell is 2 bytes: a tile ID selecting one of those meshes, plus packed rotation and height bits.

Game Scenes

Extracted Game Cars

Wavefront Object files are available in the objs directory.

  • Node.js 20.19+ (required by Vite 7)

Running the Browser Viewer

Opens the viewer at http://localhost:5173

Output is in the dist/ directory.

Exports all maps and objects to the objs/ directory.

Exports the currently documented DAT images as indexed-color PNGs to the images/ directory.

Extracts transparent scene-sprite PNGs from the known scene render descriptor banks, including the SCENE02 same-family variant.

# View LST file contents
npm run lstview -- public/base/SCENE01.LST

# Extract VGA image from DAT file
npm run imgview -- public/base/DATAB.DAT 0x151 12083 320
src/
├── browser/     # Browser-only modules (Three.js viewer)
├── shared/      # Shared modules (extraction logic, LZW/RLE decoders)
└── tools/       # Node.js CLI tools
    ├── export/      # OBJ exporter
    ├── imgextract/  # Batch DAT image → PNG exporter
    ├── spriteextract/ # Scene sprite extractor
    ├── lstviewer/   # LST file viewer
    └── imgviewer/   # VGA image extractor
public/
└── base/        # Game data files (required)
objs/            # Exported Wavefront OBJ files
images/          # Extracted VGA images (PNG format)
spec/            # File format specifications

For a visual overview and previews of all extracted UI assets, scene sprites, map palettes, and car designs, visit the Project Images Gallery Index. Each individual directory contains its own generated visual gallery:

File Format Specifications

The spec/ directory contains reverse-engineered documentation for Test Drive III file formats:

联系我们 contact @ memedata.com