[DGD] Ideas on disk I/O

Arnau Rossell=?US-ASCII?Q?=F3?= Castell=?US-ASCII?Q?=F3?= arocas at alumni.uv.es
Mon Dec 10 23:32:28 CET 2001


Hi, while I was thinking on a sensible way to store all strings in separate 
files to make translating and fixing typos easier, in a way that could be 
enforced. I've thought on something that would make DGD even more versatile:

- The only functions capable of disk I/O should be get_dir(), make_dir(), 
read_file(), remove_dir(), remove_file(), rename_file(), write_file() and due 
to their special function dump_state(), swapout().

- save_object() should return a string with all the data on it, ready to save 
to a file.
- restore_object() should take a string as an argument, and restore all 
variables from it.
- compile_object() should take a string with the program to compile, and 
another one with the name of the object.
- The editor() function may have to be changed, too. I never used it so i'm not 
really sure about it.

This could be useful for many things, for example a player object could easily 
ask all his equip to hand them their data, and the equip could recursively ask 
any enchantment or whatever for his data, then the player object could save 
everithing on one save file, and when the player logs in again recovery would 
be easy, too.
For translating, you would only have to put special identifiers wherever you 
wanted the text, and change the program string just before compiling. Virtual 
objects would be easier to make, too; And they could always be "originals", not 
clones, if you wanted it(you could clone them, although you'd have to pay in 
increased memory usage).

Well this is only an idea, reading back wath I've written i sound really 
enthusiastic :) , so, please, I'm waiting some responses with problems abut 
this to cool me down a bit.

      Arnau.

_________________________________________________________________
List config page:  http://list.imaginary.com/mailman/listinfo/dgd



More information about the DGD mailing list