Skip to content

Changes to improve performance - #376

Closed
Yamachinima wants to merge 1 commit into
StyledStrike:mainfrom
Yamachinima:Glide-Performance
Closed

Yamachinima wants to merge 1 commit into
StyledStrike:mainfrom
Yamachinima:Glide-Performance

Conversation

@Yamachinima

@Yamachinima Yamachinima commented Oct 20, 2026 •

Copy link
Copy Markdown

Some changes to Glide to lower server and client cost so more vehicles can be driven at once.

Changes:
Network variables are only set when the value actually changes: wheels, steering, brake, engine RPM/throttle and water state. Wheel slip values are rounded so tiny changes don’t get sent.
there is now less garbage in wheel physics, forces are built from numbers instead of new Vectors every tick.
Car tuning values are cached on the server and cleared when they’re edited.
New client convar glide_max_projected_headlights (default 8, 0 = no limit): only the nearest cars get projected headlights. Sprites still draw for every car.
Wheel sounds are only updated when volume or pitch actually changes. Far-away wheels update less often.
Tire and exhaust particles scale with how big they look on screen. Distant cars spawn fewer or none.
Cached sit animation lookups, reused light and sprite tables, sleeping vehicles skip water checks, and no bodygroup work for cars without light bodygroups.

20261020_150706.jpg

@StyledStrike StyledStrike added the enhancement New feature or request label Oct 22, 2026
@StyledStrike

StyledStrike commented Oct 22, 2026 •

Copy link
Copy Markdown
Owner

I think the only thing I will change later is to convert the glide_max_projected_headlights convar to a slider in the Glide settings menu

@nnk000

nnk000 commented Oct 23, 2026

Copy link
Copy Markdown

lmao ai slop request

@nnk000

nnk000 commented Oct 23, 2026

Copy link
Copy Markdown

Changes don't make any sense, source's datatable networking is delta-driven and setting the same value is safe because it will check internally

@Yamachinima

Copy link
Copy Markdown
Author

Yeah I didn't even wanna make this pr but I was asked too, the changes barely do anything at 1-5 cars but actually make a difference when at higher "unrealistic counts" last pr I will ever make dw. I'll just keep future issues to myself from now on and focus on my own stuff

@nnk000

nnk000 commented Oct 23, 2026

Copy link
Copy Markdown

Not speaking for a styled, but in common:
Do not make pull requests that don't make sense because it takes real time to review/approve or test
And do not use LLMs for benchmarks, they lie af

@Yamachinima

Copy link
Copy Markdown
Author

Yeah... im just blindly benchmarking. Sure the networking already avoids sending a value over the internet if it hasn't changed but it still saves work, setting a value even to the same thing makes the game run some code. This only adds up with my 30-50 vehicle stress test. It's a micro optimization

@Yamachinima

Copy link
Copy Markdown
Author

But anyways I hear you, just ignore this pr. It's ai slop

@Yamachinima
Yamachinima deleted the Glide-Performance branch October 23, 2026 22:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants