Docking ships with turrets vs. framerate

    Joined
    Sep 5, 2013
    Messages
    527
    Reaction score
    109
    • Legacy Citizen 4
    • Community Content - Bronze 2
    • Purchased!
    There seems to come a tipping point, and it doesn't take long to reach, at which time it becomes nearly impossible to dock a ship to a station because there are too many turrets involved, either attached to the station or the ship. The frame rate drops to nothing and you're left trying to line up your docking beam in a slideshow.

    Does anyone have any work-arounds to avoid the problem? If so, please share them here.

    My own failed attempt was following someone's advice to build a line of blocks stretching out away from the base with a rail attached to the end. I went 200 blocks away from the station and still had the problem.
     
    Joined
    Mar 1, 2015
    Messages
    291
    Reaction score
    177
    • Wired for Logic
    • Community Content - Bronze 2
    • Purchased!
    There seems to come a tipping point, and it doesn't take long to reach, at which time it becomes nearly impossible to dock a ship to a station because there are too many turrets involved, either attached to the station or the ship. The frame rate drops to nothing and you're left trying to line up your docking beam in a slideshow.

    Does anyone have any work-arounds to avoid the problem? If so, please share them here.

    My own failed attempt was following someone's advice to build a line of blocks stretching out away from the base with a rail attached to the end. I went 200 blocks away from the station and still had the problem.
    It may be that your docked ship and all it's turrets are inside the box-dimensions of the station, causing constant collision checks. When enough entities are involved, these collision checks become costly. I suggest trying to dock on the edge of your station's boxdims, or setting the speed of the rail your docking on to 0. This shuts of collisions for the docked entity, but I don't know if it does with entities docked to the main docked entity.
     

    Keptick

    Building masochist
    Joined
    Sep 26, 2013
    Messages
    4,062
    Reaction score
    1,841
    • Councillor 2 Gold
    • Railman Gold
    • Thinking Positive Gold
    Try to get a floating dock on the far side of the station and only come at it from the "outside" (meaning that the station is behind the docking block). A tip here is to decorate it with lights to make it easy to find.

    Basically, you'll be fine so long as you stay out of the station's bounding box.
     
    Joined
    Sep 5, 2013
    Messages
    527
    Reaction score
    109
    • Legacy Citizen 4
    • Community Content - Bronze 2
    • Purchased!
    Try to get a floating dock on the far side of the station and only come at it from the "outside" (meaning that the station is behind the docking block). A tip here is to decorate it with lights to make it easy to find.

    Basically, you'll be fine so long as you stay out of the station's bounding box.
    Don't I extend the station's bounding box when I create the floating dock? I think that was the purpose of running a line 200 blocks away from the station, but the framerate drop seemed to extend to this new distance...
     
    Joined
    Feb 27, 2014
    Messages
    1,074
    Reaction score
    504
    • Purchased!
    • Legacy Citizen 4
    • Top Forum Contributor
    Frame rate drop?
    Why are you getting a framrate drop?
    How large is the ship and how many turrents
     

    Keptick

    Building masochist
    Joined
    Sep 26, 2013
    Messages
    4,062
    Reaction score
    1,841
    • Councillor 2 Gold
    • Railman Gold
    • Thinking Positive Gold
    Don't I extend the station's bounding box when I create the floating dock? I think that was the purpose of running a line 200 blocks away from the station, but the framerate drop seemed to extend to this new distance...
    It makes it easier to stay out of the bounding box since the dock is located at the very side. So yea, a line works too, just make sure to come at it from the side away from the station.
     
    Joined
    Sep 5, 2013
    Messages
    527
    Reaction score
    109
    • Legacy Citizen 4
    • Community Content - Bronze 2
    • Purchased!
    Frame rate drop?
    Why are you getting a framrate drop?
    How large is the ship and how many turrents
    I wouldn't consider the ship to be that big - 15k mass, 250m L, 102m H, and 131m W. It does, however, have 42 turrets (lots of missile defense) and quite a bit of rails, such as sliding doors and an elevator.
    The station is substantially larger, and has turrets and rails of its own, although not as many as the ship.

    My understanding is that the framerate drops occurs anytime a station or a ship has a lot of turrets, as the game can't cope with the collision detection or something.
     
    Joined
    Dec 17, 2014
    Messages
    534
    Reaction score
    195
    • Purchased!
    • Legacy Citizen 4
    Turret lag when the ai was in use was addressed. The issue that you (and me) are having has to do with entities with docked entities being really close to other entities with docked entities. If we could see the boundaries that are having issues then maybe we could design out of it. There was a definite point when I didn't get it, added some more turrets and suddenly I did.
     
    Joined
    Feb 27, 2014
    Messages
    1,074
    Reaction score
    504
    • Purchased!
    • Legacy Citizen 4
    • Top Forum Contributor
    Currently I'm building my own death star model ( I built one a few months ago but the lag made it unusable, plus all the turrets relied on clipping to work), Ive scaled it down from 600m across to 280m across and (so far) I have next to no lag.
    Im planning on using 4-5 internal docked reactors (1 mill e/s each), Does anyone know of any compact designs I could look at :?

    Other ideas Ive incorperated into it: Inside the main shell (about 10 blocks away) is a secondary armour shell, however this is a interanly docked entity and comes complete with its own sheilds, thus if the outer shell is broken the inner one will keep the innards inside safe long enough to jump out. So far no lag issues but clippping might be a probelem in the future.

    Plus Ive always wanted to have small, fighter craft constantly orbiting a larger ship.
    Thus inside the core I have some spinning docked entities.
    These entities are connected to a rail ~30-50 m away from the outside of the main ship
    Once id built the rail I deleted the line of blocks leading to the rail so its not physicaly connected, however its still part on the same entity thats connected to the spinning rails inside.
    Due to the distance, activating the rails inside will cause any ship docked to the outer rail to orbit the main ship in a circular orbit
    Im currently adding in a z axsis so the smaller crafts will move on multiple axsis
    I really hope it doesnt cause much lag XD
     

    Edymnion

    Carebear Extraordinaire!
    Joined
    Mar 18, 2015
    Messages
    2,709
    Reaction score
    1,512
    • Purchased!
    • Thinking Positive Gold
    • Legacy Citizen 5
    I use 3 part turret plugs for my point defense (as in, the turret halves sit in a base that I dock normally that has power built in, and that matches my hull), and I was having this same problem as well after installing 32 PDTs in my ship.

    I went through and did the speed controller to 0 trick to all those plug bases and the docked reactors, which that greatly helped.

    Its still not perfect, but at least I slideshow at 12-15 FPS instead of 3.
     
    Joined
    Jan 1, 2015
    Messages
    923
    Reaction score
    292
    • Community Content - Bronze 2
    • Purchased!
    • Thinking Positive
    I went through and did the speed controller to 0 trick to all those plug bases and the docked reactors, which that greatly helped.
    For the mentally challenged among us Edymnion, would you please describe in some detail what this "speed controller to 0 trick" is, why it is useful, and how and when to implement it ourselves?
     

    Edymnion

    Carebear Extraordinaire!
    Joined
    Mar 18, 2015
    Messages
    2,709
    Reaction score
    1,512
    • Purchased!
    • Thinking Positive Gold
    • Legacy Citizen 5
    For the mentally challenged among us Edymnion, would you please describe in some detail what this "speed controller to 0 trick" is, why it is useful, and how and when to implement it ourselves?
    There is a rail speed controller computer. It lets you control how fast things move on rails so you can fine tune speed. It does this by slaving activators and the rail blocks to the computer. The speed is controlled by the ratio of active to inactive activators, where default speed is about half of maximum. So if you linked 5 activators to the speed controller and turned them all on, the rail would be going max speed. Every one of those you turned off would reduce the speed by 20%.

    If you only put one activator on the controller and leave it off, it sets rail speed to 0 and effectively deactivates the rail.

    Because otherwise, even for a single block the game is constantly checking to see if it can move whatever you docked to it, running collision checks, going "Nope, can't go anywhere", waiting whatever the time period is until the next check, then doing it all again.

    So when you dock something to a single rail block by itself, it is constantly running collision detection on it.

    When you set the speed for those rail blocks to 0, the game goes "Oh hey, this thing can't move at all, I don't need to look at it anymore" and stops the constant checks. Which completely removes all of the lag for the docked object.

    So basically, if you have a docked object that doesn't have to move, disable the rail. If its something you only want to move occasionally (like when you push a button), use some extra logic to keep those activators turned off normally and then turn them just before you start your movement.
     
    Joined
    Aug 21, 2015
    Messages
    165
    Reaction score
    87
    • Community Content - Bronze 1
    • Purchased!
    There is a rail speed controller computer. It lets you control how fast things move on rails so you can fine tune speed. It does this by slaving activators and the rail blocks to the computer. The speed is controlled by the ratio of active to inactive activators, where default speed is about half of maximum. So if you linked 5 activators to the speed controller and turned them all on, the rail would be going max speed. Every one of those you turned off would reduce the speed by 20%.

    If you only put one activator on the controller and leave it off, it sets rail speed to 0 and effectively deactivates the rail.

    Because otherwise, even for a single block the game is constantly checking to see if it can move whatever you docked to it, running collision checks, going "Nope, can't go anywhere", waiting whatever the time period is until the next check, then doing it all again.

    So when you dock something to a single rail block by itself, it is constantly running collision detection on it.

    When you set the speed for those rail blocks to 0, the game goes "Oh hey, this thing can't move at all, I don't need to look at it anymore" and stops the constant checks. Which completely removes all of the lag for the docked object.

    So basically, if you have a docked object that doesn't have to move, disable the rail. If its something you only want to move occasionally (like when you push a button), use some extra logic to keep those activators turned off normally and then turn them just before you start your movement.
    Wow, good info. It'd be nice if zero speed was a default behavior for 1-block rails.
     
    Joined
    Aug 18, 2013
    Messages
    4
    Reaction score
    2
    • Purchased!
    • Legacy Citizen 3
    tried setting to 0 ... Console does check. Its not "Oh hey, this thing can't move at all, I don't need to look at it anymore"

    Its :
    Speed=0
    Check Again,

    Speed=0
    Check Again, ...
     

    AtraUnam

    Maiden of crashes
    Joined
    Oct 15, 2013
    Messages
    1,121
    Reaction score
    869
    • Railman Gold
    • Competition Winner - Small Fleets
    • Wired for Logic Gold
    Instead of having your floating dock as part of the station, have it be a seperate entity docked to the station. That way you can actually have it outside the boxdims of the main station (right?)
     
    Joined
    Nov 3, 2014
    Messages
    624
    Reaction score
    287
    • Community Content - Bronze 2
    • Wired for Logic
    • Legacy Citizen 6
    i encountered this as well and it is extremely sad to see this happening with just a few docked entities already. It seems what we build and what gets tested is quite different.
     

    Master_Artificer

    Press F to pay respects
    Joined
    Feb 17, 2015
    Messages
    1,588
    Reaction score
    612
    • Top Forum Contributor
    • Legacy Citizen 2
    • Thinking Positive
    This is how Event Horizons home base when SS moved to Starside murdered the server whenever the system was loaded.

    The easy fix to this and the fix all the big factions have been doing is simply not docking things.


    Not only does it bring frame-rate down from hundreds to fractions, but it also REALLY stresses the server out big time, even the massive rig that those starside people own.

    So we just keep our warships in deep space and in blueprints because yeah. cant have a medium cruiser docked without the server going mercy...
    [DOUBLEPOST=1451011937,1451011846][/DOUBLEPOST]and now I realize this topic is from September.

    Also it seems that docking a ship to a station increases the bounding box of the station, and each additional ship is now being checked for collisions while docked or whatever. Not good.