Jump to content

Search the Community

Showing results for tags 'performace'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements
    • Welcome Aboard
  • Kerbal Space Program 2
    • KSP2 Dev Updates
    • KSP2 Discussion
    • KSP2 Suggestions and Development Discussion
    • Challenges & Mission Ideas
    • The KSP2 Spacecraft Exchange
    • Mission Reports
    • KSP2 Prelaunch Archive
  • Kerbal Space Program 2 Gameplay & Technical Support
    • KSP2 Gameplay Questions and Tutorials
    • KSP2 Technical Support (PC, unmodded installs)
    • KSP2 Technical Support (PC, modded installs)
  • Kerbal Space Program 2 Mods
    • KSP2 Mod Discussions
    • KSP2 Mod Releases
    • KSP2 Mod Development
  • Kerbal Space Program 1
    • KSP1 The Daily Kerbal
    • KSP1 Discussion
    • KSP1 Suggestions & Development Discussion
    • KSP1 Challenges & Mission ideas
    • KSP1 The Spacecraft Exchange
    • KSP1 Mission Reports
    • KSP1 Gameplay and Technical Support
    • KSP1 Mods
    • KSP1 Expansions
  • Community
    • Science & Spaceflight
    • Kerbal Network
    • The Lounge
    • KSP Fan Works
  • International
    • International
  • KerbalEDU
    • KerbalEDU
    • KerbalEDU Website

Categories

There are no results to display.


Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Skype


Twitter


About me


Location


Interests

Found 5 results

  1. I suggested performance improvements to kerbal space program support, and they requested I post it here because they thought it would greatly help the developers. First off, I love KSP2 and think it's a great game. Y'all added a lot of features I really appreciate, like procedural wings, coloring (man do I love coloring), and the SAS control and UI I like so much more. I'm also really excited for all the features in the roadmap. Secondly, I'll say what I believe to be true and what you should do working off of those assumptions. I don't mean to sound pretentious, just writing this because I want to help if at all possible. I could also be completely wrong because I don't have that much experience. I believe if you knew all this though, you wouldn't be having the performance issues you're currently having, but I could be wrong. If my assumptions are wrong then my suggestions won't help much either. My assumptions: KSP2 is currently built in Unity, which uses PhysX engine for its physics, which is really good for collision detection, but only that. Therefore, your structure is probably something along the lines of every part is a prefab, players then are basically dragging prefabs to build a ship that is then loaded into the world. These prefabs probably all inherit from some part class that handles gravity, joint force, and aerodynamics. Then fuel tanks and engines (where you're currently having performance issues when users add several) have additional scripts handling fuel and force application. This is probably all within FixedUpdate, which is called serially. This means that every single part is executing its script on the main thread sequentially, which is why some computers with good single CPUs instead of multicore CPUs are performing well. However, most modern CPUs are built with multiple cores and threading in mind because of how much more efficient it is. This doesn't matter though, because Unity's APIs aren't thread safe and prevent multithreading. Final assumption, you're not using the GPU for a lot of your calculations. Where I believe you can go from here working off of those assumptions: It's kind of infeasible to just improve performance. Like sure, you can make your functions better, but only so much better, and there are some calculations you just have to perform. Once you get to colonization you also get ridiculously large structures and physics. Unity may not support multithreading (which honestly at a colony part level won't help too much), but it does support compute shaders which would allow you to perform a massive amount of calculations very quickly. For most of your parts you probably have the same function, just different inputs depending on the size and shapes. Then engines probably all have the same script that handles fuel consumption, just different thrust and ISPs, which is perfect for compute shaders, which are really good at performing the same function with different inputs in parallel. Unity even allows you to pass structs to the compute shader, which means each part could be simplified to a struct of its various variables, and then sent to the compute shader. Each block of the compute shader could be a different function / calculation, i.e. aerodynamics, gravity, fuel consumption, and each thread a different part (or be really fancy and use textures for input output through rgba values). Meaning most modern computers will be able to handle 1024 parts at the exact same rate as 1 part, because most have about 1024 threads. Worst case scenario you only get 512 parts, but even so Unity's compute shaders allow for a third dimension which means expanding beyond 1024/512 parts is simple. Or if you don't have a GPU, it will default to the fastest device which will be your CPU and now you've threaded it since CPUs just simulate the GPU and thread if there isn't one. Basically, any where you have for loops, double for loops, or scripts on every part that perform the same calculation, you could probably offload to the GPU to increase performance. Concerns: - GPUs are slower. Yes. But if you have 1000 calculations and the CPU runs 3 times as fast (approximately maybe), the GPU does all 1000 calculations in 3 CPU time, because they are parallel. The CPU does 1000/3 = 333, which is a much bigger number than 3. - GPU answers are a large array you'd have to loop through on the CPU anyway. Just do thread reduction. - It'll slow down rendering since we're using the GPU now. Well, rendering waits for the CPU calculations, and your structure would look something like this CPU (initial calculations and storage) -> GPU (parallel calculations) -> CPU (handle those calculations and store them for the next frame) -> GPU (render). Besides, slower rendering doesn't really matter if your calculations are the bottleneck. - You don't have that many parts. Yea, actually the GPU is worse for if you only have like 10 calculations. Best I'd say is if you reach a threshold offload to GPU otherwise use CPU. But I imagine for colonization you will have to use the GPU. I have two examples, one using CUDA, the other a compute shader to prove how many calculations you can achieve. The compute shader performs collisions, collision reaction, and gravitational constants (which are bad for the GPU since there's a cube and a square root involved in the calculation) 1.04 e10 (like 10 billion ish) times a second (10 blocks of 1024 threads that have a for loop going over all 10240 objects at an average of 100 fps - given, I took a lot of shortcuts to make it stupid efficient which you won't exactly be able to do in Unity. 10 * 1024 * 10240 * 100). The CUDA program is the same principles as the compute shader wince it runs on a GPU, but the CUDA program has a reduction implementation that's quite simple since it's only thread reduction. It performs about 20,000,000 calculations in .3 seconds. If you partition each function onto a block you can do the block reduction on the CPU since block reduction is difficult and can be risky. You have to go back to the CPU anyway to store the information for later frames, and looping over blocks isn't going to be that long of a task. Both of these examples are using OpenGL and C, but Unity's compute shaders are pretty easy to use and comparable in principle, just use HLSL instead of GLSL. I have the repositories for the two examples but don't particularly won't to blast my personal information so if requested I'll send links to them (they have my name and some info and such). I hope this is helpful and you didn't already know all of this and I just sound like a jerk. I think that with great performance nobody cares as much about bugs since they can just immediately restart and not be waiting 10 minutes to see results again. I think performance is especially important since you want to make science accessible to everyone, and most people not properly exposed to science don't have modern hardware. I'd also be happy to talk through some questions or concerns if you have any. Thank you for your time.
  2. So I'm very Laggy in KSP and I wanna fix it I heard a way on Youtube, and it said using unity 5.. when I checked it, I wasn't able to find a version for the on final approach which is KSP 1.12.3... any ideas? thoughts? links? discussions?
  3. I tend to run fairly heavily modded games, as ive exhausted the stock game and i need more to enjoy it and challenge me. However, with modded installs i tend to run into performance issues sometimes. I have a pretty decent pc, ryzen 5 2600, 2070 super, 16gb 3200mhz ram. With the stock game i can run it at max settings over 100 fps, but with modded installs it tends to to down, which is fine, but not as low as it is sometimes. With ksp being pretty cpu dominant, and single threaded at that, i imagine graphics mods wont affect me that much? As i have a powerful gpu with 8gb vram, and 16gb ram should be more than enough too? Im using ksp 1.8.1 at the moment, as i want to play with sigma dimensions. I was using 6.4x scale with 9.6x orbits. I was also using astronomers visual pack with the 8k textures. About 150 mods total installed with ckan. I was getting 1 fps. Not even 2. I had a few guesses as to what it could be, maybe the 8k textures, or the ground scatter being scaled as well, which was weird. But if i went eva, i got 50 fps, but not inside the ship? I downgraded to 4k textures for avp, uninstalled my skybox mod, and fixed the ground scatter, and its at 20fps roughly now, but thay may well be just cos i restarted the game. Using alt f12 and looking at the performance tab, it looks like im only using 4gb ram, with 5gb allocated? I installed this mod called heap padder, as i thought it would improve performance. I havent uninstalled it yet, but maybe thats causing a bug? All i really want is a general idea of what kind of mods affect performance the most. Part mods, plugins etc. Sorry for rambling but its getting on my nerves especially with my pc being more than up to par.
  4. Hi, I recently have a problem with the game, (i don´t speak english very well, sorry) . The loading time is too long and it´s weird because i dont have any mods installed more than mech jeb, and when the game finishes the load, the main menu freezes for about 2-3 minutes. Also, when i switch between the buildings (VAB to Tracking Station, for example) the game takes too long to load. And it´s weird because i´m running at good fps (30-40) , and it only happens in the 1.7.x and 1.5.x (i haven´t tested yet in 1.6.x).
  5. Hello ! A strange problem appeared two weeks ago, no significant change to the game were made and reinstalling it didn't fix the issue ! I play KSP in full screen mode, and when I unfocus KSP (opening my browser, alt-tabbing etc..) the game starts to lag tremendously, I get like 3 FPS... Which is really inconvenient as you may imagine ! I have Kerbal Engineer, SSTU, persistent rotation, probes plus, decals, Direct launch vehicles and Space shuttle payloads.. Running ksp in vanilla doesn't fix the problem, I've checked the logs, no errors when the lag occurs... Good day, -Luca
×
×
  • Create New...