((void*)0)

((void*)0)

I’m All Outta Gum

I don’t own Duke Nukem Forever, and I likely won’t until it’s on sale at a bloody low price.

I don’t get it. For months we’ve had gameplay footage dribbled to us from Gearbox, showing nothing but a series of unique and context-dependant events — no straight-forward shooting action. Much was lauded about its “sense of humour” and how the King was back. …and there were many boobs (in groups of two).

Let’s get something straight. Duke Nukem 3D was not a stupid game: it was a genuine Doom challenger — a great corridor shooter with some long, memorable and campaign-related levels (unlike Doom which swapped and changed level to level). It stands proud next to Doom and Heretic in the crowd of awesome pre-2000 shooters. The ‘immaturity’ in Duke, whilst there, was not extreme in the slightest; was not the main draw; was not the defining characteristic.

To anyone aware of the power of hype and what the original Duke was…steering well clear should have been natural.

For Science. …you monster.

What else can metadata be used for? “Scripting!”, I hear you cry. And for once, you’d be right.

With metadata you can describe quite a lot of different things, but that’s all it stores — it’s not there to store functions or anything more complex than a value. …but that’s grand, because values are the point of all these functions — the end result is what we care about. A player doesn’t need to know how its health is calculated, just what it is (or isn’t). All the functions with our C++ code, all the functions in the script code, and all the King’s functions are there just to calculate these values. The values of an entity are its state — not how it got there.

The glory that is Lua — that tight, little light-weight bastard — views pretty much everything you chuck at it as a blob of metadata; values assigned to string keys. In my engine’s world, entities store pretty much every aspect of themselves within metadata — and when entities and Lua get together, sweet sweet baby-juice flows.

In all seriousness, past metadata, the ‘other’ types of values are classes and complex types — types that do something, rather than store something. Like with HTML and CSS, there should be a stark separation between function and form; the entity stores what it is and it’s associated script code acts on that. Blurring these lines confuses the issue and makes the entity object itself more complex than it needs to be — and more difficult to manage/transmit over a network.

…I am, however, slightly stuck currently with one issue: arrays within metadata. Named keys makes it difficult to iterate through the list. I’m toying with building an iterator for metadata objects, but…well, it’s a drag.

Creating thread-safe storage containers, and trying to get them perfect before ploughing on…takes too much time…

Top