Jump to content

I think this game should have been written in Java with OpenGL


Xyphos

Recommended Posts

Minecraft did it, and it performs very well, on all platforms.

I'm getting sick of the random crashes, consistent memory leaks, and the 32-bit memory limitation; my OS kernel called, it wants the memory allocation harassment to stop. I don't even use a pagefile cuz of the SSD.

--UPDATED--

Wow...just wow.

Best laugh I've had on these forums for a while.

At least someone has a sense of humor.

for the rest who don't, this thread was satire.

Edited by Xyphos
Link to comment
Share on other sites

Honestly not sure what you're talking about. I run DX11 with about 40 mods and crash maybe once a week. If anything, I would have liked to see the game on Unreal Engine 4 or Cryengine 3, not a more basic engine.

Link to comment
Share on other sites

I think the engine was chosen because when KSP started nobody had an idea how beautiful, large and complex the game would become. The way I remember it it all started out as a fun, little game to waste a couple of hours and the first keys were given out for $7 donations. KSP has come a long way since then and imo we can be happy how well Harvester and Squad have managed to integrate the constantly growing complexity and requirements into Unity.

I'm hoping there will be a KSP 2 at some point with an engine that allows even more. Larger textures, plentiful particle effects, neater physics calculations and more mods. Until then: Well done, Squad!

Link to comment
Share on other sites

Minecraft is poorly written, but that's not because it's written in Java...

Had KSP been written in Java it would never had been released. There's nothing like Unity for Java, so Squad would have to have written the entire physics engine themselves, the 3D rendering engine, everything, which would have been cost prohibitive.

Link to comment
Share on other sites

Had KSP been written in Java it would never had been released. There's nothing like Unity for Java, so Squad would have to have written the entire physics engine themselves, the 3D rendering engine, everything, which would have been cost prohibitive.
Exactly.
Link to comment
Share on other sites

KSP should have been written with an in-house engine, in a real programming language - by which I mean native C.

The fascination with these new-age lazy languages eludes me. Java? why? Call me old-school, but I can't think of a more inefficient way of doing business.

OTOH, given the size of the dev team and available resources, Unity was probably the only viable solution at the time. Warts and all.

The whole argument is flawed, why would Java make the game better? It's the engine architecture that's limiting here, not the programming language it's written in.

You want faster? KSP should have been written in x86 ASM. Any idea how much work that would be? ;)

Link to comment
Share on other sites

Minecraft did it, and it performs very well, on all platforms.

I'm getting sick of the random crashes, consistent memory leaks, and the 32-bit memory limitation; my OS kernel called, it wants the memory allocation harassment to stop. I don't even use a pagefile cuz of the SSD.

Make no mistake, MineCraft had plenty of crashes, especially in the beginning builds. Perhaps even more so than KSP now.

I should know, I played MC from alpha onwards.

Java and Unity are engines that can do almost everything on almost any platform.

The downside is that any game made with such an engine is always going to run worse than the same game made with a custom engine specifically written for it (like steve_v said).

The best chance you will have for a superb running KSP is on the PS4. That is known hardware that's the same for everyone, thus games can be written optimally.

As long as people have different computers, there'll always be some who'll have problems. This goes for any engine. The best Squad can do is hear those problems and correct them when they can.

Link to comment
Share on other sites

So many misconceptions.

Java is not an "engine". It is a programming language. The most common install of Java the programming language includes a software development kit (SDK) that includes a lot of functionality to make the lives of programmers easier like GUI library functions and so on. It is no "engine" though and it lacks a lot of functionality a game engine like Unreal, Unity or Frostbite provide. The choice of Java for Minecraft is also probably the biggest drawback and issue for minecraft.

Secondly writing a game engine from scratch is hard and a huge waste of time and development budget. Being under the delusion that you'd have to write your own engine has killed many studios already.Studios that were usually way bigger and had way more money. It usually leads to a buggy mess that lacks even the most basic functionality a commercial off the shelf engine like Unity or Unreal offers. The amount of time and effort is almost always better spent getting it to run in one of those engines and extending them if necessary.

Thirdly the choice of programming language matters less than you think. If KSP had chosen language X over Y or engine A over B chances are that you'd notice no real difference. It might even crash the same amount. What matters is that you chose a programming environment that offers you everything you need to develop a game. Decent tool support (debugging, editing and compiling code, helper tools to debug memory usage, static code analysis etc.), helpful documentation and add-on libraries and the ability to extend and modify existing code and systems (important for modding)

Most of the current issues KSP faces have nothing to do with Unity or the C# programming language. The stem from design choices the dev team made in the beginning that turned out to be not entirely suitable to the way KSP has evolved (a fact Squad can't be blamed for because no one else would have known that right from the start). Also from the fact that Squad favors new features over cleaning up code and fixing long-standing issues. Which is understandable but means that bugs pile up over time and reinforce themselves.

- - - Updated - - -

When the switch to Unity 5 and 64 bit is complete the biggest explanation for KSP's issues (game crashes due to the game process hitting the 3.5 GB memory barrier) will be gone. We'll see how many issues remain then that can o longer be blamed on 32-bit Unity.

Link to comment
Share on other sites

Seriously, if you have complaints about how/why Squad did what they did, go and do it yourself, then when you're rolling in the riches, you can say "See, I told you so".

This was a pet project that got way out of hand in a very Kerbal fashion. All the more kudos to Squad, who are basically a garage startup company, who rarely actually meet face to face from what I can tell, for making such a fun and fascination game.

Link to comment
Share on other sites

Even if you account for bugs and limitations of the engine itself, the benefits of its use outweigh the freedom of implementation and complete control of the code when doing everything from scratch. That's why people make engines and frameworks in the first place. If there are bugs in the engine, work should go towards contributing to it, and not reinventing the wheel on your own code. Have you not heard the term 'reusability'? Just to think of implementing all the physics involved in KSP from scratch in Java.. yuck!

Link to comment
Share on other sites

Minecraft did it, and it performs very well, on all platforms.

I'm getting sick of the random crashes, consistent memory leaks, and the 32-bit memory limitation; my OS kernel called, it wants the memory allocation harassment to stop. I don't even use a pagefile cuz of the SSD.

Maybe SQUAD will print this out, and stick it to their office fridge with a magnet!

Link to comment
Share on other sites

All things considered I feel Unity was the right choice for KSP. It was an affordable off-the-shelf engine letting the project get started quickly and it's proven capable of handling a game on KSP's scale. Many game engines, the oft-vaunted Unreal Engine included, would have real trouble with it.

However, I don't feel it still is the right choice. The problems are well-documented, and Squad now has the resources to make a KSP 2 on a much better game engine. KSP 1 needs performance tweaks and many many bugfixes, but I don't feel it can go much beyond what it is.

Link to comment
Share on other sites

He is concerned that the paging mechanism of modern operating systems will ruin his SSD due to excessive write accesses. (Hint: it won't)

He therefore turned a gradual decline in system performance (the OS swapping out unused memory to disc when RAM gets limited) into a full on system crash (the OS kernel crashing as soon as peak memory usage exceeds actual physical RAM)

Which is rather stupid in my opinion but to each his own I guess

Link to comment
Share on other sites

Minecraft was a crashy buggy POS for a very long time.

You ser, have no clue what you're talking about, and it's better for the world if you would just stop talking.

(Software developer here)

Link to comment
Share on other sites

Minecraft did it, and it performs very well, on all platforms.

I'm getting sick of the random crashes, consistent memory leaks, and the 32-bit memory limitation; my OS kernel called, it wants the memory allocation harassment to stop. I don't even use a pagefile cuz of the SSD.

Uh, no.

* Java does not fix random crashes. It's a great language, but apps written in Java can crash like any other language.

* Java does not fix memory leaks. Sure, it helps a lot with memory management via a garbage collector, but you can still get memory problems if you're not careful. You have to release all references to something before it will be garbage collected. Not to mention that letting the language perform its own memory management leads to problems with games - a lot of Java games stutter occasionally as the garbage collector pauses the entire VM to sweep the memory.

* Java actually limits the amount of memory given to an application. Which is why web pages exist that tell you how to have it give you more memory. So it has its own version of the 32-bit memory limitation.

* Unity provides a lot of features (such as physics) that would need to be written from scratch if they were to use Java. Why reinvent the wheel?

I don't even use a pagefile cuz of the SSD.

One thing I can tell you for sure is that no language in the world can fix memory limitations imposed by your own hardware and decision not to use a pagefile.

Modern SSDs should be fine with pagefiles. The situation has improved greatly since the early days.

Link to comment
Share on other sites

KSP should have been written with an in-house engine, in a real programming language - by which I mean native C.

Surely you meant Fortran actually Lisp.

But yeah, Java has its own weird memory management issues, its garbage collector can get really funky, especially if you tend to allocate/deallocate lots of objects in short timespans, wouldn't actually solve any problems, but would install an Ask Jeb toolbar that one time you forgot to unclick something during an update.

Link to comment
Share on other sites

Fortran, Lisp, C, Java? Pah! When I started out we didn't have such fancy schmancy high level languages. We had to make do just with ones and zeroes. Sometimes we didn't even have ones.

Seriously though Unity is a great choice and C# is actually a really good language. You'd almost certainly run into similar issues using Unreal 4 and C++/Lua or in fact any other game engine/language combination.

- - - Updated - - -

Friends don't let firends program in java though

Link to comment
Share on other sites

What does this mean?

In the early days of SSD using a page file (something that frequently gets erased and rewritten) would damage the drive because of the nature of limited writes on an SSD. Unfortunately these misconceptions continue after the problem has been resolved. Such is the case now because all operating systems and SSD drives have implemented wear leveling techniques so no one spot on the drive gets written to more than the others.

Link to comment
Share on other sites

The funny part is that disabling the pagefile doesn't even stop the memory manager from paging things out. :/

It does stop it from paging to that drive. At least in Windows. Keep in mind in those days, using a dedicated SSD was unheard of and only computer scientists and strong enthusiasts were willing to spend the cash to get an SSD (my first SSD had barely enough for a Windows installation and cost about 10 times what a 500GB drive costs now). When we did it was very tiny, so we always had an HDD with it.

Link to comment
Share on other sites

Uh, no.

* Java does not fix random crashes. It's a great language, but apps written in Java can crash like any other language.

* Java does not fix memory leaks. Sure, it helps a lot with memory management via a garbage collector, but you can still get memory problems if you're not careful. You have to release all references to something before it will be garbage collected. Not to mention that letting the language perform its own memory management leads to problems with games - a lot of Java games stutter occasionally as the garbage collector pauses the entire VM to sweep the memory.

* Java actually limits the amount of memory given to an application. Which is why web pages exist that tell you how to have it give you more memory. So it has its own version of the 32-bit memory limitation.

* the only random crashes are those caused by hardware. Be it power fluctuations (and are those really random?) or high energy particles from a solar flare interacting with things and causing stray currents.

* mind that you can implicitly release something by releasing the container it's in (as long as there's no reference to it elsewhere). As to GC gobbling up the entire CPU, that's almost always a problem with a poorly configured GC in combination with a bad programming error causing an excessive amount of object creation, resulting in full GC being scheduled faster than it can be executed. I've been writing Java professionally since 1997 and only seen it once or twice in all that time.

* yup. No need to consult a website though, the JVM has a help text and documentation that explains it quite well.

* there might be commercial grade Java physics engines.

All that said, I don't consider Java the right choice for a game, especially something like KSP. It's not what the language and runtimes are optimised for.

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.

×
×
  • Create New...