A local emulator for the 2008 Chinese client (v1.0.1.9) of a side-scrolling game, reverse-engineered via static IDA analysis and live testing without binary modifications.

Stars

9

7-day growth

No data

Forks

6

Open issues

0

License

No data

Last updated

2026-07-30

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It successfully reconstructs the original 2008 server protocol, providing a complete login, character creation, town, and tutorial combat loop, serving as a valuable resource for understanding early game server implementations and network protocol reverse engineering.

Who it is for

  • Game reverse engineers
  • Network protocol analysts
  • Hobbyists studying private server development for DNF-like games
  • Game history preservationists

Use cases

  • Offline play through the tutorial area
  • Protocol analysis and learning
  • Custom server logic experimentation
  • Educational demonstrations of server-client communication

Strengths

  • No client binary modifications required
  • Minimal but functional loop from login to combat
  • Detailed documentation of protocol secrets (e.g., XOR/ROL transforms, channel handshake)
  • Self-test tool included for verification

Considerations

  • Only the first room of the tutorial is implemented; no dungeon progression or rewards
  • Inventory, skills, quests, and economy are placeholders
  • Security card (command 161) is received but not responded to
  • Tied to a specific client version and requires a matching Script.pvf

README quick start

DF60A1

某横板过关游戏(客户端 1.0.1.9)本地模拟端研究项目。模拟端使用 .NET Framework 4.8.1 / x86 和 SQLite;客户端协议通过静态 IDA 分析及本机实测复原,未修改客户端二进制。

本仓库只包含模拟端源码,不包含客户端、Script.pvf、IDA 数据库、NPK、音乐或其他客户端资源。

放置目录和 PVF

请将整个 DF60A1 仓库目录放到客户端根目录下,并自行把与客户端匹配的 Script.pvf 放进仓库的 data 目录:

客户端根目录/
  DF60A1/
    DF60A1.sln
    data/
      Script.pvf              用户自行提供,不提交到 Git
    src/
      DF60A1/
        DF60A1.csproj

模拟端默认从 DF60A1/data/Script.pvf 读取频道脚本,从仓库上一级目录查找客户端主程序。缺少 PVF 时服务端会明确报错并退出。

当前可运行进度

截至 2026-07-29,已经完成以下最小闭环:

  1. 使用 13 段参数直接启动客户端,不依赖 DebugConfig.txt
  2. 完成入口握手、频道列表和频道登录。
  3. 使用 SQLite 保存账号及角色。
  4. 支持创建角色,角色名、职业和等级能在角色卡上正确显示。
  5. 支持选择角色并进入赛丽亚房间。
  6. 城镇地图、玩家角色、赛丽亚、UI、BGM 和 NPC 语音正常。
  7. 支持首次登录自动进入新手教程副本。
  8. 教程地图、玩家、4 只哥布林和战斗逻辑均能加载;客户端已实际上报怪物死亡事件。

当前测试账号:

账号: create_channel_2008
密码: test
服务端: 127.0.0.1:7001

启动方式

首次运行先在仓库根目录构建 Release/x86:

dotnet build .\DF60A1.sln -c Release -p:Platform=x86

无参数启动模拟端时,默认监听 127.0.0.1:7001

.\src\DF60A1\bin\x86\Release\net481\DF60A1.exe

使用 --host--port 自定义监听 IP、端口,例如:

.\src\DF60A1\bin\x86\Release\net481\DF60A1.exe --host 192.168.1.10 --port 7002

客户端原始启动参数必须恰好包含 13 段,以 ? 分隔:

99?服务器IP?端口?账号?密码?0?0?0?0?0?0?0?0

也可让模拟端主程序代为组装同样的 13 段参数并启动客户端:

.\src\DF60A1\bin\x86\Release\net481\DF60A1.exe --launch --host 127.0.0.1 --port 7001 --account create_channel_2008 --password test

--launch 只启动客户端,不会同时启动服务端;应先在另一个终端运行模拟端主程序。

新手教程实现

客户端收到通知 136 后会执行首次教程启动流程:

notification 136
  -> command 15 ENTER_SELECT_DUNGEON
  -> command 16 SELECT_DUNGEON
  -> command 153 激活模块确认

命令 16 的业务载荷为:

u16 dungeon_id
u8  difficulty
u8  option

客户端首次选择的是 dungeon_id=10000。研究时使用的 2008 国服 Script.pvf 中的数据为:

dungeon 10000 = dungeon/Tutorial/Tutorial.dgn
start room     = (0, 0)
map 61000      = map/Tutorial/tutorial.map
minimum level  = 1
monster rows   = 4 x monster.lst id 1

模拟端处理命令 15 时发送:

notification 3  USER_STATE
notification 26 UDP_HOST
notification 27 ENTER_SELECT_DUNGEON

处理命令 16 时发送:

notification 28 DUNGEON_INFO
notification 29 START_MAP

客户端加载地图后发送命令 40,模拟端回复成功并发送空载荷通知 30,完成加载。

相关 2008 客户端静态位置:

notification 3  handler: 0x41B0D3
notification 26 handler: 0x41F144
notification 27 handler: 0x41F16C
notification 28 handler: 0x41F550
notification 29 handler

Related repositories

Similar projects matched by category, topics, and programming language.

loyal-studio
loyal-studio GitHub avatar

Honami-Animation-System

Honami is a visual, UI-first animation system for Unity 6 that replaces Mecanim with timeline editors, node graphs, and a zero-allocation runtime, letting animators author animations with almost no code.

C#
239
aakk007
aakk007 GitHub avatar

RogueCleaner

A Windows tool that detects and removes malicious leftovers from right-click menus, startup items, services, scheduled tasks, browser extensions, and file associations.

C#
212
ThioJoe
ThioJoe GitHub avatar

Thio-Background-App-Notifier

A lightweight Windows tool that notifies you about new auto-starting background services and scheduled tasks that Windows normally doesn't alert you about.

C#
147