Announcement

Collapse
No announcement yet.

Custom HUD with CSQC

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

  • Originally posted by lucky88shp View Post
    How do I use this? I extracted the "src' folder in the ID1 folder and nothing happens...I apologize for being a noob!
    hello lucky88shp, get fteqccgui.exe and place it in "src" folder, you need to compile the code
    the invasion has begun! hide your children, grab the guns, and pack sandwiches.

    syluxman2803

    Comment


    • Originally posted by nahuel View Post
      hello lucky88shp, get fteqccgui.exe and place it in "src" folder, you need to compile the code
      Thanx man...that works!

      Comment


      • HUDv4.64 : This mod will now automatically set proper vid_conheight value to match screen resolution aspect ratio and you can adjust HUD/MENU size with [ ] keys.
        New 16:9 screens with stretched HUD keep appearing... Now you don't have to be aware of vid_conwidth and vid_conheight cvars existence to adjust them.

        *** The rest is directed at coders/modders ***
        Anyone who is making any kind of csqc mod is afected by this “finale” issue, probably to handle it we only need something like this:
        Code:
        if (finale || intermission) 
        { R_SetView(VF_ORIGIN, pmove_org); R_SetView(VF_ANGLES, player_angles); }
        DP csqc implementation lacks ( or I failed to find info about them ) “finale” and “player_angles” buildins. Maybe one of the engine coders could add them to darkplaces.

        Other solution may be to send from ssqc this info in a form of a stat or shared entity. I've failed to understand how to properly use stats, or share entities.
        Hint: maybe a good place to detect finale in ssqc can be in client.qc → PlayerPostThink: if (self.view_ofs == '0 0 0') return; // intermission or finale
        Keep in mind workaround we are using now for regular intermission screen ( follow link at the top of this post ).

        I gave up on fixing Mission Packs “finale” camera issue. I've wasted more time it was worth already For someone less ignorant it can be 10 min mod though...
        Last edited by _Smith_; 07-10-2012, 10:02 AM.
        Quake HD: Embrace the decline and have some guilty pleasure with it, or join a club for monocled gentlemen at quaddicted and play Quake the way it's meant to be played.

        Comment


        • nice additional feature smith. its odd that DP doesnt have automatic hud aspect ratio adjustment nor hud sizing automatically but only through cvar, nor settable in the menu. it was only recently that i found out how to use the con_width and con_height cvars, and im sure most people dont know at all how to fix the aspectratio prob with the hud and how to scale it.

          this feature makes having to use those cvars a thing of the past, thanx a lot!


          its a feature that shouldve been implented by someone ages ago. quite surprised nobody bothered to implent it into quake before
          .
          are you curious about what all there is out there in terms of HD content for quake?
          > then make sure to check out my 'definitive' HD replacement content thread! <
          everything that is out there for quake and both mission-packs, compiled into one massive thread

          Comment


          • case svc_finale:
            cl.intermission = 2;
            <centerprint handling>
            break;
            check the intermission global's actual value, its not just a boolean.
            at least in QW/H2, not sure about in DP.

            the local player's angles that are sent to the server can be overridden via 33 (vf_cl_viewangles, technically not a viewflag, but accessed that way regardless).
            QuakeWorld has an explicit origin/angles, so the default VF_ORIGIN/VF_ANGLES is fine in that case, no need to override them at all. For NQ, you can achieve the same thing by just clearing .SendEntity on players when intermission/finale starts.
            To clarify: if your mod is csqc-only, using vanilla ssqc, you don't need to change VF_ORIGIN or VF_ANGLES at any point as the engine will reset it to a default value in clearscene(). if you do have cs stuff in your ssqc, then clear the SendEntity field to __NULL__ (or set to the value of world.SendEntity if you're not using fteqcc) and the engine's default interpolation etc can do its job properly just as it would without csqc.
            Some Game Thing

            Comment


            • My experience with coding is high school programming course. I hadn't written a single line of code since then until my silly qc mods now, so don't expect I'll understand much
              There are other people who use this mod, or are making their own csqc for DP, who know a lot more than me like Seven, Cobalt, Nahuel, Dresk...
              I wanted to encourage them to bite into this, since I gave up. Thank you Spike for your answer maybe they will make something out of it, I can't. Maybe I'll try again later.

              This mod is for DP and we are facing DP specific issue probably. It happens only when csprogs.dat is loaded. Anyone using csqc with DP is affected.
              Once when intermission or finale starts, DP by default freeze camera position and angles. For example you'll see a slipgate behind intermission stats on e1m1.
              I was using fteqccgui. There is source of this mod included in the download.

              I've fixed regular intermission view by delaying in ssqc WriteByte (MSG_ALL, SVC_INTERMISSION); by 0.1 sec in execute_changelevel function.
              So DP draws at least one more frame using intermission spot position and angles before it freeze them. It is the only change in ssqc so I don't have any cs stuff in my ssqc.
              It doesn't work for finale sequences. My half working walk around for Quake finale can be found in csqc main.qc, Mission Packs finales are screwed completely.

              Pseudo code from my previous post could work probably, it contains two fake placeholders “finale” and “player_angles” they need to be filled with proper info. We need either:
              - Info on how to check for finale and how to access player angles from csqc in DP, alternatively how to unload csqc while in finale or intermission,
              - If not possible, then someone to add such buildins to DP csqc implementation, or change how DP handle by default intermission and finale with csqc,
              - If not possible, then someone to modify ssqc and send this info from ssqc to csqc,
              Quake HD: Embrace the decline and have some guilty pleasure with it, or join a club for monocled gentlemen at quaddicted and play Quake the way it's meant to be played.

              Comment


              • so to get this straight:
                when in intermission/finale, clearscene() sets VF_ORIGIN to the last frame when intermission was not set? resulting in the view staying at the slipgate when the player's entity it moved to the intermission spot?

                tried DP_CSQC_QUERYRENDERENTITY?
                if (intermission)
                {
                viewpos = getentityvec(player_localentnum, E_ORIGINANDVECTORS);
                viewang = vectoangles2(v_forward, v_up);
                R_SetView(VF_ORIGIN, viewpos);
                R_SetView(VF_ANGLES, viewangles);
                }
                Obviously that's a DP extension, so don't try this in FTE/other engines.
                Basically, ssqc moves the player (even in qw actually), the local player is always updated even if they have no model set, I hope. So the client code is always updating that entity, and thus can always be queried for its position.
                I've not tested this, and its possible that dp skips calcuating the origin/vectors because its the player/invisible.
                But its one possibility.
                It should normally still be updated, for mirrors etc.

                for the mission packs, you can query VF_ORIGIN, and compare that against the DP_CSQC_QUERYRENDERENTITY position. a big discrepancy = intermission or finale
                Some Game Thing

                Comment


                • Originally posted by Spike View Post
                  so to get this straight:
                  when in intermission/finale, clearscene() sets VF_ORIGIN to the last frame when intermission was not set? resulting in the view staying at the slipgate when the player's entity it moved to the intermission spot?
                  Yes, this is how I understand this.

                  I'll try what you wrote tomorrow, it's late now.
                  Quake HD: Embrace the decline and have some guilty pleasure with it, or join a club for monocled gentlemen at quaddicted and play Quake the way it's meant to be played.

                  Comment


                  • This is how it looks now in v4.65:
                    if (intermission)
                    {
                    viewpos = getentityvec(player_localentnum, E_ORIGINANDVECTORS);
                    viewang = vectoangles(v_forward + v_up);
                    R_SetView(VF_ORIGIN, viewpos);
                    R_SetView(VF_ANGLES, viewang);
                    if (mapname == "maps/end.bsp")
                    {
                    viewang = vectoangles(v_forward);
                    R_SetView(VF_ANGLES, viewang + '-40 0 0');
                    //R_SetView(VF_ANGLES, input_angles);
                    //this gives free mouse look I've used it previously
                    }
                    }

                    vectoangles2(v_forward, v_up) did not set proper angles, but vectoangles(v_forward + v_up) did.
                    It works with vanilla qc, delying writebyte intermission in ssqc is not necessary anymore.
                    Unfortunately finale angles were still incorrect, but I've hardcoded something as you can see above and for Quake end.bsp issue is solved.

                    At this point I would be fully satisfied with something like this, if possible ( I guess it is not ) :
                    void() CSQC_Init = { if ( (mapname == "maps/hipend.bsp") || (mapname == "maps/R2M8.bsp") ) CSQC_Unload(); }

                    As for checking discrepancy between vf_origin and player entity origin, I've tried something that did not worked, it was always true
                    discrepancy = getentityvec(VF_ORIGIN, E_ORIGIN) - getentityvec(player_localentnum, E_ORIGIN);
                    if ((fabs(discrepancy_x) > 100) || (fabs(discrepancy_y) > 100) || (fabs(discrepancy_z) > 100)) finale = 1;
                    Last edited by _Smith_; 08-09-2012, 04:31 AM.
                    Quake HD: Embrace the decline and have some guilty pleasure with it, or join a club for monocled gentlemen at quaddicted and play Quake the way it's meant to be played.

                    Comment


                    • getentityvec(VF_ORIGIN = bug, which would explain why it would always appear true.
                      getpropertyvec(VF_ORIGIN) should give better results.

                      with vectoangles2, you might need to negate the pitch angle (angle_x = -angle_x) (some old quake software rendering bug that noone can kill).
                      adding forward and up makes no sense.


                      cl_nocsqc 1; restart
                      not a good idea... you can't reset that cvar on the new map.
                      Some Game Thing

                      Comment


                      • hud_v4.7 Thanks a lot Spike for fixing this issue for us !!! I'll sleep well this night

                        Final fix for intermission and finale views in DP with csqc: In CSQC_UpdateView ( source included with mod contains required buildins and defs )
                        Code:
                        discrepancy = getpropertyvec(VF_ORIGIN) - getentityvec(player_localentnum, E_ORIGIN);
                        if ((fabs(discrepancy_x)>100)||(fabs(discrepancy_y)>100)||(fabs(discrepancy_z)>100)) 
                        finale = 1;
                        if (finale) 
                        {
                        	viewpos = getentityvec(player_localentnum, E_ORIGINANDVECTORS);
                        	viewang = vectoangles2(v_forward, v_up);
                        	viewang_x = - viewang_x;
                        	R_SetView(VF_ORIGIN, viewpos);
                        	R_SetView(VF_ANGLES, viewang);
                        }
                        Last edited by _Smith_; 07-11-2012, 06:00 PM.
                        Quake HD: Embrace the decline and have some guilty pleasure with it, or join a club for monocled gentlemen at quaddicted and play Quake the way it's meant to be played.

                        Comment


                        • yay thanx a million spike!

                          im so glad the finales cam issues when using this hud are finally fixed
                          .
                          are you curious about what all there is out there in terms of HD content for quake?
                          > then make sure to check out my 'definitive' HD replacement content thread! <
                          everything that is out there for quake and both mission-packs, compiled into one massive thread

                          Comment


                          • HUDv4.71

                            I've finally handled key binds in civilised manner. I am sorry it took so long
                            Entries to keybinds table will be added automatically. Binds you already have in use won't be overwrited though.
                            In such case you'll have to bind them manually to another key using regular console bind command ( details in the readme ).

                            You can now switch between my and Nahuel's layout versions in-game, layout and compass states will be preserved between sessions, without autoexec.cfg edits.
                            Two changes to my version of custom layout: icons position changed a bit and it will adjust to be just above fps/date/time every frame now.
                            Quake HD: Embrace the decline and have some guilty pleasure with it, or join a club for monocled gentlemen at quaddicted and play Quake the way it's meant to be played.

                            Comment


                            • Originally posted by _Smith_ View Post
                              HUDv4.71

                              I've finally handled key binds in civilised manner. I am sorry it took so long
                              Entries to keybinds table will be added automatically. Binds you already have in use won't be overwrited though.
                              In such case you'll have to bind them manually to another key using regular console bind command ( details in the readme ).

                              You can now switch between my and Nahuel's layout versions in-game, layout and compass states will be preserved between sessions, without autoexec.cfg edits.
                              Two changes to my version of custom layout: icons position changed a bit and it will adjust to be just above fps/date/time every frame now.
                              Thread Updated
                              the invasion has begun! hide your children, grab the guns, and pack sandwiches.

                              syluxman2803

                              Comment


                              • Originally posted by _Smith_ View Post
                                Binds you already have in use won't be overwrited though
                                with your last update the game keeps binding R to compass, while i have that key already bound to another action,
                                and every time i start darkplaces it rebinds the R-key again, and i have to open console to bind it back to what i want it to do

                                which is seriously annoying, i dont want to be forced to use that key for the compass,
                                and having to rebind it again and again and again every time i start darkplaces

                                could you please fix that?
                                cuz this is seriously annoying
                                .
                                are you curious about what all there is out there in terms of HD content for quake?
                                > then make sure to check out my 'definitive' HD replacement content thread! <
                                everything that is out there for quake and both mission-packs, compiled into one massive thread

                                Comment

                                Working...
                                X