Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert Lua HUD identifiers to a byte when sending over the network #18

Closed
squeek502 opened this issue Oct 21, 2014 · 3 comments · Fixed by #123
Closed

Convert Lua HUD identifiers to a byte when sending over the network #18

squeek502 opened this issue Oct 21, 2014 · 3 comments · Fixed by #123

Comments

@squeek502
Copy link
Member

Something that has been discussed elsewhere.

See: https://github.com/fortressforever/fortressforever/blob/beta/game_shared/ff/ff_utils.cpp#L831

No reason to send the entire string; the client has no use for it other than to identify which HUD element to update. A byte is sufficient because there is already a hard limit defined of 128 HUD elements.

@AfterShockFF
Copy link
Member

An easy different thing to do would be to reduce all the identifier calls down to 1 character strings. We could easily have a lookup to convert between the long hud identifier names and short 1 character identifiers, in lua. This wouldnt require any code changes, but i'm not too good with lua so i dont know the exact syntax to use for this.

@AfterShockFF
Copy link
Member

Looks like other lua calls could be improved too, such as FF_LuaHudTimer, AddHudTextToAll

@AfterShockFF
Copy link
Member

Squeek and I have been playing. see #123

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

Successfully merging a pull request may close this issue.

3 participants