Dear Intercept Games Team,
I hope this letter finds you all in good health and high spirits. Let me start by expressing my deepest appreciation for the dedication and passion you're pouring into Kerbal Space Program 2 (KSP 2). Since the game's inception, I've been an ardent supporter, following every update, and looking forward to the revolutionary gameplay experiences I know you're creating. It's my unwavering belief in the KSP 2's vision, coupled with my dedication as a member of its community, that has driven me to develop various mods to enhance our collective gaming experience. Among the numerous mods I've crafted, the "Better Parts Manager" stands as a prime example. This mod, specifically designed to alleviate lag issues within the parts manager, is just one testament to my commitment to improving the gameplay. Each mod I've developed is a reflection of both my passion for the game and my understanding of its intricate mechanics.
However, as a concerned fan and a technically inclined individual, I've noticed some technical nuances within the game that I believe are worth addressing to elevate the overall player experience.
Understanding Unity's Single-Threaded System:
At the heart of KSP 2's operation is a system that can be likened to a single assembly line, where every item (or game element) has to wait its turn to be processed. In simpler terms, each part of the game, is handled one by one, in a specific sequence, for every frame or update.
Think of it as reading a list of instructions. If the list is short, you can quickly read through it. But if the list grows longer, with more detailed steps, it takes much longer to read and follow.
The Problem with Parts: Every additional part in KSP 2 is like adding another instruction to this list. Whether it's a new engine, a fuel tank, or a landing gear, each part demands its own set of computations – from how it interacts with other parts, to how it responds to in-game physics. As players design more intricate spaceships with numerous components, the list becomes extensive. A single-threaded system would go through each instruction for every part, sequentially, causing a longer wait time before the entire cycle completes for a single frame.
Multiple Ships, Multiple Challenges: Beyond the intricacy of individual ships, players often have multiple ships operating concurrently – whether orbiting planets, docked at stations, or exploring new frontiers. Each ship, with its multitude of parts, represents its own list of instructions. The single-threaded system, bound by its nature, processes each ship's instructions in sequence, extending the cycle further. So, while one ship's physics and interactions are being computed, all other ships are in a waiting line, leading to even longer frame processing times.
In a gaming context, this sequential processing translates to lag and delays, especially as the game world becomes richer and more complex. It's like trying to watch a high-definition movie but experiencing pauses because the player can't process the data quickly enough.
and that's all without adding on future updates with colonies and gigantic interstellar ships with 1000's of parts.
The Evolution of CPUs and the Need for Multi-Threading:
Understanding the concept of single-threading and multi-threading can be likened to the evolution of our workplaces over the years. When Kerbal Space Program (KSP 1) was developed roughly 12 years ago, computer processors (CPUs) were akin to small offices, with typically 4 main workstations (or "cores"). Assigning one primary task (or "thread") to be handled sequentially in such an environment made sense. It was like having one main project and four employees with one working on the project (the game) while the others worked on other projects (the os).
Now, fast forward to today, and imagine the office has expanded exponentially. Modern CPUs have grown to have 8, 16, 32, or even more cores, similar to an office having multiple departments with numerous employees in each. If we continue to assign just one main project to one worker, it means that while one department is working, all others are waiting idly. This is not only inefficient but also a waste of potential, given the manpower available.
Multi-threading is like breaking down a project into multiple sub-projects and assigning them to different departments simultaneously. In the context of KSP, consider each spaceship part as a sub-project. In KSP 1, when your spaceship had a few parts, a single-threaded system could manage. But as players demand bigger and more intricate spaceships in KSP 2, the system can become overwhelmed, leading to lag and reduced performance, especially when we have so many more "departments" or cores available for work.
So, while single-threading was apt for the time when KSP 1 was released, due to the limited "office size" of CPUs, it's now outdated for the grand vision of KSP 2. The tech world has evolved, with CPUs boasting more cores, and to harness this power fully, multi-threading is imperative. It's like modernising our office's workflow to ensure every department and employee is engaged, optimising productivity and efficiency.
The Issue at Hand:
While KSP 2 is ambitious and promising, adhering to the older single-threaded model will restrict its potential. There could be a temptation to leave out certain features or simplify game mechanics to ensure smooth gameplay, Like in ksp 1. A clear manifestation of this limitation is the game lag with even a small number of parts, an outcome of its single-threaded nature.
The Potential Solution – Unity's DOTS:
Unity's Data-Oriented Technology Stack (DOTS) is a cutting-edge framework designed to harness the power of multi-threading and optimize game performance for contemporary hardware. DOTS streamlines processing, allowing for simultaneous computations, making it immensely more efficient than traditional single-threaded systems. By adopting DOTS, KSP 2 can achieve the agility and scalability essential for its ambitious goals, ensuring a seamless and enhanced gaming experience while preserving its unique intricacies.
To sum up, my intention isn't to critique, but rather to provide constructive feedback that I believe could immensely benefit KSP 2 and its expansive community. I trust in the game's vision and your team's capabilities, and I'm optimistic about what the future holds for KSP 2.
Sending my best wishes and looking forward to the game's continued success,