Skip to content

Add wire_digitalscreen_draw_rate and wire_digitalscreen_net_bandwidth convars - #3679

Open
AlexALX wants to merge 7 commits into
wiremod:masterfrom
AlexALX:digitalscreen-convar
Open

Add wire_digitalscreen_draw_rate and wire_digitalscreen_net_bandwidth convars#3679
AlexALX wants to merge 7 commits into
wiremod:masterfrom
AlexALX:digitalscreen-convar

Conversation

@AlexALX

@AlexALXAlexALX commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

This convar multiply all digital screen limits in sync, so wire_digitalscreen_rate 10 make it work exactly 10x faster. Fixes#3670

This convar multiply all digital screen limits in sync, so wire_digitalscreen_rate 10 make it work exactly 10x faster.
@AlexALX

Copy link
Copy Markdown
ContributorAuthor

Tell me if you don't like this way, and then i'll need create 4 separate convars for it.

@AlexALX

AlexALX commented Jul 31, 2026

Copy link
Copy Markdown
ContributorAuthor
изображениеизображение

With wire_digitalscreen_rate 10 its possible to play GIF simple animations!

Without that convar its barelly possible to display anything...

And since by default nothing changed, and digital screen keep working as-is, it might be good option to include, then users will decide change or not.

@Astralcircle

Copy link
Copy Markdown
Contributor

I guess you should limit it's max value to something like 10 because bigger values can probably cause net overflows

local maxBandwidth = defaultMaxBandwidth

local function updateBW()
dsRateValue = dsRate:GetFloat()

@thegrb93thegrb93Jul 31, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This won't get the updated value. Need to use function params. updateBW(cvar, old, new) new = tonumber(new) or default

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:Get* functions already return updated value in change callbacks

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Did gmod devs fix that? Cuz I did a refactor recently to get around that issue.

@AlexALX

Copy link
Copy Markdown
ContributorAuthor

I guess you should limit it's max value to something like 10 because bigger values can probably cause net overflows

Hm, then i guess better to make two convars, one for net limit, second for draw limit. netrate / drawrate with bit different values. or not sure, will do some tests bit later

wire_digitalscreen_draw_rate - purelly for draw rate speed
wire_digitalscreen_net_bandwidth - set global bandwidth limit, individual devices always have 50% of global rate
@AlexALX

Copy link
Copy Markdown
ContributorAuthor

So i did split this into two convars how:

wire_digitalscreen_draw_rate - purelly for draw rate speed
wire_digitalscreen_net_bandwidth - set global bandwidth limit, individual devices always have 50% of global rate

@AstralcircleAstralcircle left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Clamp convar max value and minimum value instead of using math.Clamp

@AlexALXAlexALX changed the title Add wire_digitalscreen_rate convarAdd wire_digitalscreen_draw_rate and wire_digitalscreen_net_bandwidth convarsAug 10, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Digital Screen redering are way slow after new limits

3 participants

@AlexALX@Astralcircle@thegrb93