Jump to content

Alex55

Members
  • Posts

    7
  • Joined

  • Last visited

Everything posted by Alex55

  1. I just wanted to add for posterity that this could be related to the issue observed here frame-rate-drops-after-returning-from-map-view. The fix suggested in this thread solves the problem observed there as well according to Ohara.
  2. I hadn't filed a bug report on this yet. Thanks so much OHara for the additional investigation, finding the related bug and mentioning this thread there, as well as linking to the workaround.
  3. Hmm. Thats a good thought. I just tried that at the launch pad. I clicked through all the avatars on the lower right. As I went to the right, there was static for each one at first, but then as I went to the left again, there was no static. At no point was there any lag as a result of loading the avatars. However, if they are being double loaded as you suggest, that could make a difference. RE: difficulty of fix. Only squad / private division would know how hard it is to actually do, but this was my thought process: Squad spent a lot of effort optimizing recent versions of KSP. They made complex changes like changing the way the physics was being calculated, and reducing the number of objects they were creating and destroying to make things run faster. That would have required big rewrites. In this case, the engine works great already. It's just one if statement or two toggled into the wrong state after coming back from the map (I hope). Fixing it would at least quadruple the number of Kerbals comfortably in flight. I don't think it is a coincidence that the lag doesn't exist when you first start using the ship. I suspect Squad actually did load testing on the Pad to optimize it. My hunch is that the game uses an event loop internally, b/c it is built using Unity. Unity spools through all the events in that loop every frame (possibly multiple times). When you look at the map, a few events are added to the loop, and unity proceeds to try and execute them every frame, whether the map is loaded or not. When you enter into IVA, the code that switches to IVA removes the events and things run smooth again. When you exit, they are added back on, etc. Whatever those events are, we already know that the game doesn't need them for the simulation because it runs much better without them in the time before you look at the map. This is probably just a case where the wrong flag was left on after switching away from the map. Fixing this would let some people use larger ships/stations, but it would also let people running on laptops have a more playable game experience with fewer Kerbals. I would be really really grateful if Squad / Private Division took a look to see what the cause was.
  4. Hi Boyster, I agree with you premise. However, it's not a switch map lag, if I'm using the right terminology. I 100% wouldn't have filed a bug about that. The issue is that after you look at the map, and then go back to looking at the spaceship, you suffer severe lag continuously. To the point where the ship is completely unflyable. i.e. 1) Fly ship with 100 Kerbals, everything is great. Awesome job with the optimizations! 2) Look at map... things look great, map is smooth 3) Look back at ship. Everything unbelievably laggy continously. Ship not flyable. 4) Go into IVA, lag is gone. Even physics acceleration possible. 5) Look at ship from outside again: horrible unflyable lag. 6) Go to tracking station, and back to ship, lag is gone from external view of the ship! 7) look at the map and back at the ship: lag is back. The physics engine can clearly fly the ship with that many kerbals, even at 4x. Its amazing what they did. But something gets flipped when you look at the map, and stays flipped when you are no longer looking at it. i.e. the ship is non-flyable after looking at the the map. It kind of like you have a Bugatti Veyron that engages the handbrake when you look at the GPS and refuses to release it unless you exit the vehicle. It feels like there is a bug there. When I saw that going to IVA alleviated the stutter, I thought "wow, to fix this, they probably have to look at the code that they execute when they go to IVA, and paste one of those lines over into the code that runs when you leave map view. That's a really low hanging fruit as far as performance optimizations go. I've got to let them know!" Its probably not that simple. But I can dream right? The other thing to mention is that the issue still happens, but in a less showstopping way with smaller numbers of Kerbals. 100 Kerbals is unflyable after looking at the map, 20-30 is laggy but flyable. Even at 10, you might notice a micro-stutter. The game could be that much smoother for everyone if this is fixed, especially for those with space stations. Does that make sense?
  5. Hi, I've found a reproducible bug in KSP: [KSP Version]: 1.10.1.2939 (WindowsPlayer x64) (x64) en-us The gist of it is that the frame rate drops after the first time that you look at the map within a flight and then return to looking at your ship. The drop in frame rate is proportional to the number of Kerbals on board. The drop in frame rate is not present (or less obvious) when you switch to IVA by pressing 'c', or go to the tracking station and then go to the flight again from there. However, the tracking station method will only restore a good framerate until you look at the map again. How to reproduce. Case 1 (on the pad) 1) Create a ship that can carry ~100 Kerbals. There is one called 'Test Craft' in the save file that works: https://drive.google.com/file/d/1mIRcbIYzVliJr1SRlM4hSECe01LSZIkE/view?usp=sharing 2) Fill the ship with 100 Kerbals. 3) Take the ship to the launch pad but DO NOT open the map. Wait for everything to load in, and try rotating the camera, moving the dials etc. Everything will be pretty responsive. (Great job optimizing the engine, SQUAD!) 4) Open the map by pressing 'm'. There will be a tiny bit of lag while it loads, but then the map will move smoothly afterwards. 5) Close the map again by pressing 'm'. You will be back at your ship, but everything will now be super laggy. Case 2 (In Flight) 1) Create a ship that can carry ~100 Kerbals. There is one called 'Test Craft' in the save file that works: https://drive.google.com/file/d/1mIRcbIYzVliJr1SRlM4hSECe01LSZIkE/view?usp=sharing 2) Fill the ship with 100 Kerbals. 3) Take the ship to the launch pad but DO NOT open the map. Wait for everything to load in, and try rotating the camera, moving the dials etc. Everything will be pretty responsive. (Great job optimizing the engine, SQUAD!) 4) Launch the ship. Put it into max physics time acceleration and keep it going until you are in space. Everything should be pretty smooth when you use the controls, or rotate the camera. Notice that turning the cutaway view of the kerbals has no real effect on performance. 4) Open the map by pressing 'm'. There will be a tiny bit of lag while it loads, but then the map will move smoothly afterwards. 5) Close the map again by pressing 'm'. You will be back at your ship, but everything will now be super laggy. 6) Hit 'c' to go into IVA. Everything will become very responsive again. You can even run the game 4x physics accelerated without any lag. Try firing the engines, or rotating the ship to feel the massive difference. 7) Hit 'c' again to exit IVA. Everything will be super laggy again. 8) Hit 'esc' and select the tracking station. In the tracking station, select the currently active flight, and go to it. The lag will once again be gone. 9) Enter and exit the map to see that the lag is once again back. Case 3 (Only 1 kerbal in flight) 1) Repeat the steps from Case 2, but this time have only 1 Kerbal in the ship. Notice that there is no perceptible lag at any point. i.e. It is strongly tied to the number of Kerbals on board. Other relevant details. 1) I created a new standalone install to test this with a clean save file after I observed it in my main install. No mods were ever used on this install. 2) I used the default graphics settings by hitting the 'Reset Settings' Button in the settings window. i.e. 1280 x 720, running in a window. 3) My machine is an Intel Xeon E5-1650 v3 @ 3.5GHz (6 cores 12 threads) with 128GB ram and an Nvidia GTX1080 w/ 8GB of vram. Neither the CPU or the Graphics card were pushed even to 50% while running any of these experiments according to the charts in Task Manager. 4) Hitting the 'Fill' button to load the ship with 100 Kerbals freezes the game for minutes i.e. several seconds per Kerbal. I suspect some sort of n^2 or n^3 algorithm in there making things slow. I would love it if this was faster :). Closing thoughts A feedback that might happen with this bug report is to just not fly with 100 Kerbals, so I wanted to comment on that: 1) Building large crafts and flying with 100 Kerbals is super fun! (Until I look at the map) The game engine can clearly run with hundreds of Kerbals and parts aside from this bug and it would be awesome to take advantage of that. 2) Choosing 100 Kerbals was helpful when reproducing the bug, but the lag is still there with smaller numbers of Kerbals, just less severe. It would be better if it was not there at all. 3) Because the game runs fast in IVA, it feels like going into the map for the first time flips some internal flag that makes the game run slow from that point forward unless it is in map mode or IVA. If it really turns out to be that simple, it would be great to just turn that flag off again when you leave map mode. i.e. the simulation is clearly able to handle 100 Kerbals easily, it handles all the rendering and physics just fine until going into the map somehow changes the state. 4) Thanks for making the amazing game that made me want to file this bug report! Thank You!!!
  6. Thanks Padishar! That makes life much easier. I was using an excel spreadsheet to recalculate the total amount of memory from the chunks, but it looks like I don't need to do that :). I'll leave the steam post alone. I actually have no idea what they're tweaking there. RE: Deleting cache files from GameData Folder. Are you thinking that one or more of the cache files was corrupt and would've caused a crash eventually even without the padding? (The padding just caused it to happen sooner somehow) Here is some more info on what was going on: The crashes did not occur in the unmodded (except for MemGraph) game. The crashes weren't random. They would reliably occur on any load operation after padding: 1) applyPadding = false start game load game apply padding at space complex load game -> Crash start game apply padding at main menu load game -> Crash 2) applyPadding = True start game -> Crash They seem to have gone away after I deleted the cache files. I was using ~14GB of padding on a machine with 60GB+ memory not in use. I'm running KSP 1.2. The cache files were regenerated, but the game had no obvious problems with the regenerated versions.
  7. Thanks so much for making this fantastic mod! It really improved the gameplay. A few tidbits from my experience with it: 1) It's a good idea to wipe out various dat/cache files that various mods put into the KSP_win64/GameData folder. (FinalFrontier.dat, ModuleManager.ConfigCache, etc) I was getting nasty Access Violation errors when loading the game and/or save files after buffing the memory. Wiping out those files fixed it. Example Error: Unity Player [version: Unity 5.4.0p4_b15b5ae035b7] KERNELBASE.dll caused an Access Violation (0xc0000005) in module KERNELBASE.dll at 0033:17a77788. 2) On my machine, I can get a "Too many heap sections" error if I increase the padding to high. (3 for all available sizes). Other users on this forum seem to be able to go much higher. Has anyone tried this fix and had it work for ksp? https://steamcommunity.com/app/242760/discussions/0/522728813818195362/
×
×
  • Create New...