Global Feed Post Login
Replying to Avatar jb55

arena allocators are cool. idea:

- mmap 1gb of virtual memory

- use this for for all game memory

- saving the *entire state* of your game is just a matter of the OS commiting dirty pages of your game memory to disk.

- close game, reopen. game instantly loads because of the previous game memory which is already in the OS page cache.

- amazing for playtesting: if players get stuck you can compress and send an entire snapshot of the memory game state to a dev and then dev can continue playing from their exact game state.

I wonder if any game engines do this.

this is similar to how nostrdb works when loading notedeck, which is why its so fast to load, but I only use that for DB memory and not everything.

Avatar
Danny, the cyber guy 4mo ago

There's a tool on Linux that basically does this, and it works most of the time, it's called CRIU.

Reply to this note

Please Login to reply.

Discussion

Avatar
jb55 4mo ago

very cool!

Thread collapsed