top | item 34674186

(no title)

aliswe | 3 years ago

Making a VM for a game does sound like overengineering

discuss

order

smcl|3 years ago

Possibly. Nowadays we might look towards existing languages like Lua if we wanted to bolt on a scripting system to our new game engine. But remember that in the mid-90s id and Carmack were breaking new ground and had to figure this out as they went along. It might have been overengineered if the result was simply that they shipped a single game, but we know now that what they built was a very powerful, customisable platform that spawned hundreds of mods and kickstarted possibly hundreds/thousands of people on the path to careers in the games industry.

So it's maybe a bit overengineered for Quake the game, but it turned out to be perfect for Quake the ecosystem (and everything that followed) to emerge :)

flohofwoe|3 years ago

The implementation is under 750 lines of trivial C code, much less than for instance an embedded Lua interpreter (which just barely existed back then). I would call that the opposite of "overengineering".

Also, this wasn't used for the entire game, only for the parts that are moddable.

MrBuddyCasino|3 years ago

LucasArts ScummVM, Another World... If you think thats overkill, wait until you hear about custom designed CPUs for SNES Games, eg ARC by Argonaut, which spun off into its own MCU series which were sold in the billions: https://en.wikipedia.org/wiki/ARC_(processor)

bowsamic|3 years ago

Back in those days, there were not pre-built solutions for things. It isn't like the option was between a professionally constructed engine and writing your own, whatever you had to do you had to write it yourself. In such an environment it makes sense to spend a lot of effort on custom engineering.

kgeist|3 years ago

It allowed modders to write mods without having to deal with unsafe DLLs. I was basically just a scripting engine.

klodolph|3 years ago

I believe that QuakeC is also unsafe. It is portable, though.

jhbadger|3 years ago

Some of the very first computer games such as the Infocom text adventures (Zork, etc) were VM-based. That was because there were like a dozen incompatible home computers in the 1980s and writing their games to target a VM meant they just had to write a VM interpreter for each platform and all of their games were ported.

https://en.wikipedia.org/wiki/Z-machine

srgpqt|3 years ago

Many, many games ran a VM for the game logic to ease porting between vastly different computer/console architectures. See SCUMM VM for example.

bob1029|3 years ago

Making a VM for a game is one way to build an abstraction layer between parts of the business. Having everyone working in the low-level C/C++ codebase all the time can scale poorly.