
Q3VM – Lightweight, embeddable Quake III Interpreter/Virtual Machine - janosch9001
https://github.com/jnz/q3vm
======
xedarius
Really smart.

It's worth mentioning that the Q3VM was the entry point to many of the
exploits created for Q3, just something to bear in mind.

~~~
rasz
How did that work? You need to load your custom scripts somehow in the first
place, Im guessing in a form of game mod. So you are already running custom
code at this point.

~~~
AgentME
Whenever you connect to a server, the client autodownloads any game mods used
by the server. Random servers and their game mods aren't supposed to have
arbitrary unsandboxed code execution on your system, but they could if they
exploited a vulnerability in the code vm. The code vm is _supposed_ to be safe
for running arbitrary code in a sandbox.

------
dejv
What could be usecase for using this VM? Any idea why to use it in non-game
app?

~~~
Epskampie
I don't understand either. If you have to write in C, and you have to compile,
what's the advantage?

~~~
ndepoel
The main advantage for Quake 3 was that the server, client and UI code could
be compiled into platform-independent bytecode modules. This was mostly a boon
to mod creators, who had to build only one version of their mod that would
work on all Windows, Mac and Linux systems alike.

~~~
hinkley
I thought I heard this was also a boon for the scenario creators and level
builders working alongside the graphics engineeers.

They get something a little less hairy and volatile to work with, and
execution speed isn’t that critical because you’re only making hundreds or
thousands of decisions per second.

------
EamonnMR
It's not clear from the documentation, is this forked out of the Q3 codebase
or based on the LCC book or just totally independently created?

~~~
juliangoldsmith
The README says that this is forked from the Quake 3 codebase.

------
mulle_nat
How good is this in terms of execution speed ? Compared to Lua for example
(since that is mentioned in the README).

------
pankajdoharey
WoW, i had no idea Quake had a vm inside it.

------
fsiefken
Does it have VR support?

~~~
burnte
It does, as well as support for the other 24 letters. ;)

------
tree_of_item
WebAssembly is a better choice today. This thing is interpreting C, so just
embed wasm instead so people can use stuff like Rust too.

~~~
janosch9001
There are of course many VMs out there. Totally depends on the individual use
case.

