[java] Realtime java

Started by
2 comments, last by Spyder 23 years, 6 months ago
What will realtime java do for a java game? Will be faster to run?
Advertisement
I would imagine that real time capabilities would have very little application in typical game development. Real time development becomes an issue when the computation of results in your code are dependant on a time factor. An example is a robotic arm that picks up a box from a conveyor. The code that controls that robot must instruct the movements so that the arm picks up the box exactly as the box moves beneath the platform. You can not have the instruction to move the robot arm occur early or late or the robot would miss. As you can imagine a typical Java VM does not allow the necessary control to manage code execution based on a reliable time table.

There is overhead involved with ensuring code executes according to a time table in a real time capable JVM. This overhead would probably decrease the performance of a game. Typically you want games to execute instructions as fast as possible, not according to a real-life time-table. Worse yet, this lost performance would more than likely not get you anything. You might be able to achieve more realism by adding real time features to a game, but the increased amount of realism is not going to be substantially noticeable versus a game engine that just simulates real time events. Further, the code that simulates real time events is going to have better performance.
ok, what can be done to speed up a java program in terms of OS and hardware? Is linux for instance faster than running in windows? Does java benefit from multiple processors etc.? Any other views/aspects that can increase speed?
RT-Java will allow you to write air traffic control applications in java (basically).

To speed up your java programs you can either optimize your code, so that the outputted byte-code will run more efficiently on any platform, or experiment with different virtual machines. IBM is generally known to be the fastest on Win32 & GNU/Linux. Lastly there is JNI so that you can link with native libraries, but the overhead of JNI calls can offset the speed, unless you are use hardware acceleration in your native libraries.

This topic is closed to new replies.

Advertisement