Re: Save and Load in Pipmak for Windows
Status: Alpha
Brought to you by:
cwalther
From: Christian W. <cwa...@gm...> - 2009-01-23 12:41:34
|
Evgen wrote: > Here I want continue about save and load game without Windows dialogs > I’m also use windows and ubuntu, but play games only windows. > And I think about functions for windows-pipmak first, in my topic on > Loadlib > thread =) Actually I don't think there's much Windows-specific about this, except for the choice of the location where to put the files. All the rest should be the same on all platforms. > I have some knowledge of C#, and today try open source in C++ > (pipmakLuaLib > and pipmak_windows files) where I think see functions what we need for > update Nitpick: it's C, not C++. > But big problem for me, that I cant work with Makefiles and never > work with > C++, only C# > For example in C# you can also open Solution, where included all > files. > And if I try write some functions (for load and save game without > windows > dialog) I cant complete *.exe in C++ Makefiles Since you talk about C#, you're probably using MS Visual Studio. You should talk to Andrea Viarengo, he has worked on compiling Pipmak with Visual C++ 2005. He has never submitted his project files and stuff for inclusion into the source repository though. Maybe you'll find his wiki article <http://pipmak.sourceforge.net/wiki/index.php/ MSVC8_Build> useful. > Maybe I can include dlls (or some plugins) to pipmak, and after it > use new > functions? You could probably do that, but why not implement it directly in Pipmak where it belongs. > Some variants(windows): > gamesave("name") -- main folder ( / ) > -- or /save/ folder in game directory, > -- or special path (for windows: MyDocuments/game_name/) > > we can use names, but I think use numbers > gamesave(1) --2,3,4,5.. > savegame1.pipsave, > savegame2.pipsave, > savegame3.pipsave files, as variants.. Using just names, without paths, is what I like best. I think this can be handled as an overload of the existing pipmak.savegame() function: when you call it without arguments, it brings up the dialog as before, when you call it with a name it saves in the standard folder. Dito for pipmak.opensavedgame(). What happens when writing to that folder (or creating it) fails? Throw an error? In addition, we'd need a function to enumerate all saved games in the standard folder. And, in the far future, maybe the ability to read some information from them for display in a saved game browser (screenshots, even). As for what the standard folder should be, for Mac OS I propose ~/ Library/Application Support/Pipmak/<project name>/ or ~/Library/ Preferences/Pipmak/<project name>/. Or perhaps leave out the intermediary Pipmak folder, since game users don't care if their games are made with Pipmak - although that would increase the risk of naming collisions? For Windows, probably something in My Documents, as you say. (What to do with project names that are not valid file names? Windows in particular has all sorts of restrictions on file names.) On Linux and other Unixes, maybe ~/.pipmak/<project name>/ - or has a better convention than littering the home directory with invisible items been established by now? > Oh… It will be so good, if some body understand my english =) No problem :) -Christian |