Bug 4345 - cl_drawPing and cl_drawFPS (bonus: cl_drawClock)
Status: RESOLVED WONTFIX
Alias: None
Product: ioquake3
Classification: Unclassified
Component: Misc
Version: GIT MASTER
Hardware: All All
: P3 normal
Assignee: Zachary J. Slater
QA Contact: ioquake3 bugzilla mailing list
URL:
Depends on:
Blocks:
 
Reported: 2009-11-18 10:52 EST by tinkah
Modified: 2011-02-06 22:49:43 EST
1 user (show)

See Also:



Description tinkah 2009-11-18 10:52:19 EST
PNG image of the result in-game: http://i214.photobucket.com/albums/cc17/arxeio/pingfps-1.png

patch: http://www0.org/urt/pingfps.diff

Consider this as a demonstration of the concept and not a code showcase since my coding skill is 'hobbyist' at best. But if you like it as it is, fine (I'd welcome any improvements).





The main point of this is having a clear view of deviation of ping without having to rely solely on visual indicators (lag meter) or the single number of ping. Max spike and avg Spikes are utilized.

Standard deviation is calculated for each interval used which can be a more down to earth approximation of deviation. Standard deviation is a trusted statistical indication of variance of data.

Equivalent results come from cl_drawFPS but for FPS. This time there's no 'fps lag meter' to compliment it.

2 intervals can be used for each. 

vars:
cl_drawping/fps
cl_drawping/fpsfontsize //size on screen
cl_drawping/fpsfirst/secondinterval // setting intervals in sec
cl_drawping/fpsposx/y //positioning on screen


It also has a cl_drawClock which I didn't remove for this patch (file is part of a little fun project at http://forums.urbanterror.net/topic/18972-optimized-engine-exe-a-build-of-ioquake3-to-run-urt-directly/)

cl_drawClock //HH:MM on top of screen
cl_drawClockshowseconds //also seconds
Comment 1 tinkah 2009-11-19 21:55:55 EST
this now also has a snaps/second (serve->client) meter

shown here: http://i214.photobucket.com/albums/cc17/arxeio/sps-1.png

renewed patch: http://www0.org/urt/pingsnapsfps.diff

minor differences in rest (e.g. milliseconds time is already handled in cls, no point syscalling it).
Comment 2 Thilo Schulz 2011-02-06 22:49:43 EST
I'm sorry that I have deny this, but this code adds a shitload of cvars and well, frankly, it's much more code to be maintained for little benefit. However, this would be something for the patch section on www.ioquake3.org