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

Only compiles / runs on Intel/AMD (x86) #1086

Open
madscientist159 opened this issue Aug 20, 2018 · 8 comments

Comments

Projects
None yet
5 participants
@madscientist159
Copy link

commented Aug 20, 2018

Looking through the codebase it would appear that there is a major assumption, introduced with NaCL, that this game will only ever run on Intel and AMD platforms. Is this intentional, or is there a goal to allow it to run on other architectures beyond just x86?

NaCL is also deprecated by Google. It is probably not a good choice for future development.

@Kangz

This comment has been minimized.

Copy link
Member

commented Aug 20, 2018

The fix for this would be to use WebAssembly but it would require a bunch of work to embed a WebAssembly engine and setting up a new process/sandbox to run it.

@madscientist159

This comment has been minimized.

Copy link
Author

commented Dec 11, 2018

What would be needed to get some serious attention on this? There is a growing POWER systems community that is interested in open source games like Unvanquished, and Unvanquished is one of the very few that is so closely tied to the Intel ecosystem and won't currently run on those high end machines as a result. Even the UE4 engine (proprietary) works on them at this point.

@illwieckz

This comment has been minimized.

Copy link
Member

commented Dec 11, 2018

@madscientist159 we need contributors to work on switching our sandbox system to webassembly ;-)

Yeah that Power community is growing ant that's great, that's why I already modified the updater to explicitly look for cpu arch, not only bitness.

For the engine it's harder to do as the best solution would be to switch to another sandbox system. We are very OK with that, more than OK with that! 😉 If anyone feels OK in doing such a job, we would go that route for sure.

@slipher

This comment has been minimized.

Copy link
Contributor

commented Dec 13, 2018

What are the prospects for a usable WebAssembly engine? The browser ones are apparently tightly coupled to browsers (well I don't actually know if this is true, it's just an impression). There are a couple of standalone ones, but it's hard to be confident that any of them is going to be maintained. Is there any hope for a standalone VM implementation to be good enough or do we have to hope one that is used by a major browser is decoupled?

@Kangz

This comment has been minimized.

Copy link
Member

commented Dec 13, 2018

AFAIK the WASM CG is thinking of making a C/C++ API that engines implement to expose standalone WASM support so we should be able to use that when it's out.

@kb9vqf

This comment has been minimized.

Copy link

commented May 29, 2019

@Kangz Do you know what timeframe the WASM CG will be released? Is there a link to it? I'd really like to play this on my Talos II system but for now cannot.

@illwieckz

This comment has been minimized.

Copy link
Member

commented May 29, 2019

@kb9vqf note that the WASM CG probably means for WebAssembly Community Group, you probably wants to know when that C/C++ API to expose standalone WASM support will be released by them (or when WASM CG will be releasing that API).

I would like to know too. 😄

Btw, it's nice if you have a Talos II system. Note that you can build and run Unvanquished without NaCl but you would face issues if you try to connect to servers running custom code (like mine and some others).

In any way I would like to know if you're already able to build and run Unvanquished on the architecture you're using without NaCl.

Can you try to build Unvanquished this way?

mkdir build
cd build
cmale -D'BUILD_GAME_NACL=OFF' -D'BUILD_GAME_NACL_NEXE=OFF' -D'BUILD_GAME_NATIVE_EXE=OFF' -D'BUILD_GAME_NATIVE_DLL=ON' -D'USE_BREAKPAD=OFF' -D'CMAKE_BUILD_TYPE=Debug' -D'USE_DEBUG_OPTIMIZE=OFF' ..
make -j$(nproc)

This disables NaCl build and enable debug build.

Then you would have to run Unvanquished this way:

./daemon -set vm.cgame.type 3 -set vm.sgame.type 3 -pakpath /path/to/the/pkg/directory/containing/dpk/files
@slipher

This comment has been minimized.

Copy link
Contributor

commented May 30, 2019

NaCl VMs are not needed to play single-player, but you still have to compile the NaCl support libraries that are part of the engine. You'd probably have to ifdef out a lot of stuff to get it building. Also a bit of hacking is likely required to get things going on POWER architecture in general, as the codebase has been used only with x86 for several years.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.