Artwork: Psilon spy

As in the original game, the Psilon spy is wearing a stealth outfit. Here, it is a black bodysuit that transforms to a bluish transparency. This particular frame shows it about halfway through the transformation.

Psilon_Spy_04

Advertisements

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.

More espionage features

ok, the ability to choose which technology category you want to steal from is now functional. All that is left is the ability to frame races, which comes next. Below is the UI for choosing the category. It will probably get some additional visual polish, but it’s good enough now to move onto to the next piece.

espionageChooseTech

More spying notifications

I added a couple of notifications tonight for the player. The first is for when an enemy spy is caught and confesses, the other is when the player finds out that an enemy spy has stolen a technology from  him. In both cases, the player’s diplomat character will give him the notice.

The first is only displayed if the player is not at war with the spy’s empire, while the second is displayed every time it happens. Both of these are events that occur in the original MOO1 and in this game, but the original does not give notice of the first event.

I  still need to add the ability to frame a race  (pretty easy) as well as the gui to allow a player to select a technology category to steal from (easy, but tedious).

The two notices look like this:

SpyTechStolen

 

SpyConfessioon

Espionage in progress

Espionage is now mostly working. You can assign spies to commit espionage and they will eventually steal technology for you. There are still a couple of things to add before it’s officially done, but the core logic works now. Below is a screenshot of a Bulrathi spy stealing from a Meklar laboratory.

I still need to add a UI allowing the player to choose which technology category he wants to steal from (currently randomized) as well as notifications to the player when he catches the AI stealing from him.

BulrathiEspionage

 

Spy networks and catching spies

The code and UIs needed to support setting up spy networks and the internal security to catch spies is complete.

Below is a screenshot of a spy report on an enemy Bulrathi system. Basically, you get information about a system’s population, factories, bases and shield level. This information is refreshed any turn that have an active spy network against that empire. In the original game, this information was available but you had to jump through hoops to find it.

spiedsystem

Each turn, you have a chance to catch any enemy spies in your empire (improved by internal security spending) or for any of your spies to be caught. Any turn that either of those things happen, you will get an update. In MOO1, you had to proactively ask for this report each turn. In Java MOO, it will pop up any time that an event occurs.

spiescaught