4 ms·
Using a custom VM was certainly a clever and efficient at the time. LucasArt used the same trick for a lot of point and click games. I don't think this idea wo
by stephc_int13 7y ago
Using a custom VM was certainly a clever and efficient at the time.
LucasArt used the same trick for a lot of point and click games.
I don't think this idea would scale well for much bigger projects, as debugging internal scripts can quickly become a bottleneck.
- klodolph 7y agoWell, the technique has been used in newer projects as well. Quake and Quake 3 both had VMs that ran the game logic. Tooling is a perennial problem with extension systems, but it’s really damned if you do, damned if you don’t. If you’re not using an extension system, then you’re probably writing the game logic and the engine as one giant mass of C++ code. Writing tons of game logic in C++ will get you in trouble for lots of reasons. Writing an interface between your C++ core and some kind of scripting system will get you in trouble for completely different reasons. Tim Sweeney did a presentation about the programming environment needs of different parts of games back in 2005, still worth reading: https://www.st.cs.uni-saarland.de/edu/seminare/2005/advanced-fp/docs/sweeny.pdf https://www.st.cs.uni-saarland.de/edu/seminare/2005/advanced...
- csande17 7y agoAnother example of custom VMs from that era is Infocom's Z-machine, used for text adventure games. The strategy of using a bytecode VM to ship cross-platform games seems to have been pretty popular back then, which is a little surprising to me -- I thought Java came up with that idea first!
- gowld 7y agoThe first computer language in history was bytecode language for a VM. https://en.wikipedia.org/wiki/Short_Code_(computer_language) https://en.wikipedia.org/wiki/Short_Code_(computer_language)
- jonny_eh 7y agoI guess Java's "innovation" with VMs was requiring the user to download it separately from the programs it runs.
- pkaye 7y agoIts older than that. There was the p-code machine used for Pascal. https://en.wikipedia.org/wiki/P-code_machine https://en.wikipedia.org/wiki/P-code_machine
- tragomaskhalos 7y agoThere was also a (brief) period in the early 90's where Microsoft's C++ had an option to compile to p-code. IIRC this was to reduce executable size.
- yvdriess 7y agoA lot of people working during the PC revolution in the 80s that had a formal education would have worked on languages with exactly that kind of tech: various Lisp dialects, ML, Smalltalk. Same for all kinds of meta-programming, JIT or dynamic compilation, etc.
- lokedhs 7y agoThe Apollo Guidance Computer that was used for navigation and other control tasks in the moon missions also used bytecodes. The reason was to save space, as well as not having to constantly update the software as the hardware specs changed.