Sabretooth Posted February 13, 2021 Share Posted February 13, 2021 Do (lua)scripts get loaded, even when they are off? By this i also mean like, if you have 100 lights connected by relays (and they are turned off) Like I have many Fast n Furious lightshows on my vehicle, but they are all locked with a switch I noticed that my game is slower. Now that can be because of some other reason so I thought I could ask it here on the forum. I want to make a ship with lots of funny things like auto sliding doors with flashing lights etc, but ive got the feeling that even they are not in use they will be loaded and slow down the game. In Space engineers, it was like how I wanted. You could install many lights, but turning them off was better for performance. Daphne Jones 1 Link to comment Share on other sites More sharing options...
CptLoRes Posted February 13, 2021 Share Posted February 13, 2021 100 lights = 100 elements that has to be rendered regardless of if light is on or off. This amount of extra work should normally not be a problem, but DU is a strange game.. Link to comment Share on other sites More sharing options...
Daphne Jones Posted February 13, 2021 Share Posted February 13, 2021 Scripts probably don't get loaded if the PB/control unit isn't running. There's nothing to render so no need to load it. And it only needs to load in the client that's running it. If several players are nearby, the game can't predict which one will trigger the script. Elements, yes, have to render. That said, an actual light (lights the surroundings, casts shadows) is more expensive than a light that's turned off. Link to comment Share on other sites More sharing options...
joaocordeiro Posted February 13, 2021 Share Posted February 13, 2021 8 hours ago, Sabretooth said: Do (lua)scripts get loaded, even when they are off? By this i also mean like, if you have 100 lights connected by relays (and they are turned off) Like I have many Fast n Furious lightshows on my vehicle, but they are all locked with a switch I noticed that my game is slower. Now that can be because of some other reason so I thought I could ask it here on the forum. I want to make a ship with lots of funny things like auto sliding doors with flashing lights etc, but ive got the feeling that even they are not in use they will be loaded and slow down the game. In Space engineers, it was like how I wanted. You could install many lights, but turning them off was better for performance. Switches and other elements can only "change" status if player's computer is near-by calculating those changes. This calculation has to be triggered. Can be triggered by a proximity detector. Programing boards run on the computer of the player that activated them. If that player goes away(3-4km) the programing board stops. The only thing that can "run" endlessly without being active is html on the screens. Any player entering "screen rendering range" will load and render the html. Some SVGs and GIFs can give the impression of "running" actions. If no player is within less then 4km from the construct and as actively activated stuff in the construct, that construct will be 100% static, represented only by a static record on the DU database. Making stuff like automated industry or drone craft useless. Unless there is a controlling player nearby. Link to comment Share on other sites More sharing options...
joaocordeiro Posted February 13, 2021 Share Posted February 13, 2021 Ps: transmitters can be used to activate programing boards. So, in close proximity you could send a transmission from your ship to your base to open a gate or turn on a light. Note: It only works at close range(check transmiters and receivers) Lua code to do this is not very intuitive(but i tested this with success) Security issues appear because you are using a public medium that every one can read and write to. So anyone can send the same signal you are sending and activate your stuff. (maybe rdms can help) This forum should have some lua examples on how to do this. And discord has a channel to ask questions about lua. Link to comment Share on other sites More sharing options...
Sabretooth Posted February 13, 2021 Author Share Posted February 13, 2021 So if I read your answers correctly, it is more the amount of elements that need loading than the fact that I have a blinking billboard of xs lights but its turned off. So the billboard is heavy-loading-stuff, even when its off I think now, that even when not in sight, elements load. And that would be too bad, because the inside of a ship is most of the time not seen by anybody. The game Subnautica had a similar problem: elements always loaded in, no matter how far away you where. So a big base would slow down your pc, even when you would be far out of visible range of the objects. Link to comment Share on other sites More sharing options...
Hazaatan Posted February 15, 2021 Share Posted February 15, 2021 On 2/13/2021 at 12:14 AM, Sabretooth said: In Space engineers Stop dude. Don't do that to yourself, you will go mad. This game is how Space engineers was like at the beginning... a year+ away form optimization. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now