What is the net_graph?

This is a feature built into the Half-Life Clients files, It's a tool to help the player understand and optimize the in-game performance, the connection to an online server mostly.

Index

How to display the Net Graph - commands the three types.
Net Graph 3 - The most popular. How to adjust.
Net Graph 1 - The default - more detail.
Net Graph 2 - Expert mode.
Reading the Net Graph areas (all types)
Can I adjust the font of the Gold Source Net Graph like Source engine games?

 

How to display the Net Graph - commands the three types.

You will need to open the developer console, in GoldSrc games like Day of Defeat it is a matter of going to your dod\config.cfg file, opening that file with notepad and placing in this line....

"bind "`" "toggleconsole"

I put up the font size there as it's difficult to see the "tilde key", it's above the TAB key and also has this symbol ~. 

So just copy the enlarged text above and paste it into the binds area, save the file.

Open the game and when in the GUI area (where you start the game), press the Titde key ~ and the developer console will open up.

This "developer console" is where you enter commands and read what's going on with your game.

 

To get the Net Graph to display you need to enter this "net_graph 1" and press "Submit" (or the enter key). See the image on the left below...

 

 net graph in console  net graph type 1
 net_graph 1 command in the developer console.  net_graph 1

 

Now you will see the image on the right pop-up.

 

The Net Graph has three types and you need to enter commands and decide what type you like. 

net_graph 1 is a simple graphical type, its for troubleshooting and has a green/red/yellow/blue line graph "Ping" readout .

net_graph 2 is a more fancy graphical type, its for more advanced troubleshooting has the bottom readout like netgraph 1 but also has a adjustable top graph area for packets  

net_graph 3 is the most minimalistic one, good for your current FPS and it's very compact.

 

 net graph type 2  net graph type 3
 net_graph 2... (net_graphwidth "150" applied)  net_graph 3

 

Note: Your net_graph 1, 2 or 3 may not look like mine right now, there are more options for the positioning and display of the graphs.

 

 

Net Graph 3 - The most popular. How to adjust.

net_graph "3" is the command for this type.

The defaults on some monitor and game screen resolutions are problematic.

net_graphpos "1" is the default for basic screen position and is the left side. "2" is the centre and "0" is the right side. 

net_graphwidth "150" is the default for fine tuning the basic position above for Net Graph type 3.

graphheight "64" is the default for positioning height, a value of below "50" it can start to disappear of the screen. Height depends on your game video settings.

 

The below three images show the commands at their defaults for a popular 16:9 aspect ratio 1920 X 1080 game setting if we have selected net_graphpos "1".

 

The Height issue  - The default command is graphheight "64" it can be adjusted. (Middle image)

 

The Width issue (only on some resolutions and net_graphpos "1")

The default command is net_graphwidth "150" it can be adjusted. In Type 1 and 2 this also has other functions.

  • Left image - net_graph "3" with all other commands at the default values. Horrible right?.
  • Middle image - I have adjusted - graphheight "190", that fixed the height over the ammo clip image.
  • Right image - I have adjusted - net_graphwidth "200", that fixed the issue of going off the screen. Allow a bit more so multi digit numbers display! 

 

 type3 defaults  type3 height change  type3 height widthchange
 net_graph "3" - with defaults - net_graphpos "1", net_graphwidth "150", graphheight "64".  net_graph "3" - with defaults altered - net_graphpos "1", net_graphwidth "150", graphheight "190".  net_graph "3" - with defaults altered - net_graphpos "1", net_graphwidth "200"graphheight "190".

 

For most players (with 16:9 aspect ratio and 1920X1080) the best commands would be...

net_graph "3"

net_graphpos "1"

net_graphwidth "200"

graphheight "190"

Use those commands to adjust and record them in a userconfig.cfg. Read how here.

 

Net Graph 1 - The default - more detail.

net_graph "1" for this type.

The default and it takes up more screen space with it's bottom graph area. The defaults on some monitor and game screen resolutions are problematic.

net_graphpos "1" is the default for basic screen position and is the left side. "2" is the centre (best for this one) and "0" is the right side. Recommend net_graphpos "2" only.

net_graphwidth "150" is the default for fine tuning the basic position above for Net Graph type 1. Recommend net_graphwidth "200" or more.

graphheight "64" is the default for positioning height, a value of below "50" it can start to disappear of the screen. Recommend  graphheight "64" or "80".

 

Net Graph 2 - Expert mode.

net_graph "2". The command for this type.

This one is huge. Why you would have this is to trouble shoot issues and they are explained in the next section.

Again like above I recommend you only use this in the centre area.

net_graphpos "1" is the default for basic screen position and is the left side. "2" is the centre (best for this one) and "0" is the right side. Recommend net_graphpos "2" only.

net_graphwidth "150" is the default for fine tuning the basic position above for Net Graph type 1. Recommend net_graphwidth "150" or more 300.

graphheight "64" is the default for positioning height, a value of below "50" it can start to disappear of the screen. Recommend graphheight "64" or "80".

There is a 4th command that is only useful for this type 2 Net Graph. 

For net_graph 2 only, adjust the "scale" or height of the graph area.

net_scale 5 - default, the dotted area is normal.

net_scale 0 - the dotted area is now much taller.

 net scale 5 command  net scale 0 command
 net_scale 5 - default, the dotted area is normal.  net_scale 0 - the dotted area is now much taller.

Its up to you to adjust the width and height.

I certainly wouldn't pick this one for normal as it will produce lag.

 

Reading the Net Graph areas (all types)

How do you read the graph?

You can read your FPS (most only do that) there but there are other things especially with net_graph 1 and 2.

I'm not going to rehash a guide on HL 1 networking as there are excellent guides out there already for this (very old) tool from early 2000. 

I think the best is from Quicksilver (in 2012) you can see that page here.

 

Note the section above for net_graph 2 what are those dots in the image, the colors?

See a part copy of his guide, here are the colors/functions...

 

 reading net graph 2
 How to read the net_graph - Quicksilver 2012.

 

Here is his basic explanation, do read the rest of the article but also keep in mind, this was written in 2012, a time when we all used to spend hours on our connection speed and networks were...well crap back then.

I don't see a lot of people worrying about this in 2023...but it doesn't hurt to read what he has there below this quote....

 

Area 1 is the part above the white separating line.

This area gives you a rough estimation of the size of each packet your client is receiving from the server.
The scale defaults to 5 bytes of data per pixel.

Area 2:
This area shows numeric information about the performance of your computer and its net connection.

The numbers registered are as follows (based on the above snapshot):
As shown, the client is rendering frames at 23.3 frames per second.

The client believes that it has a 78 millisecond round trip message time to the server (this is a latency reading, rather than a pure ping, since it includes processing overhead on both ends).

The last packet the client received ("in") from the server was 31 bytes long.

The average data rate over the last second or so from the server has been 1.30 kilobytes/second.

On the other hand, the last command issued by the client was only 25 bytes long and the client is generating 1.36 kilobytes/second of upstream data.

Area 3:
Below the numeric readout is the well-understood green/red/yellow/blue Ping readout that most users are familiar with.

In particular, the height of the green line indicates how much latency exists in the connection for the specific packet received.

The green lines max out at around 1000 ms of latency, so our player here has a baseline of about 78 ms of latency, but his connection is having problems so there is "Ping Excursion" with "capping" that goes all the way to the maximum value of 1000.

The red dots in the ping line indicate dropped packets (a little hard to see but they are there).

Finally, if the bandwidth choke is active (your rate setting is holding back packets at the server because your connection can't handle them), then the green dot for the next packet you receive will be drawn in yellow instead.

Area 4:
Area four is correlated to how quickly the client is rendering frames.

For each frame rendered, the graph indicates how much interpolation was used in drawing objects in the world.

If you are not getting a sufficient number of server updates (< 10 second) or you drop enough packets, then the client won't be able to interpolate any more and will have to extrapolate instead.

In that case, you'll see the lower part of the graph go above the grayish line (above the dark blue area) and turn yellow to orange / red depending upon how far out of date your data becomes.

Area 5:
The number here is the number of updates per second you are currently requesting from the server.

The default is to receive 20 updates/second from the server.

You can change this value by setting the cl_updaterate CVAR from the console.

Area 6:
This number is the maximum number of command packets you will send to the server per second.

The default is to send up to 30 command packets per second up to the server.

If you are running faster than 30 frames per second, then multiple commands will be put into some packets.

You can change the rate of sending command packets to the server by setting the cl_cmdrate CVAR.

In addition, with each command, we re-send the last few previous movement commands (in case there is packet loss) so that we can keep moving smoothly in the face of minor network problems.

The default number of "backup" commands that we send is 2, but you can change this number by setting cl_cmdbackup to another number.

You can send more than 8 backup commands, but you should note that sending backup commands will increase your outgoing bandwidth usage.

Area 7:
The final area is the light blue and (sometimes) red line at the very bottom of the netgraph.

This line is based on your framerate (FPS) and your cl_cmdrate setting.

For every frame where a command packet is actually send out onto the wire, a light blue dot is placed on the graph.

If commands are accumulated for deferred sending, you'll see a red dot instead, in other words the red dots appear when your client is rendering frames (FPS) faster then you are sending updates to the server.

This could be because you have the cl_cmdrate set too low.

Try setting cl_cmdrate to half your framerate (FPS) to see the effect.

FPS = 60, cl_cmdrate = 30 --> red dots (unable to send requested updates)
FPS = 60, cl_cmdrate = 60 --> no red dots (sending exact updates - best for accuracy)
FPS = 30, cl_cmdrate = 60 --> no red dots (sending extra duplicate updates - wastes uplink bandwidth)

Put very simply, the red dots mean your client isn't updating the server often enough.

This will change from time to time though depending on the map and events, so setting a reasonable cl_cmdrate that doesn't overload your uplink and leaving it is best.

 

The Steam Guide CS 1.6 Rates Guide is a good one to read, this net graph is a fault-finding tool and seeing dod is related to CS 1.6... it should be fine.

As you read you will see how this relates to your "netcode" settings.

 

Here is one for dod... Fps / lag spikes By LiveWire.

 

Deciphering the NetGraph (CS 1.6)

Mouse Twitching and Lag [FIX]

In all of those guides the Net Graph/s will help sort of some feedback on your settings when trying to improve your connection.

 

Can I adjust the font of the Gold Source Net Graph like Source engine games?

The answer is "sort of but yes"... but it has complications you need to be aware of.

 

This is not as easy as the edits in Source engine game files as I have written in a dodbits guide here.

The problem is the netgraph font is governed by a file in Half-Life\valve\resource folder called TrackerScheme.res.

In that file you will find a font setting called "EngineFont"

Sure you can adjust that and it will change the font.

 

But for Day of Defeat it will also adjust the Kills and Deaths fonts and the Target ID function (the health and name text as you point at a friend.)

Likely Counter-Strike 1.6 and other HL1 mods will be the same.

So sure...adjust it and make it thin by adjusting the "weight" (boldness of the font) to "550" and also the "tall" adjustments (to all the different screen resolution heights) making a smaller font.

 changed font

 Changed Net Graph - Kills and deaths - Target ID font

Special HUD Layout image too - (look left lower chopped off reinforcements panel)

 

But... check your other areas in dod that is Kills and Deaths and the Target ID fonts. 

 

INsane. Webmaster.