4 ms·
Does anyone know if this is the reason for Starflight's madding save system[0]? I can't think of a technical reason it would need to work that way, but it is an
by AnIdiotOnTheNet 6y ago
Does anyone know if this is the reason for Starflight's madding save system[0]? I can't think of a technical reason it would need to work that way, but it is an exceptionally rare way to do things so I'm forced to wonder if the use of forth is partly responsible.
[0] Starflight self-modifies as it runs, meaning the executable itself is re-written with the game state baked in. If the game exits without saving in the approved way the executable is broken.
- lebuffon 6y agoI have no inside information on Starflight but this is typical of Forth systems. They are an image structured environment. Unless you build your own data structures that are external to Forth's memory image, called a dictionary, everything exists in that chunk of memory. Variables and arrays etc. exist where they are declared in the code sequence. So to save the game they opted apparently to just save the system image. It was the simple way out IMHO. It's trivial to create separate data area and write that out to a file in Forth.