D and the world

Mike Parker aldacron71 at yahoo.com
Sat Apr 28 23:55:08 PDT 2007


Michael P wrote:
> Is there really any benefits using scripted languages besides not having to compile? D is much faster than most scripted languages and it compiles fast and have a garbage collector. I myself find D easier and you get better performance!
> "While the C++ parts of the engine are fast, UnrealScript is a relatively slow language to execute."

Scripting languages tend to be easier for non-techies to pick up and 
learn, for one. By implementing the game logic in script, you make it 
easier for the members of the design team (who may or may not have 
programming experience) to implement functionality themselves and try it 
out immediately. Otherwise, they'd have to write out what they want, 
pass it off to the programmers, and wait for them to implement it and 
compile a new build before they can test it. The art team can use 
scripts to set up special effects and animations. The audio team can use 
scripts to set up dynamic audio effects.

On a related note, the ability to implement changes to a script and see 
those changes reflected immediately in the game world is a tremendous 
time-saver. Even if you have to restart the game to see the effects it 
is still a far-sight better than waiting for a recompile (especially 
when the source tree is only recompiled on a strict schedule). New ideas 
can be prototyped and evaluated much more quickly.

Finally, if the game is intended to be moddable by players, requiring 
them to learn a scripting language to do so is a far sight better than 
requiring them to learn C++. You can see a real world example by looking 
at the modding communities for the Unreal Tournament and Quake games. 
The latter is much smaller, but I'm certain it has to do with the fact 
that to mod Quake 3 you have to use C. UnrealScript is much easier to 
learn (and there is a lot of published material to help you do so).


> It's a sad thing when ppl underestimate the advantages of good performance. Bump mapping could be done with an Amiga (demo but still). And if you install Win98 on a new machine it will fly! 


No one is underestimating the advantages of performance. Game developers 
are among the most performance-minded software developers out there 
(often religiously so). But as code complexity, team sizes, and budgets 
have grown they have had to look for ways to increase productivity and 
reduce maintenance costs. Scripting allows them to do that. 
Performance-critical sections of the game (such as rendering) are 
implemented in native code, but the more of the logic you can put into 
scripts the better. Data-driven development in has become the rule in 
the game industry, rather than the exception.

I look forward to seeing a feature-rich game engine developed in D (and 
would love to work toward that myself had I the time to do so). For such 
an engine to be competitive, it has to be scriptable. Whether that be 
with DMDScript, MiniD, Lua, Python, or (preferably) some 
as-yet-undeveloped-game-centric-D-based scripting language, scripting 
support is essential.



More information about the Digitalmars-d mailing list