Crate qcvm

Crate qcvm 

Source
Expand description

§qcvm

This is a clean-room QuakeC VM implementation, designed to be integrated into the Seismon engine. Unlike most other implementations, it is designed with embedding in mind, and is not tied to only being used for Quake-like games.

§FAQ

§Is this the fastest QuakeC VM in the world

It is almost certainly not going to get best-in-class performance for now, as it is not designed with that in mind - Seismon is built for extensibility and moddability first and efficiency second, and this VM adopts the same mindset.

§Why did you make this

Because I want a VM that is resilient enough that hobbyist game developers and modders can mess around with a repl, override functions, just generally treat the code like it’s a rockstar’s hotel room and still have the game engine generally respond in a reasonable way.

§Is this a meme

No, I actually have a goal in mind and am taking this project seriously. You could use this to write a web server in QuakeC, though, and I do think that’s very funny.

§Should I write my game in QuakeC then?

Not unless you want to be sectioned.

Modules§

quake1
Quake 1 field, global and builtin definitions
userdata
Types and traits related to host bindings for the QuakeC runtime.

Structs§

Builtin
No body as the function is provided by the host.
FunctionDef
Definition for a QuakeC function.
FunctionRegistry
The registry of functions known to the progs.dat.
GetValueError
Errors that can occur when using Value::get.
QuakeCVm
The core QuakeC runtime.

Enums§

ArgError
Errors that can happen when parsing an argument list.
EntityRef
Abstraction around bevy_ecs::entity::Entity that allows us to impl Default without world access.
FunctionRef
A reference to a function stored in a QuakeCVm.
SetValueError
Errors that can occur when using Value::set.
Type
The possible types of values exposed to the host.
Value
The type of individual values passed in and out of the QuakeC runtime. Note that, in most cases, Void will be converted to the default value for the type.
VectorField
An individual field of a vector.

Constants§

MAX_ARGS
The maximum number of arguments supported by the runtime.

Traits§

AsErasedContext
Annoyingly, we can’t generically handle &mut T where T: ErasedContext and also &mut dyn ErasedContext without introducing this ugly trait.
QuakeCArgs
The type of values that can be used as arguments to a QuakeC function. Implemented for tuples up to 8 elements (the maximum number of arguments supported by the vanilla Quake engine).

Type Aliases§

BuiltinDef
A function definition for a function provided by the host.