Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does it work? #1

Open
erlend-sh opened this issue Sep 27, 2020 · 1 comment
Open

Does it work? #1

erlend-sh opened this issue Sep 27, 2020 · 1 comment

Comments

@erlend-sh
Copy link

erlend-sh commented Sep 27, 2020

Very curious how this turned out. With some basic “how to run” instructions I’d be happy to try it out myself.

I’ve been tracking “wasm as a platform for abstraction” in the Rust ecosystem.

Do you think WASM works well for game extensions? Has this experiment exposed some limitations of it?

@rockyjvec
Copy link
Owner

I never integrated it into Space Engineers as a mod like I intended to do. I got it working well enough to run doom 2 at reasonable speeds. There is a video of it working here: https://youtu.be/KXzUpOAD-v0

Space Engineers has a programmable block where you can write C# code to control your ship. One problem with it, though, is that you are limited in script complexity and it just kills your script if it uses too much CPU per game tick. I was hoping to use WASM to create a kind of virtual machine so that these scripts could have unlimited complexity and could be throttled to use only a certain amount of server resources.

A the time I was working on this project, WASI (https://wasi.dev/) was incomplete and I had to partially use emscripten syscall implementations to get things working. The documentation also wasn't great at the time. Maybe things have improved since then.

Performance was also a huge issue since I had to write it in C# to work with Space Engineers. I'm also fairly new to C# having only learned it to create mods in Space Engineers.

I do think WASI has a lot of potential to be used for server side game extensions/modding since it can enable i/o sandboxing and throttling of mods. I don't know if there are now runtimes out there that support throttling. That was the primary goal of this project at the time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants