Jump to content

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


Xyphos

Recommended Posts

I have to agree with jwenting that your understanding of "platform-independent" doesn't agree with any definition I have come across. The phrase means that the Java specification was written in such a way that Java authors can be ignorant of the peculiarities of any particular platform, so long as they stick to basic Java calls and avoid OS calls native to a particular platform. If I write a "Hello World" program it will run on any platform for which there is a JVM, and I don't have to do have code-forks for it to run on both Windows and OSX. The exact same bytecode will run on any JVM. No changes. Platform independent.

There's no profit in saying "each platform needs a different JVM" because JVMs have been written for just about any platform a person might want to run Java on. It's like saying that Rich Text Format is platform dependent because it needs RTF-authoring apps to be written for each platform.

Java was never intended to be fast to execute, it was intended to be portable - in other words, it was intended to make porting it to different platforms fast.

And as for "what is wrong with C"? Well the fact that even simple code needs to be rewritten to run on a second platform can get a bit expensive...

Edited by softweir
Link to comment
Share on other sites

--UPDATED--

At least someone has a sense of humor.

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

You should have stated this at the beginning. Being on the internet, we can't see the expression on your face when posting a thread.

You have, however, managed to stimulate 6+ pages of comments, from which I can deduce the age of most people on this board. =D

Link to comment
Share on other sites

But I think it should have been written in bare-metal assembler, with it's own boot disk and Squad-written custom drivers for every supported hardware combination. Surely I'm not the only one who misses manually assigning IRQs and buffer addresses to each device on the system bus. Why, installing your game and getting it to eventually run was like getting a whole extra game, for free!

A few even came with hexadecimal patches you'd type directly into a disk sector editor. These kids today don't know what fun they're missing.

;)

Link to comment
Share on other sites

...Surely I'm not the only one who misses manually assigning IRQs and buffer addresses to each device on the system bus. Why, installing your game and getting it to eventually run was like getting a whole extra game, for free!...

No, you are not the only one :P I do sometimes miss those dark old days.

I had to dredge the memory fairly deep not too long ago, for more serious matters: Working with '80s automation gear and 8-bit ISA interfaces. It was a 'game' alright.

Much shagging about and reading of manuals (fluent binary required) to get things to work, but bare metal assembler or real-mode DOS sure was runtime efficient.

Link to comment
Share on other sites

And as for "what is wrong with C"? Well the fact that even simple code needs to be rewritten to run on a second platform can get a bit expensive...

Nah, you don't have to rewrite for every platform, just abstract all your system calls to a platform interface class, write one of those for each platform you care about, disambiguate them with a pre-compiler directive, and just recompile with the appropriate options on each platform. Easy-peasy. :rolleyes: (this forum needs an :evil_grin: emote)

Link to comment
Share on other sites

But I think it should have been written in bare-metal assembler, with it's own boot disk and Squad-written custom drivers for every supported hardware combination. Surely I'm not the only one who misses manually assigning IRQs and buffer addresses to each device on the system bus. Why, installing your game and getting it to eventually run was like getting a whole extra game, for free!

A few even came with hexadecimal patches you'd type directly into a disk sector editor. These kids today don't know what fun they're missing.

;)

Good, God... I kinda miss those days, but also makes me appreciate the higher-level languages.

Back when I started programming, I learned x86 ASM on a 486DX that ran DOS 3.0 - I actually manually wrote a few IRQs and COM buffers.

Edited by Xyphos
Link to comment
Share on other sites

...I learned x86 ASM on a 486DX that ran DOS 3.0...
Sounds rather familiar, mine was a hand-me-down 386SX25 with HGA graphics, 4MB RAM and an 80MB HDD... wringing performance out of that brick was a bit of an art, especially with no FPU.

Eventually I accidentally put the CPU in backwards... and out came the magic smoke. :(

Link to comment
Share on other sites

At least someone has a sense of humor.

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

Apparently not, but one could be forgiven for thinking that it was a little insane. :D

Link to comment
Share on other sites

I have to take a small bite of this bait and say that Java isn't such a bad choice for game development at all, especially if you're a lone developer or a small team. Especially when using LibGDX these days you can be quite productive and make really nice things. Also, Oracle's Java runtime is performance-wise nothing to sneeze at, it's an extremely optimized beast of a thing.

Yes, in theory any game is best developed using a highly skilled team of hundreds of C / assembly coders, but in practice small teams have to try to make something as efficiently as possible. Unity is an awesome platform for that, but Java isn't such a bad choice when it comes to being productive either (especially if you code Java in your day job :rolleyes:).

Ok nom nom that was some tasty bait.

Link to comment
Share on other sites

* 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.

When I say "crash," I don't mean just the dreaded blue screen of death. I mean any exception, such as a null pointer exception.

Link to comment
Share on other sites

Wow. This thread really escalated from innocent joke into platform discussion. Never thought it would happen.

My 2c. Java is awful. It's a perfect example of DLL hell, when different versions of runtime aren't compatible or interoperable and different apps ask you to upgrade and downgrade your JRE at the same time, and everyone else pulls its own jre along, or even installs it into the system. It even has its own freaking tzdata! GC is ridiculously bad, way too often I've seen recommendations to "just restart the container" if enterprise-class app is misbehaving. I've seen application servers where such restarts were scheduled daily. What's worst for me is that hardware manufacturers LOVE making management utils in Java. I've seen worse only once, when Hitachi storage management web app asked for Adobe flash.

Java is BAD.

PS Maybe there are good Java apps. I have never met one.

Link to comment
Share on other sites

PS Maybe there are good Java apps. I have never met one.

I've used jEdit for code editing and Art of Illusion for raytracing, they are written in Java. RuneScape and the PC version of Minecraft are written in Java.

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.

--UPDATED--

At least someone has a sense of humor.

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

Well to be fair to the "rest", you suck at writing satire.

Link to comment
Share on other sites

PS Maybe there are good Java apps. I have never met one.

Most (well, let's say "a large part of" to avoid useless flamewars) large scale web site back-ends are made in Java. I am sure you used some of them.

Link to comment
Share on other sites

Most (well, let's say "a large part of" to avoid useless flamewars) large scale web site back-ends are made in Java. I am sure you used some of them.

I know (see "application servers" in my previous post). I've had a pleasure to maintain and troubleshoot this kind of stuff. Not the best memories.

Link to comment
Share on other sites

Most (well, let's say "a large part of" to avoid useless flamewars) large scale web site back-ends are made in Java. I am sure you used some of them.

Considering the amount of coffee we drink, I'd assess that as 'true'.

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...