Why Java?

In the past couple of weeks, a couple of different people have questioned my use of Java to create this game. One on reddit, another on twitter. For those interested, I’ll be happy to give an explanation.

First off, let’s dispense with the religious arguments. There are people who treat programming like a religion and are quick to criticize anyone who uses a language they don’t prefer. I am not one of those people but, when you see criticisms keep in mind that a lot of them are dubious and based on subjective rather than objective criteria.

As a professional software developer for almost 30 years, I have written graphical applications in C, C++, Smalltalk and Java. I’ve even dabbled in Objective C for iOS applications. When you work for businesses, you learn rather quickly to set your personal preferences aside and choose what looks to be the best (i.e. cheapest and fastest) solution for a particular problem.

When I originally started Java MOO over a decade ago, it was to learn Java and writing a fun game seemed like a good way to stay motivated. When I restarted this project in February, Java still seemed like the best way to go although I did briefly consider other languages.

For performance, you can’t beat the C programming language. It has been called a useful abstraction of assembler, and that description fits pretty well. C++ is basically C with object-oriented abstractions built onto it. Java and Smalltalk are built from the ground up as object-oriented languages and have built-in garbage collectors (unlike C,C++). C#, or “C-sharp” is basically just “Microsoft Java” and brings little new to the table at the cost of portability, although it certainly has its supporters whom I have no doubt offended greatly.  I DON’T CARE. YOU ARE ALL ON THE DARK SIDE!

To me, the tradeoff is between performance (C,C++) vs. development time (Java,C#). While the built-in garbage collector makes Java/C# slower, it is also the very thing that speeds application development with a higher quality. To give you an idea of what that means, Minecraft was written in Java by one guy.

Let’s remember that Master of Orion is a turn-based game with 2D graphics. In other words, high performance is not a concern. There is no need for 3D graphics rendering or even to use 3rd-party engines like Unreal, which is written in C++.

Given that, either Java or C# would be preferable development choices. And since Java applications are designed to be portable across multiple operating systems, that gives it the edge over C#. With no additional effort on my part, Java MoO automatically runs on Windows, Macs and Linux boxes. 🙂

Those are the reasons. Java is a great universal language, as are C, C++ and C#. But Java fits this project better, imo.

Final note: I feel like I shouldn’t even have to mention this, but there also seems to be some fear-mongering that Java is a security risk for computers. This is absolutely untrue for Java applications (like Java MoO). It is true, however, for Java plugins for your browser which allow websites to run remotely-loaded Java applications on your PC. You should not be doing this and I believe that all of the browsers come with Java plugins disabled, so it’s not even really an issue. It makes for great clickbait, though.

2 thoughts on “Why Java?”

    1. There are already several MOO2 remakes in work, not counting the upcoming MOO4 from Wargaming. Most notably, “Lord of Rigel” and “M.O.R.E” are supposed to be inspired by MOO2.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s