4 ms·
Regarding rollback, there's an interesting technique that I stumbled upon: Instead of serializing individual objects, you serialize all the memory relevant to
by Jyaif 5y ago
Regarding rollback, there's an interesting technique that I stumbled upon:
Instead of serializing individual objects, you serialize all the memory relevant to the gameplay by using a custom memory allocator whenever the gameplay related code runs. This custom memory allocator is designed to allow taking fast memory snapshots, and supports restoring memory snapshots.
This allows rollbacking any code, including in my case rollbacking user-submitted Lua scripts.
I wrote about it at https://www.jfgeyelin.com/2021/02/a-general-state-rollback-technique-for-c.html https://www.jfgeyelin.com/2021/02/a-general-state-rollback-t...
- exlurker 5y agoNovel and inspiring. Thank you!
- YellowAfterlife 5y agoIt is a great technique if the tools allow for it! Author of INVERSUS also described using this approach for fast game state snapshots. (aside: code blocks in the post could use a fallback font in case Menlo isn't installed)