Recognized Reduce Rail Lag - by setting rail speed to 0

    Benevolent27

    Join the Dark Side
    Joined
    Aug 21, 2015
    Messages
    585
    Reaction score
    327
    • Purchased!
    So basically, on one of my ships I had docked a bunch of plate entities to my ship, and then horrendous, horrendous lag happened. I noticed that the plates were jittering back and forth. I've noticed this on other docked entities too. I was able to solve the issue by using a rail speed controller set to 0 speed and connecting it to all the individual rails. So basically my suggestion is to set all rail basic blocks to 0 speed when an entity is attached and there's nowhere for it to go. I think this is probably one of the biggest causes of lag with ships that have a lot of docked entities. It's doing a lot of collision detection it really doesn't need to do. If this is implemented, I believe it would reduce lag quite a bit.

    That is, till the docked entities are blown off. Then of course insanity happens. lol
     
    Joined
    Jul 24, 2013
    Messages
    1,326
    Reaction score
    2,096
    • Master Builder Gold
    • Councillor 2 Gold
    • Video Genius
    great idea,not sure how Schema handles this currently,this could be good
     
    Joined
    Apr 25, 2015
    Messages
    243
    Reaction score
    27
    • Purchased!
    As a additional idea to this concept how about Rail Speed Controllers *default* to zero speed ie: setting a rail controller next to a rail makes that rail speed zero without any activators. Adding activators would work as normal ie: 1 activator on= 100%.

    Not only would this reduce the blocks required but maybe help with the ever increasing server logic load by *not* needing an activator AND Rail Speed Controller for every single Rail Basic used for static docking.
     

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    I recommend sacrificing a BlockID to have a 0-speed rail hardpoint block in addition to the regular rail blocks. To sufficiently differentiate them from rails, maybe increase the max block count/mass that can be docked to a hardpoint, and maybe change the HP and armor value slightly.

    This way, nothing gets broken, and you are free to replace rail blocks with rail hardpoints. Since docking points are normally exposed, they will be nominally easy to replace.
     
    • Like
    Reactions: Exozen and faiyde
    Joined
    Feb 25, 2016
    Messages
    1,362
    Reaction score
    268
    I like the idea of a hardpoint. Perhaps this can be as tough as advanced armor, but incapable of movement.
     

    Benevolent27

    Join the Dark Side
    Joined
    Aug 21, 2015
    Messages
    585
    Reaction score
    327
    • Purchased!
    I recommend sacrificing a BlockID to have a 0-speed rail hardpoint block in addition to the regular rail blocks. To sufficiently differentiate them from rails, maybe increase the max block count/mass that can be docked to a hardpoint, and maybe change the HP and armor value slightly.

    This way, nothing gets broken, and you are free to replace rail blocks with rail hardpoints. Since docking points are normally exposed, they will be nominally easy to replace.
    I like this idea as well, though regular rail could still have 0 speed when there's nowhere for an entity to go. The speed would, of course, resume to normal if a block next to it changed to be a pathway for whatever is on the rail to move. This would also fix all existing ships, and would not require anybody to change anything.
     

    Criss

    Social Media Director
    Joined
    Jun 25, 2013
    Messages
    2,187
    Reaction score
    1,772
    • Master Builder Bronze
    • Video Genius
    • Competition Winner - Stations
    I must say, if that is all it takes to reduce rail lag then so be it, I say make this a thing. However, from my limited coding standpoint I can see why it isn't a thing just yet. I will bring this up with the others to see if it is indeed viable.
     
    • Like
    Reactions: Benevolent27

    DrTarDIS

    Eldrich Timelord
    Joined
    Jan 16, 2014
    Messages
    1,114
    Reaction score
    310
    I recommend sacrificing a BlockID to have a 0-speed rail hardpoint block...
    so, a turret axis block?
    ...help with the ever increasing server logic load by *not* needing an activator AND Rail Speed Controller for every single Rail Basic used for static docking.
    you know you can c->v a single contoleer/activator combo for all the zero-speed rails at once, right? (or use a turret axis)
     

    Benevolent27

    Join the Dark Side
    Joined
    Aug 21, 2015
    Messages
    585
    Reaction score
    327
    • Purchased!
    so, a turret axis block?
    you know you can c->v a single contoleer/activator combo for all the zero-speed rails at once, right? (or use a turret axis)
    I have considered a turret axis, but the problem is if you dock it and move the entity even a little, it will mis-align the entity to your ship, being especially problematic for entities which are long. I know I can "reset turrets," but what if I have docked ships to the main ship? Do I really want to use a rail that spins? This may be another solution to using a rail speed controller, but why not optimize the code anyhow? As always though, you do have useful suggestions! I still build a lot of my ships using a lot of your suggestions. :) I will consider the rail turret axis as an alternative solution to the rail speed controllers for now.

    Edit: Oh by the way, if you want to hop on, I'd like to show you some of the ships I built using your center mounting of turrets.
     

    Valiant70

    That crazy cyborg
    Joined
    Oct 27, 2013
    Messages
    2,189
    Reaction score
    1,167
    • Thinking Positive
    • Purchased!
    • Legacy Citizen 4
    The jitter is a bug. It would be better to debug than add a feature for a workaround.
     

    Benevolent27

    Join the Dark Side
    Joined
    Aug 21, 2015
    Messages
    585
    Reaction score
    327
    • Purchased!
    The jitter is a bug. It would be better to debug than add a feature for a workaround.
    Well, let's say this is a bug. If the entity has nowhere to go because it is placed on an individual basic rail, wouldn't the fix be to set the rail speed to 0 till a block-update occurs that would allow movement anyhow? I can tell you right now that a 900k ship I had (which has about 80 docked entities) was extremely laggy till I used rail speed controllers on all the basic rail docked entities. Now it has virtually no lag (that is, till it gets damaged and entities start popping off, lol).
     
    • Like
    Reactions: nightrune
    Joined
    Jan 19, 2014
    Messages
    13
    Reaction score
    1
    • Legacy Citizen
    If someone that has a rail laggy entity would mind testing for me. Attach a activation module to the last block in the rail, run that out to a button thats touching a rail that is upside down in relation to your main rails facing, then run that button back to the last rail block. It will flip the rail upside down when your entity moves onto that block, which halts the entity completely. I'm just not sure if it works as a proper workaround as I don't have any ships that have caused me noticeable lag when the rails are above 0 speed.
     
    Last edited:

    Ithirahad

    Arana'Aethi
    Joined
    Nov 14, 2013
    Messages
    4,150
    Reaction score
    1,330
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen 8
    If someone that has a rail laggy entity would mind testing for me. Attach a activation module to the last block in the rail, run that out to a button thats touching a rail that is upside down in relation to your main rails facing, then run that button back to the last rail block. It will flip the rail upside down when your entity moves onto that block, which halts the entity completely. I'm just not sure if it works as a proper workaround as I don't have any ships that have caused me noticeable lag when the rails are above 0 speed.
    I don't recommend this, as it may in future updates, or due to bugs, or whatever... result in your entities all spontaneously undocking. This is not something Schema's coded for, I don't think, so expect issues.