wiremod / wire

Garry's Mod add-on that allows users to wire up components in order to make more elaborate automatic and user-controlled contraptions.
http://www.wiremod.com
Apache License 2.0
554 stars 331 forks source link

EGP delayed #1736

Closed deathking61 closed 5 years ago

deathking61 commented 6 years ago

ok so i have a simple screen e2 (for a door lock e2) and when i use it the EGP randomly gets delayed why?

thegrb93 commented 6 years ago

EGP uses a queue for its networking which can be slow

deathking61 commented 5 years ago

they should find a way to actually make it a little faster and it also seems there is a delay in using an EGP hud for a speedometer why?

thegrb93 commented 5 years ago

It's sending rendering logic from server to client. It is slow and I don't think that can be improved.

https://github.com/wiremod/wire/blob/976f6ed9d2226367e842e95394c2079f7bcb395e/lua/entities/gmod_wire_egp/lib/egplib/queuesystem.lua

Starfall would give you better results since you can have direct control to render on client http://thegrb93.github.io/StarfallEx/libraries/render.html

deathking61 commented 5 years ago

i understand that but i cant use Starfall as it doesn't have functions i need and its (to me ) a pain to code with

thegrb93 commented 5 years ago

You can report that to the github there, or the discord server will be happy to help too.

deathking61 commented 5 years ago

well, I'm mainly stating this as Starfall has no delay but egp does? I believe EGP should have some "work done" so it to has less of a delay. cause I know if plenty of people who have told me that egp would be better if not for the delay. now i know why it does, but don't you think we should have it lag less behind?

bigdogmat commented 5 years ago

You have to understand that EGP is controlled server side and networked to every client. Starfall runs directly on the client, no networking involved.

Aside from the delay in the networking itself (ping), there's also intentional delay such that we

  1. don't overflow (crash) the client with updates
  2. don't cause lag by the amount of updates
  3. don't lag the server with the amount of updates being sent

Starfall doesn't have to deal with any of this.

I haven't looked into how the delay is introduced, maybe it could be done better. However there's always gonna be a fair amount of delay.

Divran commented 5 years ago

As others have stated already, the delay in egp is intentional to prevent people from lagging servers and players with it. You can disable the delay with a convar but that will absolutely completely destroy your FPS (depending on how you use egp after), so I wouldn't recommend it.

EGP is made for static content and menus, nothing more. If you need lots of FPS for games and the like, your only two options are GPU and Starfall.