The Bottleneck: Scripting (or Lack Thereof)

Posted 9 months ago2024-03-14 20:05:44 UTC
Every few years, after playing around with other games and engines, I touch Source / Half-Life² / Hammer again, and every time I go in with grand ideas about what kind of things I'd like to do. And every time, invariably, I quickly run into the limitations presented by the I/O system.

This time, I've come back to HL2 after doing some stuff with Arma III and BI's Real Virtuality Engine, namely the 3DEN Editor and the SQF scripting language, and the difference is night and day. The two engines almost perfectly complement each other; what Arma is lacking, Half-Life provides, and what Half-Life fails to do, Arma makes a breeze to achieve.

Whenever I was working with 3DEN, I would usually want to make some missions themed around urban warfare (or story-heavy missions), and the bottleneck would usually be level creation. The 3DEN Editor doesn't facilitate much in the way of creating new environments; beyond dropping new buildings or props into the landscape, the maps are immutable. New maps can be made, of course, with different tools, but anything like creating new houses instead of choosing existing models is a fairly big endeavour, and any sort of indoor scenes are usually close to impossible to stage due to the AI's limited-to-nonexistent navigational capabilities. Cinematics of any sort are hard to create, due to a limited set of NPC animations and very imprecise navigation that's largely oriented to squad-level movements on an expansive battlefield. What 3DEN and Real Virtuality excels at, though, is scripting highly-adaptable missions with any number of varied outcomes, custom dialogue, custom AI behaviour, custom gameplay features, the whole nine yards, due to its fairly trivially-learned scripting language and near-unlimited possibilities it offers in customising UI, NPC behaviour, interactions with world objects, and accounting for as many divergent player behaviours as the scripter is willing to anticipate. This makes it possible to make highly nonlinear missions.

Back to Hammer, it's the complete opposite. Building new things is trivial. The geometry tools are right there; short of vertex limitations, nothing stands in the way of creating any building the mapper can imagine. An entire city can be built from scratch, if so desired. Cinematics can be much easier, in certain ways; NPCs can be directed to walk anywhere with a nearly pixel-perfect precision, an extensive system for scripted sequences exists, and animations flow together much more smoothly due to the story-oriented singleplayer origins of the engine, as opposed to the MMO combat-oriented gesture system of Arma III. The navigation mesh is hand-built by the mapper, so indoor navigation can be as good as the author is willing to invest time and effort into; NPCs running into walls, failing to see doors, or being unable to navigate around trivial obstacles is usually a non-occurence. Compared to Arma, whose physics engine is virtually nonexistent, the Source engine allows liberal use of movable props, physics puzzles, destructible levels and objects that are easy to manipulate, and packing custom content with the maps is trivial as well.

Polar opposites. Taken together, the two would form a near-limitless engine.

And here comes the bottleneck, where my HL2 dreams are concerned: no scripting.

Half-Life² is an incredibly linear game. At no point is the player asked to make any sort of choice, at least none that matter beyond throwing cans at cops. There are no alternative routes. There are no side quests, optional objectives, no ways to fail partially without failing entirely. Reduced to its core, Half-Life² is a tube; what goes in at one end must come out the other end, following the only path available.

And that works fine for the game's campaign. It's much more of a ride-along movie with puzzle and combat interludes than an interactive narrative, it doesn't try to be anything else, and it does what it is very well.

But by these engine limitations, attempting to create any sort of nonlinearity in custom maps is very, very difficult.

I've been thinking a lot about projects like that lately, about what I'd like to make once I've reacquainted myself with the engine and tools sufficiently. Drawing on Warren Specter's famous quote about wanting to make games that are "an inch wide and a mile deep, rather than a mile wide and an inch deep", the idea of making small levels, perhaps the size of no more than a city block, that offer a multitude of ways for the player to engage with them, I've thought about ways that could be achieved in Source.

But doing that with the I/O system? A map that needs to keep track of, and adapt to, countless variables and changes in their values? It seems impossible, secondarily due to the entity limit, but primarily due to the sheer workload and the ever-increasing possibilities for increasingly hard to track errors to occur the more complex the I/O network becomes.

The one beacon of hope here is Mapbase, which to my knowledge implements VScript, something I have yet to learn. I've always been a little intimidated by Mapbase and largely dropped out of RTSL mapping tournaments when they switched to routinely mandating Mapbase, simply because at the time I couldn't figure out how to install it and was just glad Hammer worked for me at all after an extended stint with perpetually broken game configurations for mods (maps not updating, maps failing to compile, etc. etc.). I ought to take another look at that some time.

Idk. I just needed to get all that out. I'd still love to make less linear, more freely approachable HL2 maps and try to bring more of that New Vegas, Deus Ex, Mankind Divided feel over to the Source Engine. Of course the obvious solution would be to simply switch to a game and engine that offer more support for the kind of maps I want to make, but it's a labour of love: I love Source / Half-Life², and I want to make and play the kinds of maps I dream of in the game I love playing so much I'm still doing it in 2024.

P.S: Two additions I forgot earlier:

One, perhaps the best way to compare working with NPCs in Arma III vs. Half-Life² is this: in Arma, it's easily possible to create NPC behaviour that will dynamically, react to certain map/story events, in variable order (within the boundaries of what you prepared), but very difficult to exercise precise control over an NPC. In Half-Life, it's easily possible to manipulate an NPC with minute detail, but very hard or often impossible to set up any sort of behaviour that will continue working once you take your hands off the reins.

Two: one more limitation of HL2 is that custom dialogue or custom scripted sequences are very hard to implement purely on a map basis, because they require things like recompiling scenes.image, editing game-wide files like language files for subtitles, etc. In Arma III, custom dialogue relies on its own, separate subtitle and script files, much like HL2 custom materials and models can be packaged into the map.

2 Comments

Commented 9 months ago2024-03-17 18:48:50 UTC Comment #106071
I can tangentially relate to this. I mapped for Far Cry 1 for a while which was an entirely different beast to GoldSRC.

One excelled at scripting and sequences (there was literally a keyframe-based sequence editor), and the ability to create new types of NPCs, weapons & vehicles just by editing some text files. And of course, very large open spaces with lots of vegetation.

The other excelled at its ease of creating unique set pieces and richness in player interaction. I've wanted the best of both worlds for a while.
I've seen bits and bobs of Arma 3 modding so I totally kinda get what you're saying. Hopefully your venture with VScript goes well!
Commented 9 months ago2024-03-17 23:49:29 UTC Comment #106072
Thank you!

You must log in to post a comment. You can login or register a new account.