July 1st: Filing System

Today I had to figure out some stuff about how prototypes are supposed to work. Since they have a 1:1 relationship to the files which store their data, when and how they get written is super important to make consistent so I don’t find myself in a situation where they’re unexpectedly out of sync.

The way it works now: When the game is started, all of the prototypes in the prototype directory are loaded into the game for use. These can be modified in any way, and when they are the changes aren’t saved until a savePrototype command is called. HOWEVER, if a prototype is renamed, both it and its file will immediately be renamed to reflect this change — this behavior is slightly inconsistent, but it should be easy enough to get used to.

I should also make it so that when the prototype is saved it automatically saves the old copy as a backup. That seems like a good idea.


About problemmachine

What is the nature of your problem? Can we modify the nature of your problem? Can your problem be touched? Eaten? May we eat your problem for you? May we eat your soul for you? Would you like a replacement problem? We make problems. We eat souls. We crap solutions. We are Problem Machine.
This entry was posted in Daily Update, Programming. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s