Announcement

Collapse
No announcement yet.

Ongoing Engine Fixes/Improvement Thread

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Ongoing Engine Fixes/Improvement Thread

    For no particular Quake engine:

    The "profile" command in Quake crashes the client during demo playback or if connected to a server because it displays QuakeC performance info.

    Should display some sort of "no server running" message instead of crashing.

    As far as I know, this affects most non-DarkPlaces engines including FitzQuake, JoeQuake, Qrack, ProQuake, glquake, etc.
    Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

    So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

  • #2

    I added this a few versions back

    Code:
    	if (svs.maxclients > 1)//R00k dont allow this in multiplayer!
    But you're right, it was a mean way to boot people off a server by using a stuffcmd "profile\n"
    www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

    Comment


    • #3
      Originally posted by R00k View Post

      I added this a few versions back

      Code:
      if (svs.maxclients > 1)//R00k dont allow this in multiplayer!
      But you're right, it was a mean way to boot people off a server by using a stuffcmd "profile\n"
      Unfortunately, I don't think that fixes it the right way. It's desireable to be able to run it if you are playing multiplayer (for optimizing a multiplayer mod, maybe). It's less desreable to run it if you are not the server (which is what actually causes the crash, as you don't have any QuakeC to profile). Is such a thing detectable?
      16:03:04 <gb> when I put in a sng, I think I might need nails
      16:03:30 <gb> the fact that only playtesting tells me that probably means that my mind is a sieve

      Comment


      • #4
        True.

        I guess I should have used

        Code:
        if (cls.state != ca_dedicated)
             return;
        actually i think it crashes when it hits
        Code:
         f = &pr_functions[i];
        The svs.maxclients check does work, though, it just completely disables that command if you are connected to a server. But if you are running a listen server then it is useless as well. Currently you can't run a dedicated server on this gl-client.
        www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

        Comment


        • #5
          Yeah, I think it's a good thing to haev for a listen server as well (probably more useful, in fact, as I doubt many people can be arsed to set up a dedicated server just to test). Might be something to ask LordHavoc about, when I get a chance.
          16:03:04 <gb> when I put in a sng, I think I might need nails
          16:03:30 <gb> the fact that only playtesting tells me that probably means that my mind is a sieve

          Comment


          • #6
            Originally posted by R00k View Post
            actually i think it crashes when it hits
            Code:
             f = &pr_functions[i];
            Correct method:
            Code:
            if (!sv.active)
                return;

            Comment


            • #7
              Owned!
              Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

              So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

              Comment


              • #8
                Owned'ed

                Code:
                	if (!sv.active) //LordHavoc
                	{
                		Con_Printf ("not running a local server: aborted.\n");
                		return;
                	}
                www.quakeone.com/qrack | www.quakeone.com/cax| http://en.twitch.tv/sputnikutah

                Comment


                • #9
                  I'm putting this here, even though this is more of a list of stuff I'm adding to ProQuake. I don't want to start another thread.

                  1. Client: Implement Rook's web-based map download from Qrack.

                  Look through cl_parse.c, cl_main.c, client.h and make required changes. Plus add the project files where needed such as curl.h and webdownload .c and .h.

                  Future: allow server to specify sv_curl_url “xxx”
                  2. Client: Ensure latest "DSL fix" version.

                  3. Client: Separate rendering maxfps from server maxfps.

                  Host.c Host_FilterTime holds the clue. Look at _Host_Frame and see what effect allowing client operations to run even if server operations would be skipped due to exceeding the host_maxpfs.
                  4. Convenience: Map, demo, gamedir listing commands.

                  JoeQuake 1862 menu.c in SearchForMaps … see how that works where it also looks in pak files and adapt as a command that lists to console? Beware and stress test again exceeding the console buffer!
                  5. Convenience: auto-compressed demos solution.

                  cls.demorecording = TRUE indicates if a demo is recording and the file handle is cls.demofile; When the end of demo recording occurs, CL_Stop_f is called which closes the file.

                  This is called by CL_Disconnect, which is called by “disconnect” and “quit”

                  in cl_demo.c, implementing this would involve compressing the file upon closure in CL_Stop_f and then after successful compression, deleting the file.
                  6. GL: Single pass video setup; reuse context if possible.

                  Video settings aren’t gamedir specific. They really shouldn’t be written to a config file in that sense. One idea would be to write the file to id1 folder as video.cfg. However this isn’t quite ideal either because it could lead to engine conflict if every engine did it.

                  Anyway, even one decided to use config.cfg, we need to read this value very early on.

                  One way to do this would be to code the cvar values in to the top of the file in comments and have just a single line read from this file, stopping at the first newline character.
                  7. GL: Force gl_ztrick 0 and gl_clear 1 on certain Intels.

                  In vid_wgl.c test against Intel and set a video variable IsIntel : if (strstr( gl_renderer, "intel" )) IsIntel = true;

                  Find instances where gl_ztrick and gl_clear are used and override the values if IsIntel = true, making it ignore the cvar.

                  I have these cvars save to config. I should probably make them not do so.

                  Let’s also hit up R_TimeRefresh_f in gl_rmisc.c and clean up that for Intel too.
                  8. GL: Colormapping of corpses in GL(optional).

                  This is somewhat difficult. I had this somewhat worked out in the past from examining old DarkPlaces from November 2000 (something like build 73) and looking at Quakeworld and thinking.

                  If I recall, CL_parse has part of the solution. I have to check the flow.
                  9. GL: Clear textures on map load (from Rook).

                  Code:
                  /*
                  ================
                  GL_FreeTextures -- BPJ
                  ================
                  */
                  void GL_FreeTextures (void)
                  {
                  	int i, j;
                  
                  	if (gl_free_world_textures.value == 0)
                  	{
                  		Con_DPrintf("GL_FreeTextures: Not Clearing old Map Textures.\n");
                  		return;
                  	}
                  
                  	for (i = j = 0; i < numgltextures; ++i, ++j)
                  	{
                  		if (gltextures[i].texmode & TEX_WORLD)//Only clear out world textures...
                  		{
                  			Con_DPrintf("GL_FreeTextures: Deleting texture %s\n", gltextures[i].identifier);
                  			glDeleteTextures(1, &gltextures[i].texnum);
                  			--j;
                  		}
                  		else if (j < i)
                  			gltextures[j] = gltextures[i];
                  	}
                  
                  	numgltextures = j;
                  }
                  10. GL: Proper water support.

                  Right now in ProQuake if you are half-submerged in water, like GLQuake, it has a crappy looking effect. Modern engines shouldn't have this issue. Make it a cvar just in case there ends up being some speed issue.
                  11. GL: Enable glpro399 dedicated server capability.

                  In gl_model.c and gl_draw.c, there are 3 instances where the code needs changed to support GLQuake as running as a dedicated server. These changes can be found in QIP engine source code. Do a text search for “Nathan Cline” and it will return 7 results like:
                  “if (cls.state != ca_dedicated)”
                  12. Single player: Alpha entity support.

                  Open up JoeQuake 1862 source. He nicely has #IFDEF GLQUAKE around GLQuake only features, and alpha entity support is one of those.

                  Look for U_TRANS

                  We will be changing cl_parse.c, protocol.h, sv_main.c

                  And then find the drawing stuff in gl_rmain.c
                  13. Single player: Centerprint logging option.

                  console.c and cl_parse.c; add the cvar “con_logcenterprint” and default this to 0.

                  If I recall, cl_parse.c is where the action is in detecting the centerprint, SVC_Centerprint or something and console.c has the called display stuffs.
                  14. Single player: Console reload on gamedir change.

                  FitzQuake has W_LoadWadFile (); Draw_LoadPics (); SCR_LoadPics (); Sbar_LoadPics (); called when a new game loads in Draw_NewGame in gl_draw.c

                  Examine that see if we can duplicate for ProQuake.
                  15. Single player: Skybox support, limited.

                  I guess we could try http://www.quake-1.com/docs/quakesrc.org/89.html for starters. But I'd rather use aguirRe's code as model.
                  16. Single player: Work on fog support some more.

                  Look at FitzQuake, DarkPlaces and aguirRe’s engine experiment around. No avoiding this.
                  17. Single player: Possibly Half-Life map loading support.

                  a. We have HL_BSPVERSION stuff in ..b. c. bspfile.hd. d_edge.c (software)e. gl_model.cf. gl_warp.cg. r_model.c (software)h. sv_world.ci. j. Now Half-Life maps texture won't work in stock software Quake. This is because the window itself is set as a 256 color window and Half-Life maps exceed this big time because each texture get's it's own 256 color palette. So probably not r_model.c and probably not d_edge.ck. l. Remember also to think about the hulls (crouching support) ... but not now.



                  18. Single player: Capability of saving multiplayer game.

                  Host.c -> Host_Savegame_f

                  Maybe remove
                  a. if (svs.maxclients != 1)
                  b. {
                  c. Con_Printf ("Can't save multiplayer games.\n");
                  d. return;
                  e. }

                  With an onscreen warning confirmation alerting the player to how this works

                  I thought either aguirRe or FitzQuake supported saving multiplayer games but I’m not seeing evidence of this. Then again, I’m not sure of the version of aguirRe’s I’m looking at.
                  19. Server: External .ent support on server side.

                  QIP requires changes in the X_model.c files.

                  Search for .ENT in case sensitive search. It returns 22 matches. QIP merged most of gl_model.c and r_model.c; I haven’t merged them per se but I’ve actually WinMerge synchronized them
                  20. Server: Low CPU option for ORL.

                  In Host_FilterTime in host.c

                  Code:
                  if (!cls.timedemo && realtime - oldrealtime < 1.0 / pq_maxfps.value)
                   {
                   Sys_Sleep (); // <-- add this line
                   return false;  // framerate is too high
                   }
                  Add a cvar to control this. Code by aguirRe
                  21. Server: Host_Error instead of Sys_Error for server.

                  Look at the differences and compare contrast versus JoeQuake 1862
                  22. Linux: Work on Linux version some more.
                  23. Mac OS X: Finish merge with Windows codebase.
                  24. Mac OS X: Solve key repeats, menu, copy cmd.

                  Copy command might work something like this:


                  a. (void)writeStringToPasteboardNSPasteboard *)pb
                  b. {
                  c. // Copy data to the pasteboard
                  d. [pb setString:string forType:NSStringPboardType];
                  e. }

                  Key repeats? Hmmm. Something in keys.c to avoid re-triggering if the key is already marked as down?
                  25. Mac OS X: Option to disable mouse cursor release in windowed mode.

                  In in_osx.m, take the key_dest == key_game part and turn it in a cvar based conditional
                  26. Mac OS X: make a vid_describecurrentmode equivalent command.

                  a. Windows version does it like this
                  b. /*
                  c. =================
                  d. VID_DescribeCurrentMode_f
                  e. =================
                  f. */
                  g. void VID_DescribeCurrentMode_f (void) {
                  h. Con_Printf ("%s\n", VID_GetExtModeDescription (vid_modenum));
                  i. }
                  j. _
                  k. Maybe we take the resolution, refresh rate and stuff it into a cvar and have this command print it.

                  In OS X, maybe build it from gGLDisplayWidth and gGLDisplayHeight which reads it as such:

                  gGLDisplayHeight = [[gVidDisplayMode objectForKey: (id)kCGDisplayHeight] intValue];

                  Look for refresh1 and refresh2 values?



                  27. Bug: Fix profile command when client (dates to glquake).

                  pr_exec.c ---> PR_Profile_f

                  if (!sv.active) return;
                  28. Bug: Fix "can't use keypad" with international keyboard.

                  Check keys.c and think about the effect of the keypad override stuff I borrowed either from Quake 3 or DarkPlaces. I think that only affects the console, but still …

                  Also come up with a developer scheme “developer 1, developer 100, etc.” to display debug info on this permanently for testing … this is so hard to debug at the moment.

                  Plus document it well.
                  29. Issue: Winquake [but not gl] incompatibility with x64 machines [api ?].

                  Nfi. Maybe at least make a command line parameter to create a log for this to find out where it crashes on x64 machines. Since original WinQuake has this problem as well, it could very well be some sort of x84 API issue?
                  Last edited by Baker; 11-18-2008, 10:51 PM.
                  Quakeone.com - Being exactly one-half good and one-half evil has advantages. When a portal opens to the antimatter universe, my opposite is just me with a goatee.

                  So while you guys all have to fight your anti-matter counterparts, me and my evil twin will be drinking a beer laughing at you guys ...

                  Comment

                  Working...
                  X