I want to put the gamedir into save game files *AND* have it degrade gracefully in non-supporting clients back to standard Quake.
Not stuff that breaks other engines, needs regular Quake just to ignore it.
Any thoughts on the least EVIL way to do this? I don't want it to print warnings to the console of non-supporting clients either.
[I don't like the idea of save games not knowing what they are. I can think of 2 ways to pull this off, but at the moment I'm not liking either of them (repeat fields multiple times with different information for the engine to scrub out is one --- a non-supporting engine would set the field multiple times, but last value would be the real on --- the other idea involves the save game comment. -- first one seems really hacky, second one is kind of "okayish" but want to collect thoughts and see if there is a "best way"]
Putting gamedir into save game files?
Putting gamedir into save game files?
The night is young. How else can I annoy the world before sunsrise? Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Re: Putting gamedir into save game files?
Any extra information in the savegames should be encoded as an entity comment in the world entity. Entity comments are ignored by the engine, but the engine can be programmed to use data from some of those comments.
That's how the serverflags fix was implemented in the latest versions of Makaqu.
That's how the serverflags fix was implemented in the latest versions of Makaqu.
Re: Putting gamedir into save game files?
This is the worldspawn segment of the save game file, I'm not sure what you are suggesting?
But it sounds promising.
But it sounds promising.
Code: Select all
{
"modelindex" "1.000000"
"movetype" "7.000000"
"solid" "4.000000"
"classname" "worldspawn"
"model" "maps/start.bsp"
"message" "Introduction"
"sounds" "4.000000"
"wad" "gfx/start.wad"
}
The night is young. How else can I annoy the world before sunsrise? Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Re: Putting gamedir into save game files?
is it not safe to assume that the gamedir the saved game is stored in is the gamedir that should be used to reload the saved game? I'm not sure why you'd need to add anything at all.
Re: Putting gamedir into save game files?
if i did this in my uneccessarily anal way i'd just stick the progs.dat crc appended to the save file name and get the engine to load that automatically appended.
but if I do that, someone will bitch on the debian mailing list that it's not secure enough and should be a progs.dat sha-1 hash save file name
but if I do that, someone will bitch on the debian mailing list that it's not secure enough and should be a progs.dat sha-1 hash save file name
i should not be here
Re: Putting gamedir into save game files?
stick the entire progs.dat in there, that way it'll not bug out between versions.
Re: Putting gamedir into save game files?
could it not be simple enough to save games to the gamedir and then load saved games from the gamedir?
original saved files for quake in id1 mods have their saved games in their dirs?
i havent looked at the code i just assumed it wasnt hard coded for saved games to always be in id1
wait just reread the thread i think spike said the same thing i just did
since for example each player might have a different name for one mod as apposed to
another player. so saving a foldername in the saved file might later not work if they reinstalled the mod
and used a different foldername. but just tossing a saved game know to be from
intheshadows would work for 'its' if thats the -gamedir name to load from
blah typing on my phone hope this
makes sense
original saved files for quake in id1 mods have their saved games in their dirs?
i havent looked at the code i just assumed it wasnt hard coded for saved games to always be in id1
wait just reread the thread i think spike said the same thing i just did
since for example each player might have a different name for one mod as apposed to
another player. so saving a foldername in the saved file might later not work if they reinstalled the mod
and used a different foldername. but just tossing a saved game know to be from
intheshadows would work for 'its' if thats the -gamedir name to load from
blah typing on my phone hope this
makes sense
Re: Putting gamedir into save game files?
I do agree that it seems unnecessary, but Baker didn't exactly say what he wants to use this for. And anyway, it's something fun to code...
Search for "serverflags" in the Makaqu source code.Baker wrote:This is the worldspawn segment of the save game file, I'm not sure what you are suggesting?
-
- Posts: 2126
- Joined: Sat Nov 25, 2006 1:49 pm
Re: Putting gamedir into save game files?
Save a dummy entity in the end of the savegame (let's say, "classname" = "_progsinfo") containing all info you want to store, like the progs.dat CRC or the gamedir name.
Vanilla engines will just parse and spawn a harmless entity with virtually no consequences to gameplay, yours will use the mentioned fields and silently discard the entity.
If you're really paranoid about an inoffensive errant entity wandering in the engine guts, add a "nextthink"="SUB_Remove" so it is almost immediately reclaimed in vanilla engines.
Vanilla engines will just parse and spawn a harmless entity with virtually no consequences to gameplay, yours will use the mentioned fields and silently discard the entity.
If you're really paranoid about an inoffensive errant entity wandering in the engine guts, add a "nextthink"="SUB_Remove" so it is almost immediately reclaimed in vanilla engines.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC (LordHavoc)