game programming... is all about scripting nowadays?

Started by
16 comments, last by Kylotan 17 years ago
I recently bought a license for the Torque engine just so that I don't have to worry about the "plumbing" anymore and could start making games, and I was surprised about the elaborate scripting language. I was even more surprised when I read numerous posts in the community stating that game logic was usually implemented in script. I asked a colleague of mine today who worked in the game industry for a number of years if it was normal that game logic was often implemented in script (apart from the Torque engine), and he stated that it was becoming more and more common that games were created entirely in script languages because it's easier to work with. The reason I'm surprised comes ofcourse from my complete lack of experience of the "real games industry" and the trend of the threads I read on gamedev. Most of the things I read here are about C++/Java/other compiled languages. Thereby, my gut-feeling says that script is not being "easier to work with" because it is probably lacking decent (debugging/development)tooling and community support. Also, I'm sort of lost where one can draw the line between engine and script. What do I put in my engine? What do I put in script? Is there a rule of thumb? So, what do you think of this? Can you confirm the increasing popularity of scripting languages? Are you as surprised as I am? Do you think scripting is becoming more and more important? If so, also in the indie game development scene who might not be able to afford elaborate engines with scripting?
STOP THE PLANET!! I WANT TO GET OFF!!
Advertisement
Quote:Original post by Structural
Thereby, my gut-feeling says that script is not being "easier to work with" because it is probably lacking decent (debugging/development)tooling and community support.

Why?

Quote:Also, I'm sort of lost where one can draw the line between engine and script. What do I put in my engine? What do I put in script? Is there a rule of thumb?
Script everything you can without sacrificing performance. If there's any doubt, script it, and redo it in C++ if necessary.

Quote:Can you confirm the increasing popularity of scripting languages?
Yep.
Quote:Are you as surprised as I am?
Nope.

Now, when you say "scripting", that's sort of a misleading word to use. A "script" is a description of what characters in a play or movie say. It's fully linear, without control structures or logic. Most of the so-called "scripting languages" you're looking at here are better defined as "high-level programming languages". And the march from C/C++ to high-level programming languages is as natural as the march from assembler to C/C++ was.
I hope scripting is becoming more important.

Even my own game uses a simple lua interface for lots of game logic. Its really great to be able to work on my game without having to run it through a compiler. My game logic is simple enough ( its an asteroids clone ) that I haven't run into anything that would require serious debugging tools yet. I was pleasantly surprised at how easy it was to integrate lua and my own code ( which I would hesitate to call an "engine", its a bit too simple for that ).

I don't play lots of games, but some of the ones I've bought recently ( Civ 4 and prey ) have scripting language support, or so I've heard.

So yeah, I think its becoming about scripting. But its a really good trend [smile]
Scripting is the lifeblood of modern game development. It drives things, and is far, far more important in most cases than most of the underlying C++ code that forms the "engine". To that end, scripting languages have become increasingly refined, tested, supported, and optimized. Lua and Python are popular choices, with commercial games using them extensively and fairly sophisticated development environments appearing. They're also brutally efficient; even N64 and PSX games had scripting systems, despite the decidedly low end hardware.

Current trends indicate that scripting languages will continue to become more and more important. The need to rapidly prototype and develop games makes it necessary.
SlimDX | Ventspace Blog | Twitter | Diverse teams make better games. I am currently hiring capable C++ engine developers in Baltimore, MD.
Quote:Original post by Sneftel
Quote:Original post by Structural
Thereby, my gut-feeling says that script is not being "easier to work with" because it is probably lacking decent (debugging/development)tooling and community support.

Why?

Because the user base of such a language is much smaller than that of say, C#. And the availability and quality of tooling and support is, in my opinion, directly related to the number of people using the language.
I am aware that comparing C#, a fulfledged can-do-anything language, with a scripting language with much less features. So when you take that into account the smaller community might not be such an issue. But I still have a very strong feeling that the availability and quality of tooling is less of what you can expect of other languages.
But as I said, this is a gut-feeling and I could be completely wrong.


Quote:Now, when you say "scripting", that's sort of a misleading word to use. A "script" is a description of what characters in a play or movie say. It's fully linear, without control structures or logic. Most of the so-called "scripting languages" you're looking at here are better defined as "high-level programming languages". And the march from C/C++ to high-level programming languages is as natural as the march from assembler to C/C++ was.


Ah, sorry for the wrong use of words. :)
But I agree that high-level languages are making things much easier. I am currently working in a research facility where we create demo's and implement research concepts and the use of modern languages makes implementing a demo much easier (C#, as opposed to C++).
But still, my doubt for scripting languages in games mainly comes from the tooling perspective.
STOP THE PLANET!! I WANT TO GET OFF!!
Quote:Original post by Structural
I am aware that comparing C#, a fulfledged can-do-anything language, with a scripting language with much less features.

You need to define "full-fledged". Are you talking about syntactic features, or base libraries? Yes, C# includes functions to calculate the date of the Chinese new year, and things like ActionScript don't. But a video game probably doesn't need that anyway. Likewise, on the syntactic front C# has delegates and suchlike, but really offers very few extras which are frequently used.

Quote:But still, my doubt for scripting languages in games mainly comes from the tooling perspective.
Then I suggest you do research to determine what tools are available for these "scripting languages", and what tools are required.
The commercial game i'm working on is using the Unreal engine, and we are hardly touching c++ for it. Its practically all in Unreal Script. The excellent tools mean the designers and artists can do most in the engine, which runs efficient c++ code without project programmers.

Say the 3 most intensive parts of a game were gfx, physics and ai. The first 2 are in the engine in c++, and the AI specific to our game is in half in c++, half in unreal script.
Script engines in games have been around for a long time. They have become more popular for a few reasons:
  • The types of games that use scripts have become more popular.
  • The complexity of NPC behavior has grown.
  • Processing power has increased.
Some advantages of scripts over compiled code:
  • Scripts are easier to modify and the turn-around time is faster. In some cases, they can even be modified while the game is running.
  • The languages are generally simpler and higher-level, making script-writing accessible to non-programmers.
  • Less people modifying the code makes management of the code easier.
  • Level designers are much cheaper than programmers.
Some of the drawbacks are:
  • Execution is slower.
  • Circular dependencies can be a problem.
  • Tools are lacking.
  • Non-programmers writing scripts can be a problem because it does require some level of programming ability.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
Quote:Original post by Structural
Because the user base of such a language is much smaller than that of say, C#.

No. TorqueScript is not representative of "scripting" languages as used in games. In reality, the trend is to use widely available languages that have long been employed in other domains - Lua, Python, JavaScript, even Perl - and these are languages with huge user bases and long histories.

Quote:And the availability and quality of tooling and support is, in my opinion, directly related to the number of people using the language.

There is a measure of proportionality, but it is by no means the largest factor. Language design is a much greater influence; languages with native support for reflection and introspection are easier to write debuggers for than opaque languages with horrendous type systems (C++), but also have less need for debuggers because so much meta information is readily available to the programmer during the development of his solution.

Quote:I am aware that comparing C#, a fulfledged can-do-anything language, with a scripting language with much less features.

Perl has more features than C#. Python has even more than Perl. All of them are dependent on their libraries (.NET in the case of C#... which is available to IronPython) for the majority of said functionality.

Quote:But still, my doubt for scripting languages in games mainly comes from the tooling perspective.

Do some research. Tool growth has been explosive in modern high level languages. Look outside the games domain and see what's being done in rich internet applications/web apps with JavaScript. Look at the tools that are emerging to support various paradigms in those areas. nunit isn't as old as Perl's SimpleTest, after all...
It's not just games - Adobe Lightroom uses Lua [PDF] for 40% of its code (and maybe more since when that was written). I suppose Mozilla is an atypical example since they're heavily into scripting already, but it's still interesting that they're planning to move much of their "middleware" C++ code into JavaScript (actually JavaScript 2, on the Tamarin JITting VM).

This topic is closed to new replies.

Advertisement