Hi.
I hereby request support for saving and loading of game-related files. Every
game has to store some files (think saved games). Unfortunately, accessing the
file system looks different under the three supported platforms (Windows,
Linux, Mac). Also location for user-specific files is different, and even
directory separators, etc. It would be perfect if game developers didn't have
to deal with this in every game.
So for instance it could be something like:
void Files::save(string dir,string fileName,string content);
Which would store the content into a file in OS-specific user's home directory.
Then it could be read with:
string Files::read(string dir,string fileName);
Or maybe something more C++-ish, instead of a function Angel could produce a
stream object?
As a matter of fact, currently I only have to save very simple data (few ints
and a string). So instead of messing with files, game devs could just store
some named values. For instance I would like to call:
Storage::saveInt("MarioGameLevel",4);
And then I could read it back with:
int level = Storage::readInt("MarioGameLevel");
And Angel would just store it somewhere appropriate for each platform in
user-specific location (so if few users have logins on a machine, the value can
be different for each). How cool would that be?
Original issue reported on code.google.com by rhy...@rhywek.com on 20 Feb 2011 at 3:40
Original issue reported on code.google.com by
rhy...@rhywek.com
on 20 Feb 2011 at 3:40