Jump to content

Why Unity?


Imasundaj
 Share

Recommended Posts

I was wondering why KSP was built using the Unity engine. If someone could explain to me why Unity, and why not a different game engine, that would be much apreciated.

Why is Unity better than other engines? Why is it worse? Why KSP won't move to a different engine? What would be the biggest challenge? (Apart from basically starting from scratch obviously.)

I'm simply curious. That is all.

Link to comment
Share on other sites

Well, I know that the history of KSP on the Unity engine goes all the way back to Harvester's first prototype of the game when it was still his pet project. He probably chose it because it was very accessible to a independent developer and supported all of the physics necessary for rocket simulation. The continued use of Unity, as you pointed out, is likely due to the enormous cost of switching and essentially re-codeing the whole game.

Link to comment
Share on other sites

18 minutes ago, robopilot99 said:

Well, I know that the history of KSP on the Unity engine goes all the way back to Harvester's first prototype of the game when it was still his pet project. He probably chose it because it was very accessible to a independent developer and supported all of the physics necessary for rocket simulation. The continued use of Unity, as you pointed out, is likely due to the enormous cost of switching and essentially re-codeing the whole game.

Thanks for the explanation. Much apreciated.

Link to comment
Share on other sites

Moving to a different engine would take a long time. I'd guess it'd take at least two years. And for all that time and work, there'd be very little other progress. The main reason comes down to money: Squad won't make much money from new sales in the 2+ years it takes to move, and they probably would not see much sales after the move either. Not many people line up to buy an 8+ year old game at full price. And in those two years of no progress and little to no income, they'd have all the cost of salaries and keeping the lights on at the office. There is no financial reason to move. And there's no guarantee moving to a new engine would improve anything.

As to why Unity: no one involved with the creation of KSP had ever made a commercial video game before. They had a small team, I believe just HarvesteR himself, and a small budget. Unity provided a full engine and editor that was fairly easy to use at a great price. I wouldn't be surprised if Unity's cross-platform nature had something to do with it as well. And originally KSP set out to be a 2D game. It's very likely that by the time the limitations of Unity really started to be a problem, so much work had been done that starting over would have killed KSP completely (see above paragraph about moving engines).

At this point there are game and physics engines that might be more capable at handling everything KSP needs, but I would guess that KSP is going to be a bit of trouble for most/all of them. It's one of the first modern 3D games that had "planet-sized" planets that are not only circumnavicable, but also able to be orbited, and a solar-system sized solar system able to be explored, all seemlessly and without pausing the action to load. That is not a thing that many (if any) existing engines are set up to handle right out of the box.

I would guess that if not for Unity none of would have a KSP to play.

Edited by Mako
Link to comment
Share on other sites

3 minutes ago, Mako said:

Moving to a different engine would take a long time. I'd guess it'd take at least two years. And for all that time and work, there'd be very little other progress. The main reason comes down to money: Squad won't make much money from new sales in the 2+ years it takes to move, and they probably would not see much sales after the move either. Not many people line up to buy an 8+ year old game at full price. And in those two years of no progress and little to no income, they'd have all the cost of salaries and keeping the lights on at the office. There is no financial reason to move. And there's no guarantee moving to a new engine would improve anything.

As to why Unity: no one involved with the creation of KSP had ever made a commercial video game before. They had a small team, I believe just HarvesteR himself, and a small budget. Unity provided a full engine and editor that was fairly easy to use at a great price. I wouldn't be surprised if Unity's cross-platform feature had something to do with it as well. And originally KSP set out to be a 2D game. It's very likely that by the time the limitations of Unity really started to be a problem, so much work had been done that starting over would have killed KSP completely (see above paragraph about moving engines).

At this point there are game and physics engines that might be more capable at handling everything KSP needs, but I woyld guess that KSP is going to be a bit of trouble for most/all of them. It's one of the first modern 3D games that had "planet-sized" planets that are not only circumnavicable, but also able to be orbited. That is not a thing that many (if any) existing engines are set up to handle right out of the box.

I would guess that if not for Unity none of would have a KSP to play.

Thanks for the answer.

Link to comment
Share on other sites

1 hour ago, Imasundaj said:

Why is Unity better than other engines?

Unity has more cross platform capability and has no royalties.  Unreal, for one example, requires 5% royalties which can be expensive for an indie developer.  CryEngine is only for PC and Consoles.  Unity supports all kinds of devices, including tablets and phones (which may not be useful for KSP, but it's there)

Quote

Why is it worse?

It's not as powerful as Unreal or Cry.

Quote

Why KSP won't move to a different engine?

Why would it move to a different engine?  Moving to a completely new engine would be almost starting from scratch.  At that point you are developing KSP 2.  That could happen.

 

Quote

What would be the biggest challenge? (Apart from basically starting from scratch obviously.)

Staffing.  Developers are often more fluent in one engine or the other, even if they have used them all.  Most likely all of Squad is fluent in Unity, but have little, if any, experience in Cry or Unreal.

 

I'm not sure why people think that it should switch engines, but this topic comes up a lot.  KSP is a pretty unique concept, and the Unity staff has worked well with Squad to make it fit.  I doubt any other engine would have had less issues along the way.

Edited by Alshain
Link to comment
Share on other sites

11 minutes ago, Alshain said:
1 hour ago, Imasundaj said:

What would be the biggest challenge? (Apart from basically starting from scratch obviously.)

Staffing.  Developers are often more fluent in one engine or the other, even if they have used them all.  Most likely all of Squad is fluent in Unity, but have little, if any, experience in Cry or Unreal.

But that really just comes back to money. Hire new people who know the new engine, or keep the same people and take even longer. Either way, any move that is going to take years is going to cost a lot for very little return. It's not a good investment.

I do agree with you that the only way an engine move is likely to occur is if they decide to make a sequel. That's something new and people would be more likely to pay full price.

Edited by Mako
Link to comment
Share on other sites

having personal experience with unity, and having worked with other platforms to compare - I'd like to rephrase the main question here to:  why NOT unity?

 

seriously, it can do more than ppl give it credit for - being easy to use does not mean it's less capable.

while it may lack the prefabricated eye candy advertised in favor of the oodles-more-expensive platforms generally considered "top notch" - there is really no reason why those engines are truly more or less capable in a practical sense.

which means, there's nothing you can do with a multi-million dollar engine that you cannot also do with unity, provided you're willing to go and actually DO it

in practice, that makes it MORE capable, since less pre-made "gimmicks" means a lot more flexibility and efficiency - things which at times are sacrificed for superficial "wows" with visual appealing showpieces

 

it's really not what the engine can do for you - it's what you can do with the engine

 

there are less than zero reasons for moving to another engine - yes, negative reasons, that is - i.e:  reasons exist for sticking with it, for it is a tool that has not yet failed to deliver, or held back progress in any major way (ok, there was the 64bit deal, but that's not the case anymore)

in other words, why fix what ain't broken?

Edited by Moach
Link to comment
Share on other sites

In the hypothetical situation that a engine change would be possible, the only reason I'd care to switch is if there would be a definite and significant performance increase. Graphical bells and whistles are nice, but a higher frame rate with a higher part count would be just about the only thing that would really interest me.

That said, I'm not complaining about the state of things now, rather I'm saying I welcome improvements if and when they're possible.

Link to comment
Share on other sites

2 minutes ago, Mako said:

In the hypothetical situation that a engine change would be possible, the only reason I'd care to switch is if there would be a definite and significant performance increase. Graphical bells and whistles are nice, but a higher frame rate with a higher part count would be just about the only thing that would really interest me.

That said, I'm not complaining about the state of things now, rather I'm saying I welcome improvements if and when they're possible.

 

that would be much harder to achieve with an engine change than by more "sane" means, such as: optimization

 

there are many little things that add up and make performance unnecessarily slow - I could go on and on about them, but the main thing really is: none of those things actually require a new engine to optimize :wink:

 

for one, if it were up to me, I'd have parts load "on demand" rather than all at start - this would allow 32bit users to hoard as many mods as desired without memory overloads - also, a number of parts included in physics simulation could also do just as well without (this is more dependent on mod makers actually taking the necessary measures not to waste resources too) -- plus, a billion other little technical things which can only be determined by going over the logic and seeing what could use a little buffing around the rougher edges

 

I know of a few gritty quirks of how KSP works under the hood that spell a clear difference in my programming style from that of my brother... and some of those provide good starting points for optimization...

 

oh well - not that I can do much about them...

 

 or could I?

 

Link to comment
Share on other sites

7 hours ago, Moach said:

in other words, why fix what ain't broken?

The main thing that Unity tends to be blamed for a round here is garbage collection stutter. I don't know what other engines do, but having the main thread stop completely every few seconds to collect all disused heap memory is really inconvenient for a game with such an active modding scene.

Link to comment
Share on other sites

Unity also gets blamed for issues involving robotic parts like those from Infernal Robotics and the horrible PhysX wheel collider that appears to have been designed with one single use case in mind and is so inflexible that it took months upon months to implement and crazy workarounds to get to a point that's functional for KSP. These are things I'd love to see resolved, along with the inability to have part branches attach to other branches/main trunk.

I don't know if robot parts can be implemented well under Unity or not, but the other two items could likely be fixed without changing engines. It would require a ton of work for very little actual gain, so I don't ever expect it to happen, but these are the kinds of improvements (along with general performance) I would most like to see.

Obviously the impossible, perfect world scenario is the one where KSP is remade from the ground up on custom-built graphics and physics engines that are tailor-made for its specific needs. It is practically impossible that KSP would ever be moved to a new engine, so it's a moot point, but I wouldn't be surprised if some other engine exists that would better meet KSP's needs than the one-stop shop that is Unity. Ideally it would be an engine that allows the developer to have access to all parts of the engine and make changes as they needed. This is all pie-in-the-sky wishing, but so is entertaining the idea of an engine change and (I think) so is enertaining the idea of any major performance improvements to KSP.

Link to comment
Share on other sites

On 5/4/2017 at 0:02 PM, robopilot99 said:

Well, I know that the history of KSP on the Unity engine goes all the way back to Harvester's first prototype of the game when it was still his pet project. He probably chose it because it was very accessible to a independent developer and supported all of the physics necessary for rocket simulation. The continued use of Unity, as you pointed out, is likely due to the enormous cost of switching and essentially re-codeing the whole game.

"Supported all the physics necessary for rocket simulation" isn't quite true and has bitten him (and successors) more than a few times.  The catch was that it could simulate rockets quite well, but since it is stuck in 32-bit (single floats, no relation to the "64 bit" edition that simply allows more memory in use) mode it doesn't work well at interplanetary scales (see the Kraken and how it was slain).

Harvester didn't design KSP with anything like .18 in mind (he certainly didn't plan on having a solar system, and probably not even a Mun to visit).  Had he thought it would turn into something like that, he might not have gotten started (he'd be still hacking away at the double precision physics engine).  When he first posted on the Orbital forums, he was expecting it to remain 2-d...  Don't underestimate the power of working code.  The goal is to keep the code working, not to start out with "perfect" code.

Link to comment
Share on other sites

59 minutes ago, wumpus said:

"Supported all the physics necessary for rocket simulation" isn't quite true and has bitten him (and successors) more than a few times.  The catch was that it could simulate rockets quite well, but since it is stuck in 32-bit (single floats, no relation to the "64 bit" edition that simply allows more memory in use) mode it doesn't work well at interplanetary scales (see the Kraken and how it was slain).

Are you you aware you are arguing with yourself?

Link to comment
Share on other sites

17 minutes ago, Alshain said:

Are you you aware you are arguing with yourself?

It could simulate the physics of a rocket burn quite well.  Interplanetary trajectories, not so well.  Two separate issues.

Link to comment
Share on other sites

1 minute ago, wumpus said:

It could simulate the physics of a rocket burn quite well.  Interplanetary trajectories, not so well.  Two separate issues.

But you made a strawman argument.

Paraphrased:

robotpilot99: It supported all the physics for rocket simulation

wumpus: No it did not support all the physics for interplanetary travel, but it did support all the physics for rocket simulation.

You see the problem here, right?  He was making one point, which was accurate and you agreed with him, but you stood up a straw man argument to attack instead... a argument that he never advanced in the first place.

Link to comment
Share on other sites

Eh, that's not a strawman argument, that's more of a clarification of a subtle difference most miss.  Granted, a difference small enough most would consider pointing it out as pedantry, but a difference nonetheless.  

Link to comment
Share on other sites

39 minutes ago, storm6436 said:

Eh, that's not a strawman argument, that's more of a clarification of a subtle difference most miss.  Granted, a difference small enough most would consider pointing it out as pedantry, but a difference nonetheless.  

Well, I disagree.  It's pretty textbook stawman.  Clarification wouldn't have said his statement wasn't true and then later agreed with the same statement.  It would have been fine if he made the remark on it's own, but he offered it as a counter argument to an unrelated statement.

Edited by Alshain
Link to comment
Share on other sites

2 hours ago, Alshain said:

Well, I disagree.  It's pretty textbook stawman.  Clarification wouldn't have said his statement wasn't true and then later agreed with the same statement.  It would have been fine if he made the remark on it's own, but he offered it as a counter argument to an unrelated statement.

But that was never the point.  Unity was fine for what Harvester announced on the Orbital forums.  Unity wasn't enough once they added the solar system.  And if you look at the original statement, I suggested that using Unity was likely *still* the right decision as they were able to kludge the Unity physics into "close enough" (but don't ask the principia guys about it).  Software isn't a single unchanging block.  The needs that the software started with aren't the needs it has now, even though it is tied to the decisions of the past.

Link to comment
Share on other sites

40 minutes ago, wumpus said:

But that was never the point.  Unity was fine for what Harvester announced on the Orbital forums.  Unity wasn't enough once they added the solar system.  And if you look at the original statement, I suggested that using Unity was likely *still* the right decision as they were able to kludge the Unity physics into "close enough" (but don't ask the principia guys about it).  Software isn't a single unchanging block.  The needs that the software started with aren't the needs it has now, even though it is tied to the decisions of the past.

Which is exactly what robotpilot99 said, launching rockets.  That's what Harvester's original design was.  He said nothing about orbitial mechanics, YOU made that argument so that you could then attack it.

Edited by Alshain
Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...