<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>世界状态 on PlumePHP</title><link>https://plumephp.com/tags/%E4%B8%96%E7%95%8C%E7%8A%B6%E6%80%81/</link><description>Recent content in 世界状态 on PlumePHP</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Fri, 31 May 2024 08:33:00 +0800</lastBuildDate><atom:link href="https://plumephp.com/tags/%E4%B8%96%E7%95%8C%E7%8A%B6%E6%80%81/index.xml" rel="self" type="application/rss+xml"/><item><title>游戏服务器世界状态快照架构设计</title><link>https://plumephp.com/game-server-world-state-snapshot-architecture/</link><pubDate>Fri, 31 May 2024 08:33:00 +0800</pubDate><guid>https://plumephp.com/game-server-world-state-snapshot-architecture/</guid><description>&lt;h2 id="背景与问题"&gt;背景与问题&lt;/h2&gt;
&lt;p&gt;房间制游戏可以在一局结束后释放所有状态，开放世界和长生命周期玩法不行。地图里的资源点、怪物归属、建筑破坏、阵营占领、动态事件、玩家放置物都可能持续存在。只靠数据库逐条写状态，恢复时会慢；只靠内存状态，进程崩溃就会丢世界。世界状态快照架构的关键，是把“当前世界长什么样”和“它如何变成这样”同时保存下来：快照负责快速恢复，增量日志负责补齐细节和审计。&lt;/p&gt;</description></item></channel></rss>