Jump to content

Gotmachine

Members
  • Posts

    706
  • Joined

Everything posted by Gotmachine

  1. No. There are a few new modules like the inventory/cargo stuff, but they have near zero impact. That's not what I meant by "global overhead". What I meant is that for many methods, the exact same code seems to be executing slower in 1.12 than in 1.10.
  2. These messages are "normal", and would happen in stock KSP too. This happen because all your mods are adding non-stock modules to stock crafts. This being said, the log entries should probably not be emitted as warnings.
  3. I understand your point of view. I'd say that 20% is an absolute worst case scenario for a 650 parts vessel basically doing nothing in the least performance intensive situation. In more real-world performance heavy scenarios (atmospheric flight, active attitude control/engines, stuff running in the background, mods adding their own overhead, etc), that difference will become much lower and likely unnoticeable as the fixed overhead is dwarfed by other things that are just as heavy no matter the KSP version. In fact, I just tested a random craft file from KerbalX and got actually better FPS on 1.12 just because that ~500 part ship had a few converter parts, and those have perf issues on 1.10 but not on 1.12. I'm trying to think about what could be causing that global overhead. While the differences are measurable and consistent, there is always the possibility of some measurement bias, although I'm relatively confident in my methodology. Here are some compiled results : Hard to say what is at play here. Diffing some of the methods showing significant degradation, there are some methods where null checks against Unity objects were added, which can be somewhat expensive, but some methods are strictly identical between 1.12 and 1.10... But yeah, I need to do the same tests against other KSP versions Maybe. I guess the bulk of the overhead comes from the call to Part.isKerbalEVA(), which could be partially optimized. The above graph show other potential optimizations, like preventing SuspensionLoadBalancer to run when not landed,
  4. That's a strong statement. It's extremely difficult to make reliable performance measurements between different runs without automated benchmarks that reproduce exactly the same configuration and sequence of inputs. This being said, I'm somewhat able to reproduce what you're seeing, although not as dramatic as the 27% FPS difference you're showing in your screenshot. Using your craft file, I can reliably measure a 4-5ms per frame overhead on KSP 1.12 vs 1.10 (for a frame time of ~45ms). In practice, this mean a 0 to 20% drop in terms of FPS, depending on the baseline. This can partly be explained by new features. With your craft, Part.FixedUpdate() call time has jumped from ~0.65 ms/frame to ~1.22 ms/frame due to the new kerbal mass system. There are likely a few other methods that increased in complexity slightly, resulting in some fixed overhead in newer KSP versions. More surprising, there is also a consistent and repeatable overhead (about 5% overall) in many top level method calls, including methods that haven't changed at all between KSP 1.10 and 1.12. I'm not sure how to explain this apart from some global regression at the Mono/Unity level when KSP was upgraded to Unity 2019.4.18 for the 1.12.0 update.
  5. Thanks for the report. I managed to reproduce this on KSP 1.10, but not on 1.12, so this is caused by some differences in the stock robotic code between those versions. The RoboticsDrift patch is developed against KSP 1.12, I have a few other robotics related issue reports lying around, and I suspect at least some of them are caused by minor differences between KSP versions. I don't really have time (nor willingness) to investigate and fix such version-specific issues, so I will just disallow the patch to run on KSP versions prior to 1.12. The error you're getting is indeed caused by some mod uncorrectly managing resources, so "whatever adds this" is indeed the likely culprit. I would suggest finding which mod it is and asking on the forum thread for this mod, or to post in the "Technical Support (PC, modded installs)" forum, this has nothing to do with KSPCommunityFixes.
  6. Doing that will have the side effect of having KSP running from the wrong working directory. In stock KSP, the only likely side effect will be that the KSP.log file will be generated in the "PDLauncher" directory, but this will definitely cause cascading side effects on various mods. While you can specify a different executable in the Steam command line, you can't set the working directory, which is hardcoded to the "PDLauncher" directory. This being said, the proper workaround is to have Steam pointing at a shortcut instead of KSP_x64.exe : - Open your KSP root folder (In Steam, right click on the game > Browse local files). Usually this will be "C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program". - Right-click on KSP_x64.exe > Create shortcut - Rename the shortcut to "KSP_x64_Steam" - In Steam, open the game properties, and in the "Launch Options" field, put the path to the shortcut between quote, with : "C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Steam" %command% This will launch the shortcut instead, with the correct working directory.
  7. People are having that issue because they are trying to bypass the launcher by adding an extra command line option in steam to start a different executable than the launcher. This is what I have seen suggested : "C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64.exe" %command% This doesn't work because the executable working directory will still be set to the "PDLauncher" subdirectory, causing cascading issues all around. A workaround is to make a shortcut to KSP_x64.exe, let's say I'm renaming it "KSP_x64_Steam". Then in the steam command line options, point to that shortcut : "C:\Program Files (x86)\Steam\steamapps\common\Kerbal Space Program\KSP_x64_Steam" %command% This will launch the shortcut instead, with the correct working directory Said otherwise, the only issue here is people making a mess on their own by following random bad advice on the internet.
  8. Good idea. I don't have the time or motivation to implement this, but suggestions are welcome nevertheless Well, don't have much time either. The few "kraken fighting" patches in KSPCF are far from a definitive or reliable fix. KSP will forever stay prone to such events, and there might be indeed corner cases where KSPCF is doing more harm than good. This being said, if you can reliably reproduce a case where the same craft has issues when the PartStartStability patch is enabled, and is working fine when the patch is disabled, please provide the craft or save file. Please try to reproduce this in a stock install. There is a large probability this is caused by a mod. And if you manage to reproduce it, please provide your Player.log file (see https://forum.kerbalspaceprogram.com/index.php?/topic/83212-how-to-get-support-read-first/) It is fixable with a mod, but it would be a behavior change that has a significant chance to affect other mods in unexpected ways, so KSPCF isn't the right place for that. Same response. KSPCF doesn't change stock behavior like this one to avoid messing with what other mods are expecting. This is something that you can and should handle from your own mod.
  9. This data doesn't exists, not under a serialized (ConfigNode) form. KSP holds its data in various subsystems, most of it is easy to get from various static accessors or fields in singleton top level classes. For vessels (and everything they are made of) and bodies, you have FlightGlobals, for Kerbals you have KerbalRoster. Some other relevant top level classes are all subclasses of ScenarioModule, like ResearchAndDevelopment, ScenarioUpgradeableFacilities, Funding, Reputation, ContractSystem...
  10. I'm just another modder. Lets just say that we have ways to see what is happening exactly under the hood.
  11. It's quite simple. Part.buoyancy is the per-part equivalent of PhysicsGlobal.BuoyancyScalar (which you can tweak in Physics.cfg). In short, the formula for the magnitude of the force applied on a part by water is (physically "accurate" result derived from the drag cube and part mass) * PhysicsGlobal.BuoyancyScalar * Part.buoyancy. Default value for PhysicsGlobal.BuoyancyScalar is 1.2 (to account for the fact that stock parts are way too dense). Part.buoyancy default value is 1, and is sometimes tweaked up or down on stock parts to account for even sillier densities. In the context of rescaling a part, assuming both the drag cube and mass scaling are accurate, density is staying equal and nothing else is needed. Messing with Part.buoyancy mean that you're altering the part density, which is obviously wrong. I haven't read the whole convo in detail, but part.buoyancy set aside, if as @damerell suggested TS is only scaling the drag cube area and depth (and not size), it's no surprise that effective buoyancy results are inaccurate, as the formula make extensive use of the drag cube size. EDIT : to ensure a scaled part is keeping the same density, one can check the Part.partBuoyancy.displacement value. This is the intermediate result of the drag cube/mass computations before any "cheat" is applied (BuoyancyScalar/buoyancy), aka the "physically accurate" density of the part. Ideally, it should stay the same no matter the part scale.
  12. Part.buoyancy is essentially a corrective factor applied over the part default buoyancy derived from the part estimated volume (itself derived from the drag cube) and mass. Said otherwise, it's a factor to do an arbitrary final adjustment of the part density in the context of the buoyancy formula, which mean it doesn't make any sense to scale it when a part is rescaled.
  13. No responses because information is extremely scarce. We know they are using Unity, so yes, Mono is involved. They have no reason to use IL2CPP unless they really want to kill modding. We know that they have at least toyed a bit with Jobs/Burst for the new PQS system in combination with compute shaders (source). Maybe other parts of the game are using Jobs/Burst. It would make a lot of sense from a perf standpoint, but the fact they had to contract a freelancer to make it happen for the PQS system isn't a good sign. Other than that, they talked about config-driven modding with vague ideas for MM-like features and some limited config-level scripting capacity. This was a "it's all in flux" comment from three years ago, so don't hold your breath. If I were to speculate a bit, I'd say that the eventual performance optimizations (Burst, Jobs, GPGPU, multithreading...) and multiplayer feature are likely to increase the difficulty of making "complex" mods compared to KSP 1.
  14. It isn't. It was fixed in KSP 1.12.3, you just need to update.
  15. To get back to your original post (because I actually didn't really took the time to read it before) : the results you are getting make perfect sense to me. A +0.001 offset in true anomaly is absolutely not equal to 1s of orbital period, it's far, far more (something like 1400s), so of course you're getting a much larger movement. Also, if you followed what I said before, comparing the absolute position magnitude like you do doesn't make much sense because you don't know where the origin is.
  16. I think we are lost in semantics. To me, "origin" is the 0,0,0 point, anything else is a reference point, not an origin. If your question is "are the positions returned by the various orbit methods consistent relative to each other and to a common reference point ?" the answer is yes. There are two different set of methods in the orbit class. Those prefixed with "Relative" return a vector expressing the position offset from the parent body position, but that vector is usually in a coordinate system where the y and z axis are swapped compared to world space. The non-prefixed ones return an absolute position in world space, where the origin / (0,0,0) point can be anywhere. No, for the methods that don't have "Relative" in their name, they return an absolute point in world space where the origin (0,0,0) point can be anywhere. If you want a vector from the parent body, you need to look at the "Relative" methods.
  17. No. If you use one of the "AtUT" method, the body position is computed recursively relatively to it's parent body using keplerian orbit parameters and equations. There is no need for a known absolute point of reference.
  18. @Razhan Sounds like it. Could someone create an issue with as much detail as possible (minimal repro steps, findings on what is happening...) on the KSPCF repository ?
  19. I think so, but there are various shenanigans, the KSP methods don't always do what you expect them to do from their name. The origin is irrelevant, everything's position is relative to another. All positions are consistent relatively to the current origin at any point of execution, that's what matter.
  20. The origin (both in local and scaled space) can be anywhere, because it's a floating origin. To mitigate floating point precision issues, KSP occasionally move the origin so the active vessel stays near the origin. However, this isn't done on every frame and there are various exceptions. The main consequence is that you can only compare relative positions at a specific point in the execution flow. Even within the same frame, there is no guarantee that the origin won't move between two separate calls.
  21. FileSystemWatcher events are called from separate thread. Unity/KSP APIs are not thread safe and can't be called from another thread than the Unity main thread, that's why your ScreenMessages.PostScreenMessage() call in OnNewMessage_Handler is causing a crash. To make that work, you can instead set a flag from the event handler and check that flag from an Update() method in your plugin class. But I assume you will want to pass more data than a simple flag around, so you will likely need to implement thread safety mechanisms (like a lock) to make that work reliably.
  22. Please provide logs, and ideally also your save file and module manager cache. Ideally use KSPBugReport for that. I doubt this is directly caused by KSPCF as this would have been widely reported, in any case I didn't manage to reproduce it. This is likely some peculiar corner case in your specific modded setup.
  23. Stock vessel names are localized. You're supposed to use Vessel.GetDisplayName(), not the Vessel.vesselName field directly.
  24. Then you have clearly no idea about what makes a game a commercial success or failure. The success of KSP 1 comes from those factors : - Being the first. - Very low initial financial risks / investment. - A handful of modders and hardcore users generating hype (and significantly contributing to the game development). - The hype making tens of thousands of casual players buying the game because the goofy kerbals makes it not look like a hardcore simulation whose value as a game is basically non-existent past the initial discovery and first hours of gameplay. KSP 2 is made in a completely different context, this is NOT an indie game like KSP 1. And given the circumstances, they very likely need the game to be an immediate financial success for the studio and the creative people in it to stay vaguely in charge. So far, the people actually deciding what KSP 2 is / will be are making the right choices to make such a miracle happen in the current game market : maximize the hype factor (visuals, interstellar/epic content, multiplayer...) and ensuring the game get good reviews and reputation by doing everything they can to provide a smooth learning curve and steady progression for the average player. 100% of what we heard is backing that, especially in the press interviews and promo videos, but also to some extent in the so-called "dev logs". No. That was somewhat true 10 years ago. Now for every vaguely commercially successful niche game, there are a few barely recouping costs and dozens of failures. The studios managing to survive in niche markets are either well established ones or small and agile independent teams. Intercept Games is neither. Well, I don't have a crystal ball, but almost sure all of that will be either quite simplistic, mostly cosmetic or not present at all. But don't misunderstand me. Yes, I don't expect stock KSP 2 to have in depth gameplay mechanisms. I think stuff like colonies, ISRU, resource and thermal management or life support will be very low complexity, casual game level of abstraction systems. Outside of the audience demographics argument, I doubt they have the manpower to deliver anything else. What I hope they deliver is a good game that attract as many buyers and players as possible with an engaging but quick and simple progression system. I think the core creative and dev team are passionate, actually hardcore niche players at heart that want all those fancy systems. The way they can deliver that in the long run is by doing their best to ensure the core technical foundations are solid, so either them or the modding community can pick up over time with the actual "niche" content we are all longing for as long time (frustrated ?) KSP 1 players. The worst that could happen is if instead of pouring all resources in a financially successful and technically viable long term product (that they actually end up delivering, something they obviously have been struggling with), they start dispersing efforts around niche features that won't get anywhere near enough resources to be good. All I ask of KSP 2 at launch is to not be a bugged mess that suffer from the same chronic technical issues of KSP 1 and to deliver actually enjoyable, polished gameplay. And trust me, if they manage to do that, it will be a huge achievement. And once that's done, we can start to think about life support and other fancy features. Personally, I'm pretty sure I won't like the stock KSP 2 content. Playing with speculative technology to perform even more speculative interstellar travel to establish science fiction colonies is something that I can't relate to in any way and that simply doesn't talk to me. But I hope it is something I will enjoy to play casually, as those other games that I enjoy but never touch again after a few dozen hours. Then hopefully, with time, either Intercept Games or modders will deliver what I'm actually waiting for as a hardcore, niche player.
×
×
  • Create New...