Skip to content

Instantly share code, notes, and snippets.

@BrandonMakin
BrandonMakin / gist:a2181f74ab7fce1f4318ec8c2a9d6cb7
Created January 25, 2024 20:28
Errors when missing addon
E 0:00:00:0876 load_source_code: Attempt to open script 'res://addons/dialogic/Resources/CharacterResourceLoader.gd' resulted in error 'File not found'.
<C++ Error> Condition "err" is true. Returning: err
<C++ Source> modules/gdscript/gdscript.cpp:1025 @ load_source_code()
E 0:00:00:0876 _load: Failed loading resource: res://addons/dialogic/Resources/CharacterResourceLoader.gd. Make sure resources have been imported by opening the project in the editor at least once.
<C++ Error> Condition "found" is true. Returning: Ref<Resource>()
<C++ Source> core/io/resource_loader.cpp:274 @ _load()
@BrandonMakin
BrandonMakin / GSoC 2018 - Brandon Makin - WebRTC in Godot
Last active July 22, 2020 05:23
GSoC 2018 Final Submission - Brandon Makin - WebRTC in Godot
My project was to allow users of the Godot game engine to create multiplayer games by connecting players via WebRTC using Godot's existing multiplayer APIs.
Godot's core can be extended by adding modules - essentially plugins that are compiled with the engine. I created a WebRTC module that can be found here:
https://github.com/BrandonMakin/godot/tree/webrtc_static_final/modules/webrtc
That folder - modules/webrtc/ - represents my work for Google Summer of Code. SConstruct, config.py, are to help the build system compile and were created by my mentor Fabio Alessandrelli. register_types.h and register_types.cpp are there to expose the WebRTCPeer and NetworkedMultiplayerWebRTC classes to Godot's internal scripting and were created by Fabio Alessandrelli and modified by me, Brandon Makin. The rest of the code uses WebRTC's PeerConnectionInterface to implement Godot's multiplayer API. webrtc_peer.h and webrtc_peer.cpp create the WebRTCPeer class, a class that uses Godot's lower-level PacketPeer API.
@BrandonMakin
BrandonMakin / GSoC TODO - GDNative.txt
Last active August 14, 2018 00:27
GSoC TODO - GDNative
1. fix queue_signal implementation
2. add mutexes
3. register offer_created and new_ice_candidate signals with multiple signal arguments
4. add names of arguments to register_method() calls.
5. [catch-all]: go through and fix anywhere that has a comment saying // @fixme
@BrandonMakin
BrandonMakin / gist:ed83d6ec2bb5f6e813981e92d7eaefb9
Created August 12, 2018 04:45
webrtc_native build errors
C:\Users\bmicm\Documents\GitHub\gdnative\webrtc-native>scons platform=windows headers="../godot/modules/gdnative/include/"
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
link /nologo /WX secur32.lib libwebrtc_full.lib /dll /out:bin\webrtc_native.windows.64.dll /implib:bin\webrtc_native.windows.64.lib /LIBPATH:C:\Users\bmicm\Documents\GitHub\gdnative\godot-cpp\bin /LIBPATH:webrtc\lib\x64\Debug /LIBPATH:C:\Users\bmicm\Documents\GitHub\gdnative\godot-cpp\bin godot-cpp.lib godot-cpp.lib src\init.obj src\WebRTCPeer.obj src\net\WebRTCPeerNative.obj
Creating library bin\webrtc_native.windows.64.lib and object bin\webrtc_native.windows.64.exp
init.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl WebRTCPeerNative::set_write_mode(int)" (?set_write_mode@WebRTCPeerNative@@UEAAXH@Z)
WebRTCPeerNative.obj : error LNK2001: unresolved external symbol "public: virtual void __cdecl WebRTCPeerNative::set_write_mode(int)" (?set_write_mode@WebRT
@BrandonMakin
BrandonMakin / WebRTCPeer-poll.cpp
Last active July 17, 2018 00:31
Updated WebRTCPeer::poll()
// poll() is the only place that emits signals
// and it locks the mutex. Now I save the signal function,
// unlock the mutex, and then call the function.
void WebRTCPeer::poll()
{
std::function<void()> signal;
while (!signal_queue.empty())
{
mutex_signal_queue->lock();
**********************************************************************
** Visual Studio 2017 Developer Command Prompt v15.7.0
** Copyright (c) 2017 Microsoft Corporation
**********************************************************************
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community>scons platform=windows
scons: *** No SConstruct file found.
File "C:\Python27\Scripts\..\Lib\site-packages\scons-3.0.0\SCons\Script\Main.py", line 924, in _main