News:

Precision Simulator update 10.174 (26 April 2024) is now available.
Navburo update 13 (23 November 2022) is now available.
NG FMC and More is released.

Main Menu

Java advances during PSX development

Started by Richard McDonald Woods, Thu, 20 Mar 2014 16:01

Richard McDonald Woods

Hi Hardy,

During the period of your PSX development, Java has also been developed. We now have the release of Java 8 with Lambda Expressions 'taking the headache out of making Java software run on multi-core' (The Register, 20 March 2014 'Reality check: Java 8 finally catches a multi-core break'

Have you had to constantly make changes to your use of Java as these advances have been made?
Cheers, Richard

Hardy Heinlin

#1
Hi Richard,

I've been using Java 1.4 ... 1.6 ... 1.7 during the past years. I'm not at 1.8 yet. Minimum requirement to run PSX is Java 1.6, so that Mac users can run it on the slightly older but still brilliant OSX 10.6.

The support for multicore per se is not new in the Java world. PSX can do this already, because the previous Java versions provide this as well.

If I understand the announcement correctly, Java 1.8 will not require the programmer to write multiple threads.

But this is irrelevant to PSX, as PSX already operates in multiple threads. So, Java (older Java) and the multicore processor can decide which thread is to be run by which core.

In PSX there are at least 6 independent, permanently running threads, each running at a different heartbeat, optimized for specific tasks, such as aerodynamics at maximum speed, electrical model at a medium speed, ATC at slow speed for example, just to name a few of the zillions of tasks that run in infinite loops. There is also an independent thread for the Instructor pages, e.g. when a large terrain map is being loaded on the Instructor's map, the simulation is not frozen. Aside from those permanent threads, additional temporary threads may run here and there, in order to not stop the simulation when a separate, complex calculation is to be done, or when data from a file is to be loaded during runtime (flighttime).


Cheers,

|-|ardy

John Golin

Having picked up Java after learning Hardy was using it, I am amazed by how much the language can do cross platform, and how well.
John Golin.
www.simulatorsolutions.com.au

Richard McDonald Woods

Cheers, Richard

Jeroen Hoppenbrouwers

Can we collect example of Java projects that are comparable to PSX in their use of graphics and audio and such?

I believe that the vast majority of Java is deployed in the "boring bean counter" business, business applications that run processes in companies and other near-invisible stuff. It is huge on the server but I've not much visibility on clients. I probably miss stuff. Hence my curiosity.


Hoppie

DougSnow

The majority of our applications at work, such as our Flight Planning System (the front end), our Alert Messenger (ACARS system) and so on are all written in java.

If a Java programmer wants to live in this area, a job is almost guaranteed...

John Golin

Wow... I did a quick Google - check out JMonkeyEngine ....  there are some impressive vids on YouTube...
John Golin.
www.simulatorsolutions.com.au

evaamo

#7
Minecraft, the popular game millions of kids are playing, is written in Java. And let's remember that most of the games that run on Android are written in Java using an API for 3D acceleration called OpenGL ES. The difference is that in desktop / laptops, the Java runtime you're more likely to use is Oracle's Java runtime (JRE). In the case of Android, you will find a different one called Dalvik, created by Google (or copied, if you ask an Oracle executive!). PSX is developed using a 2D graphics API called Java2D, which makes the results obtained by Hardy in terms of performance even more amazing!!!

cheers,
Enrique
Enrique Vaamonde