• Advertisement

Archived

This topic is now archived and is closed to further replies.

[java] Realtime java

This topic is 6303 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

  • Advertisement