[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Putting gamedir into save game files?

Putting gamedir into save game files?

Discuss programming topics for the various GPL'd game engine sources.

Moderator: InsideQC Admins

Putting gamedir into save game files?

Postby Baker » Wed Jul 30, 2014 7:10 am

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"]
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Putting gamedir into save game files?

Postby mankrip » Wed Jul 30, 2014 8:27 am

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.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
/ /
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Re: Putting gamedir into save game files?

Postby Baker » Wed Jul 30, 2014 9:44 am

The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Re: Putting gamedir into save game files?

Postby Spike » Wed Jul 30, 2014 1:01 pm

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.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Putting gamedir into save game files?

Postby leileilol » Wed Jul 30, 2014 9:08 pm

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
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Re: Putting gamedir into save game files?

Postby Spike » Wed Jul 30, 2014 10:04 pm

stick the entire progs.dat in there, that way it'll not bug out between versions.
.
Spike
 
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Putting gamedir into save game files?

Postby r00k » Wed Jul 30, 2014 11:13 pm

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
r00k
 
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Re: Putting gamedir into save game files?

Postby mankrip » Thu Jul 31, 2014 6:50 am

Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
/ /
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am

Re: Putting gamedir into save game files?

Postby frag.machine » Thu Jul 31, 2014 2:15 pm

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.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2120
Joined: Sat Nov 25, 2006 1:49 pm


Return to Engine Programming

Who is online

Users browsing this forum: No registered users and 2 guests