[hud] new function: fpsmeter
Hi,
sometimes the fps number looks good, but the game still feels laggy. To display this kind of fps-lag I wrote a little function, that shows a history of frame times and paints the irregular frames in yellow or red.
example:

in this picture you can see a few things:
1. there are two graphs. there is no difference between them, except one is bigger.
2. the green line represents the average frame time.
3. fps-jitter (single high frame times in red)
4. very high frame time when firing the gun, followed by a few frames with very low frame time.
example hud code:
patch for cg_hud.c
sometimes the fps number looks good, but the game still feels laggy. To display this kind of fps-lag I wrote a little function, that shows a history of frame times and paints the irregular frames in yellow or red.
example:

in this picture you can see a few things:
1. there are two graphs. there is no difference between them, except one is bigger.
2. the green line represents the average frame time.
3. fps-jitter (single high frame times in red)
4. very high frame time when firing the gun, followed by a few frames with very low frame time.
example hud code:
setColor 0,1,0,1
setScale #DEFAULTSCALE
setCursor #WIDTH - 5, 30
setAlign #RIGHT, #TOP
setScale #NOSCALE
setSize 100, 60
drawFPSMeter
patch for cg_hud.c
Seems pretty useful for statjunkies out there. Personally I like a
very uncluttered screen :D

