FlyDangerous
FlyDangerous copied to clipboard
Look into threading the terrain generation in MacOS (M1 only?) and Linux
Map Magic 2 supposedly supports OSX but fails (at least according to #102 on an M1 Mac) when utilising the native terrain gen flag. Apparently the C++ source is included with the asset but I haven't dug into it yet - this is becoming a pretty big pain point so some time really needs dedicating to this.
This can be "fixed" (#85) by disabling the native handlers but the result is single-threaded terrain tile generation which is PAINFULLY slow and halts the main thread which is clearly not acceptable.
AHA looks like the source code isn't in the package but is available here:
https://gitlab.com/denispahunov/tools/-/tree/master/.NativeSources
Intel macs are supported, M1 is not.
https://forum.unity.com/threads/unity-awards-nominee-mapmagic-2-infinite-procedural-land-generator.875470/page-39#post-8124386
PAAAAAIN
Adding this here for posterity
Linux build instructions:
- Open Matrix.cpp and
#include <limits>
to the includes - Open MatrixOps.cpp and
#include <limits>
to the includes - Use the following command to compile:
clang++ -std=c++14 -target x86_64-pc-linux-gnu -shared -undefined dynamic_lookup -fPIC -O3 -o x64/libNativePlugins.so *.cpp
libNativePlugins.so will be in the x64 folder.
note: gcc does not seem to work
This has now been resolved with a custom build of the native libs for apple silicon and linux, tested on Steam Deck, WSL, M1 macbook 🥳
Will update the README with links to this thread for those looking to build locally.