To use a scripting language or not to use a scripting language?

solidstate1991 via Digitalmars-d digitalmars-d at puremagic.com
Fri Jan 6 10:39:35 PST 2017


On Friday, 6 January 2017 at 14:49:10 UTC, Ivan Kazmenko wrote:
> On Friday, 6 January 2017 at 14:19:34 UTC, Anton Pastukhov 
> wrote:
>>> As a game developer I can recommend to use Lua. This language 
>>> is tradtionally used in many games/game engines.
>>
>> Ironically, one of D's declared selling points is, according 
>> to https://dlang.org/overview.html:
>>
>>>Who is D For?
>>>Programmers who write half their application in scripting 
>>>languages the other half in native langauges to speed up the 
>>>bottlenecks. D has productivity features that make using such 
>>>hybrid approaches unnecessary.
>
> The use case here is arguably different.  In the ideal case, 
> game logic scripts are editable by gamers which are not 
> necessarily programmers.  Chris Wright has already given a 
> bunch of other reasons to use a self-contained, simple, 
> domain-specific, and limited language in such a setting.
>
> Perhaps D will some day be usable in a language-as-a-library 
> setting which would make it possible to use for game logic 
> scripts, too.  But considering the points above, it still won't 
> necessarily be a good idea.
>
> Some of the top games use Python (Civilization IV) and Lua 
> (World of Warcraft, Far Cry, SimCity 4) for scripting.
>
> Ivan Kazmenko.

I second this. My engine already have some scripting (although 
currently untested) via XML for its map format, to make maps more 
portable they have a script to load tiles and sprites on command, 
this also enable modding to a certain degree. More scripting 
would enable even deeper levels of modding without hacking the 
executable file.


More information about the Digitalmars-d mailing list