Programmable Video Games


Programmable Video Games

Neverwinter Nights takes programmable to a new level, but it is still ham-strung by its implementation.

I have always been an avid player of programmable video games. Back in the Commodore 64 days it was this tank game where you made a program to defeat your opponents tank. Now I have been hooked on Neverwinter Nights as a platform for creating worlds for other people to play in. So what does NWN give you? A set of base rules (3rd edition D&D), a server that enforces those rules, a client that can project an avatar into the environment, a scripting language to change the rules and make things happen in the environment, and a level/item/creature toolset for making more “things” in the environment. It even lets you add on “hackpacks” to add new models to the game. Taking each one of those separately we have:

1. Set of base rules — they have been proved playable in PnP (pencil-and-paper) for a few years.
2. Server — this is the scripting language runtime. It has its faults we will discuss below.
3. Scripting language — new C-like language, bad idea.
4. Client — Excellent!
5. Toolset — Excellent! Easiest level editor ever.

Now, given this list you can see the weakness in this system. For some reason the software developers of the game felt the need to create a new language and a new language runtime. This is a tragic mistake in this age of Java and .NET. Either one would have been a fine choice. Instead, they chose to implement their own language that uses textual includes, doesn’t have arrays, can crash the server, no debugger, does not have namespaces, is single threaded, statically bound, and to add insult to injury, interpreted. Basically what they have given their users is exactly at the level of acceptability but they put tons of work in to doing it when they could have used another system off the shelf. Oh well, what is there to do? Every few days when I am working on my own NWN world (menzoberranzan.org:5121) I think to myself that “damn, I should write a server that uses their client”. Then people could make their own Everquest like systems with hundreds of users instead of working with this marginal server that they provide. You see, they aren’t really in the server business, but because they are so close, people try and use it for that anyway.