Re: [GD-General] Scripting
Brought to you by:
vexxed72
|
From: <cas...@ya...> - 2002-12-07 03:38:23
|
I've been using Lua for a long time, I always embed it in my applications,
just because it's easy and I may need in the future. However, I've never
used it as a 'real' game scripting language. Most of the times it just
serves as a powerfull configuration language, or for data description.
Appart from this reasons:
> - End user modifications that are safe (sandboxed VM), portable and
> free to develop
> - Ease of extensibility for artists/designers
> - Faster prototyping/development because the language is more dynamic
> and doesn't require rebuild
> - Rich data definition language
I would add another one:
- Language features that make your life easier.
That's the case, for example, of the state machines in UnrealScript and
quakec. Actor based languages (or with coroutines) can also be useful to
describe behaviours without blocking the execution. Rule based systems are
also usefull to determine tasks completion, or state changes.
> Sandboxing end user mods is a VERY good reason to script. Using scripts
> for NPC interaction or possibly for more elaborate scripted sequences
> and triggers might be good things as well (but even so, many games have
> done just fine using data to describe triggers, NPC actions, levels,
> missions, quests, end game conditions, etc.). Scripts as a way to make
> portable, inexpensive mods (a la UnrealScript and QuakeC) is also a
> valid reason.
Yes, I wouldn't use a scripting language to write all the game code as in
Unreal or quake3. In my opinion a general programming languages like c++
fits better for that purpouse. However, I would use a scripting language for
specific tasks, like describing cinematics, controlling cameras, dialogs...
All that without having to rebuild the application. Builds are fast, but
level loads usually aren't. In my opinion, being able to replay a cinematic
by just tipying "load('intro.lua')" is really usefull.
For a good example of how to use lua for those tasks I'd recommend to have a
look at 'hyperspace delibery boy'.
As you say, you can use data for all that, but I think that data isn't as
expresive as a scripting language. A scripting language can simplify some
tasks, but in the end it just depends on your own needs.
Ignacio Castaño
cas...@ya...
___________________________________________________
Yahoo! Sorteos
Consulta si tu número ha sido premiado en
Yahoo! Sorteos http://loteria.yahoo.es
|