Closed Faless closed 2 years ago
I compiled the Godot 3 version per your instructions on Twitter (scons godot_version=3 arch=x86_64
) and it worked in a couple minutes of testing with a real game! It's nice not to see the see console spam that the Google implementation generates. :-)
I'll try to test the Godot 4 version soon as well.
I haven't managed to do a really solid test of the Godot 4 version yet, but I just wanted to point out that the paths are mostly wrong in the *.gdextension files in the binary release linked in the issue description. It's got them all with "x86_32" in their filenames, rather than the correct architecture:
linux.x86_64 = "res://webrtc_debug/lib/libwebrtc_native.linux.debug.x86_32.so"
linux.x86 = "res://webrtc_debug/lib/libwebrtc_native.linux.debug.x86_32.so"
osx.x86_64 = "res://webrtc_debug/lib/libwebrtc_native.osx.debug.x86_32.dylib"
osx.arm64 = "res://webrtc_debug/lib/libwebrtc_native.osx.debug.x86_32.dylib"
windows.x86_64 = "res://webrtc_debug/lib/libwebrtc_native.windows.debug.x86_32.dll"
windows.x86 = "res://webrtc_debug/lib/libwebrtc_native.windows.debug.x86_32.dll"
android.armv7 = "res://webrtc_debug/lib/libwebrtc_native.android.debug.x86_32.so"
android.arm64 = "res://webrtc_debug/lib/libwebrtc_native.android.debug.x86_32.so"
android.x86_64 = "res://webrtc_debug/lib/libwebrtc_native.android.debug.x86_32.so"
android.x86 = "res://webrtc_debug/lib/libwebrtc_native.android.debug.x86_32.so"
ios.arm64 = "res://webrtc_debug/lib/libwebrtc_native.ios.debug.x86_32.dylib"
ios.x86_64 = "res://webrtc_debug/lib/libwebrtc_native.ios.debug.x86_32.simulator.dylib"
My system is Linux 64-bit, so when it tried to load the GDExtension I got this error: Can't open dynamic library: /home/dsnopek/games/godot4-nakama-webrtc/webrtc_debug/lib/libwebrtc_native.linux.debug.x86_32.so. Error: /home/dsnopek/games/godot4-nakama-webrtc/webrtc_debug/lib/libwebrtc_native.linux.debug.x86_32.so: wrong ELF class: ELFCLASS32
After I corrected the path, it appears to be loading correctly.
Thanks for trying out the PR! The paths should be fixed now.
The paths should be fixed now.
Awesome, thanks!
I've started porting a small-ish WebRTC project to Godot 4. I was hoping to get it done today, but that may have been a little optimistic. :-) I'll come back to it on the weekend, and let you know how it goes!
I ported my "WebRTC and Nakama addon" to Godot 4:
https://gitlab.com/snopek-games/godot-nakama-webrtc/-/commits/godot-4
... and, using the binary builds linked above, got the demo game actually working!
Skimming the code changes, everything seems fine to me. It's very clever how you have it supporting both GDNative and GDExtension :-)
~Updated the test release~ Now released as alpha with both GDExtenstion (4.0-alpha10) and GDNative (3.5) version.
We can finally ditch that ugly mess that's the chromium WebRTC library thanks to a sane implementation: libdatachannel.
This PR also adds GDExtension (godot 4) support. See the updated README.
Draft status:
gdnative/vx.y.z
gdextension/vx.y.z
)~ Build both gdnative and gdextension in CI.WebRTCLibPeerConnection.new().make_default()
once to bind with the default implementation. (Waiting for godotengine/godot#61839).TODO
s to evaluate.~See here for prebuilt binaries (current master as of writing, but might break before Godot 4 is released)~.
See here for Godot 4.0 alpha-10 and Godot 3.5 builds.