See what's going on with flipcode!




 

Java In Games
Question submitted by Anonymous (15 July 1999)




Return to The Archives
 
  What are your thoughts on the future of Java as it relates to game programming? I believe RBR were using Java as the scripting language in their (unfortunately terminated) Prax War project. How would that work, and how would using Java compare to using something such as UnrealScript (ie, a specialized scripting engine), both in terms of usefulness and speed. And finally, how come everyone else isn't using Java ;]?  
 

 
  I (personally) have high hopes for Java as both an embeddable scripting / plugin language and as a stand-alone, cross-platform game development language in its own right. But Java isn't necessarily the best choice for every project.

July's issue of Game Developer magazine had a great article on embedded Java in video games. The article focuses on JNI and the Invocation API. Several games are discussed who either used or seriously considered using Java for embedded scripts. Among these is id's Quake3:Arena.

John Carmack considered using Java in id's Q3. He discusses several pros and cons. His biggest problem with Java was (believe it or not) portability -- It seems that Linux's and Solaris' implementations of the JVM are lacking (with respect to JNI) as compared to Windows'.

However, John does say at the end of this interview, "As for embedding... If I did want to go off and start fresh, I would likely try doing almost everything in Java."
John Carmack considered using Java in id's games for quite some time,
"... I want Quake 3: Arena running on every platform that has hardware- accelerated OpenGL and an Internet connection.... I had been working under the assumption that Java was the right way to go, but ... The programming language [used in Quake3] is interpreted ANSI C. The game will have an interpreter for a virtual RISC-like CPU." (Unreal followed a similar approach.) ...

"When it comes around to the next development cycle, I will make the Java decision again." As for embedding: "We are still working with significant chunks of an existing code base. If I did want to go off and start fresh, I would likely try doing almost everything in Java." -- Game Developer Magazine, July 1999 issue.
As more and more developers start taking advantage of all that Object-Oriented Programming (OOP) has to offer game development, extensible Java game objects may become the norm. More advanced players may even start to demand it - who wants to learn a proprietary script syntax for each new game they want to extend? If Sun delivers what they've promised, Java may (in time) become the de facto standard. Or not... 8-)



Response provided by Joseph Hall
 
 

This article was originally an entry in flipCode's Fountain of Knowledge, an open Question and Answer column that no longer exists.


 

Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.