Chapter 10: Java as a Scripting Language

Introduction

Productivity of a team as a whole is undoubtedly fundamental to the success a project. It is crucial for a studio to have an efficient development pipeline. This is especially true for highly competitive markets such as gaming. Bottlenecks in the development pipeline can cost a studio a substantial amount of money. In fact, if a game takes too long to develop or is not well polished, the entire project may be canceled. If some tool or technology can save each developer even a few minutes per day, the overall time that could be better utilized can add up to make a substantial difference.

A scripting language allows for a smoother development pipeline, which in turn increases the productivity of the team. Many scripting languages have been used by different applications, including games, and their popularity has been growing over the years. Even though Java is not exactly a scripting language, it is suited and well capable of being used as a powerful scripting language. As far as programming languages are concerned, Java falls between a low-level language such as C/C++ and a high-level scripting language such as Lua or Python. Games use scripting languages for tasks that range anywhere from managing the graphical user interfaces (GUIs) to controlling nonplayer characters (NPCs). In this chapter, we will provide a brief overview of how they work, discuss the characteristics of scripting languages, explain why it is good to use an existing language, discuss the characteristics of Java as a scripting language, and provide an example program that launches the VM and executes a script.



Practical Java Game Programming
Practical Java Game Programming (Charles River Media Game Development)
ISBN: 1584503262
EAN: 2147483647
Year: 2003
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net