D and the world

Georg Wrede georg at nospam.org
Sun Apr 29 15:52:57 PDT 2007


Jeff Nowakowski wrote:
> David B. Held wrote:
> 
>>> I think this number is much bigger than 5%.  Consider that much of PC 
>>> advancement has come at the hands of gamers, and gamers demand the 
>>> kind of performance that will never be delivered by a VM.
> 
> 
> Mike Parker wrote:
> 
>> I don't see Epic rewriting the Unreal Engine in Java, C#, or D.
> 
> 
> Funny you should mention Epic. A lot of their game code is not written 
> in C++.  The high performance bits like rendering are, but tons of code 
> that makes up a game is written using a scripting language inside a 
> virtual machine.
> 
>  From http://wiki.beyondunreal.com/wiki/Unreal_Engine_Core:
> ====
> "The native software also creates a virtual machine, similar to the Java 
> virtual machine. This is like a programming environment that sits on top 
> of the native stuff. The language for this is UnrealScript; it's similar 
> to Java and JavaScript. It is compiled into bytecodes, like Java, but 
> the source remains visible, and it's this that allows the modding of the 
> Unreal engine games. Tim Sweeney's Design goals for UnrealScript explain 
> this idea further.
> 
> "In very simple terms, every single object in the game is a piece of 
> UnrealScript code. The engine runs all these scripts, and they decide 
> what to do. So when the rocket hits a wall, a function in its script 
> called something like HitAWall says: "I have hit a wall. I should now 
> produce an explosion, make a noise, and remove myself from the game." 
> How does the rocket know it hit a wall? The native part of the engine 
> told it. How does the engine know? Every single moment of the game, it 
> is checking where objects are and what they are touching."

As far as I understand it, D would be the language for creating stuff 
like the Unreal Engine. This would be Systems Programming, i.e. what D 
purports to excel at.

Of course, the VHLGL (very high level game logic) could (probably should 
and would) be written in some high-level (probably) interpreted 
language. STILL, such logic (as compared to Java, Python, ECMA-script, 
Lua, etc) probably would be almost as easy to write in D.

And, thinking of large game industries, once they've decided on using D, 
they'd probably write some source code translators that would translate 
their existing in-house high-level game logic scripts to D.

> Also of interest is Tim Sweeney's (architect behind Unreal) "The Next 
> Mainstream Programming Language: A Game Developer's Perspective":
> 
> http://www.st.cs.uni-sb.de/edu/seminare/2005/advanced-fp/docs/sweeny.pdf
> 
> A good read if you want to see what a real-world, hugely successful game 
> developer wants from a language.
> 
> -Jeff



More information about the Digitalmars-d mailing list