Skip to content

Conversation

@L3-M
Copy link

@L3-M L3-M commented Sep 5, 2025

This change implements Latency Counter (left), FPS Counter (left), and FPS Limit (left) in Generals and Zero Hour.
They are enabled by default with a size of 8 and positioned before (to the left of) SystemTime, replicating GenTool implementation.
The following options have been added:

NetworkLatencyFontSize = 8
RenderFpsFontSize = 8

They can be styled and repositioned by adding the relevant fields to the InGameUI.ini data file.

Example:

  • In a Network Game:
    1920x1080Network

  • In Menus:
    1920x1080Menu

TODO

  • Replicate in Generals

@Caball009 Caball009 added Enhancement Is new feature or request Minor Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour labels Sep 5, 2025
Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation for positioning looks overcomplicated. It needs to be simplified.

@L3-M
Copy link
Author

L3-M commented Sep 6, 2025

Positioning code simplified.

@L3-M
Copy link
Author

L3-M commented Sep 8, 2025

Applied all suggestions.

Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks very promising.

@L3-M
Copy link
Author

L3-M commented Sep 24, 2025

Addressed all comments and rebased onto main.

@L3-M
Copy link
Author

L3-M commented Sep 25, 2025

Tweaked.

@L3-M L3-M force-pushed the show-latency-fps branch 2 times, most recently from a4d64cb to 8dfbe45 Compare September 26, 2025 19:27
@L3-M
Copy link
Author

L3-M commented Sep 27, 2025

Tweaked.

Copy link

@xezon xezon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be replicated to Generals.

@L3-M
Copy link
Author

L3-M commented Sep 28, 2025

Replicated to Generals.

@xezon xezon changed the title feat: Implement Latency counter FPS counter and FPS Limit feat(ui): Implement simple Latency and FPS display Sep 30, 2025
@xezon xezon merged commit ca90e3d into TheSuperHackers:main Sep 30, 2025
18 checks passed
@L3-M L3-M deleted the show-latency-fps branch October 1, 2025 03:15
@ElTioRata
Copy link

I thought this could be disabled but setting all 4 values to 0 just crashes the game. 1 is the lowest value.

@xezon
Copy link

xezon commented Nov 3, 2025

Please create bug report.

@L3-M
Copy link
Author

L3-M commented Nov 3, 2025

I thought this could be disabled but setting all 4 values to 0 just crashes the game. 1 is the lowest value.

Looks like to crash only when RenderFpsFontSize is set to 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Enhancement Is new feature or request Gen Relates to Generals Minor Severity: Minor < Major < Critical < Blocker ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants