95
save game
Serialize the sim, not the sprites. Version the blob. Load must survive an old file.
What is save game?
A save is a versioned snapshot of gameplay state: positions, flags, inventory, seed. It is not a screenshot and not the live object graph. Loading migrates old versions forward.
Why does save game matter when vibe coding?
Models `JSON.stringify` the entire scene, including functions and GPU handles, or they forget a version. Next patch, every save breaks. Name the schema and the migration.
How do you do save game?
A plain data schema with a version integer. Save on a deliberate beat and on pause. Load constructs the world from data. Write a migration per version step. Never trust the file’s shape blindly.
How do you ask a model for save game?
Save (state) as versioned plain data, not live objects. Include version. On load, migrate older versions forward. Autosave on pause. Do not stringify functions, textures, or the whole scene graph.
What goes wrong with save game?
Saving mid-frame with half-updated components. Save at a safe point: after update, before the next input.