summaryrefslogtreecommitdiff
path: root/modules/webrtc
AgeCommit message (Collapse)Author
2022-09-01Simplify network GDExtension bindings using EXBIND macros.Fabio Alessandrelli
Simplify StreamPeer, PacketPeer, MultiplayerPeer extension. Simplify and update WebRTC*Extension with newly supported types.
2022-08-29[Web] Rename JavaScript platform to Web.Fabio Alessandrelli
Also rename export name from "HTML5" to "Web".
2022-08-08Rename the argument tag to param in XML documentationYuri Sizov
2022-07-26[Net] Modularize multiplayer, expose MultiplayerAPI to extensions.Fabio Alessandrelli
- RPC configurations are now dictionaries. - Script.get_rpc_methods renamed to Script.get_rpc_config. - Node.rpc[_id] and Callable.rpc now return an Error. - Refactor MultiplayerAPI to allow extension. - New MultiplayerAPI.rpc method with Array argument (for scripts). - Move the default MultiplayerAPI implementation to a module.
2022-07-25Code quality: Fix header guards consistencyRémi Verschelde
Adds `header_guards.sh` bash script, used in CI to validate future changes. Can be run locally to fix invalid header guards.
2022-07-03Register missing WebRTCDataChannelJS typemj.Jernigan
2022-06-09[WebRTC] Static extension registration.Fabio Alessandrelli
2022-05-19Add dedicated macros for property name extractionHaoyu Qiu
* Replace case-by-case extraction with PNAME & GNAME * Fix group handling when group hint begins with property name * Exclude properties that are PROPERTY_USAGE_NO_EDITOR * Extract missing ADD_ARRAY*, ADD_SUBGROUP* macros
2022-05-16Replace most uses of Map by HashMapreduz
* Map is unnecessary and inefficient in almost every case. * Replaced by the new HashMap. * Renamed Map to RBMap and Set to RBSet for cases that still make sense (order matters) but use is discouraged. There were very few cases where replacing by HashMap was undesired because keeping the key order was intended. I tried to keep those (as RBMap) as much as possible, but might have missed some. Review appreciated!
2022-05-04Refactor module initializationreduz
* Changed to use the same stages as extensions. * Makes the initialization more coherent, helping solve problems due to lack of stages. * Makes it easier to port between module and extension. * removed the DRIVER initialization level (no longer needed).
2022-04-06Fix some issues found by cppcheck.bruvzg
2022-03-10Discern between virtual and abstract class bindingsreduz
* Previous "virtual" classes (which can't be instantiated) are not corretly named "abstract". * Added a new "virtual" category for classes, they can't be instantiated from the editor, but can be inherited from script and extensions. * Converted a large amount of classes from "abstract" to "virtual" where it makes sense. Most classes that make sense have been converted. Missing: * Physics servers * VideoStream * Script* classes. which will go in a separate PR due to the complexity involved.
2022-03-04WebRTC: Fix potential nullptr dereference in error messageRémi Verschelde
This was evidently a typo. Didn't get a crash but GCC 12 raised a `-Warray-bounds` warning: ``` In file included from ./core/io/stream_peer.h:34, from ./core/io/packet_peer.h:34, from ./core/multiplayer/multiplayer_peer.h:34, from modules/webrtc/webrtc_multiplayer_peer.h:34, from modules/webrtc/webrtc_multiplayer_peer.cpp:31: In member function 'T* Ref<T>::operator->() [with T = WebRTCMultiplayerPeer::ConnectedPeer]', inlined from 'virtual Error WebRTCMultiplayerPeer::put_packet(const uint8_t*, int)' at modules/webrtc/webrtc_multiplayer_peer.cpp:376:4: ./core/object/ref_counted.h:101:24: error: array subscript 0 is outside array bounds of 'Ref<WebRTCMultiplayerPeer::ConnectedPeer> [0]' [-Werror=array-bounds] 101 | return reference; | ^~~~~~~~~ ```
2022-02-16Style: Cleanup single-line blocks, semicolons, dead codeRémi Verschelde
Remove currently unused implementation of TextureBasisU, could be re-added later on if needed and ported.
2022-02-15Add an XML schema for documentationHugo Locurcio
This makes it easier to spot syntax errors when editing the class reference. The schema is referenced locally so validation can still work offline. Each class XML's schema conformance is also checked on GitHub Actions.
2022-01-28Improve some signal bindings to use specific `Object` subtypesRémi Verschelde
2022-01-20Rename or refactor macros to avoid leading underscoresOmar Polo
These are not used consistently and some can conflict with system-specific defines. While here, also delete some unused macros.
2022-01-18Dictionary: Serialize empty dict as `{}` instead of `{\n}`Rémi Verschelde
Also make sure to always convert multiline dictionaries to a single line for its EditorHelp representation, as multiline values break formatting.
2022-01-03Update copyright statements to 2022Rémi Verschelde
Happy new year to the wonderful Godot community!
2022-01-02Fix usage of "Return" in the docskobewi
2021-12-15[Net] Fix WebRTC returning packets from peers too early.Fabio Alessandrelli
Due to the async nature of WebRTC implementations, the multiplayer peer could end up having queued packets from a given connection before it is able to emit the "peer_added" signal. This commit ensures that packets from peers which are not notified yet are skipped by `get_packet` and `get_available_packet_count`.
2021-10-05doc: Fix style inconsistencies for `[b]Note:[/b]` paragraphsRémi Verschelde
And fix up formatting not supported by makerst.
2021-10-01[Net] Rename RPC constants and annotation arguments.Fabio Alessandrelli
any -> any_peer sync -> call_local ordered -> unreliable_ordered Multiplayer.RPC_MODE_ANY -> RPC_MODE_ANY_PEER Multiplayer.TRANSFER_MODE_ORDERED -> TRANSFER_MODE_UNRELIABLE_ORDERED
2021-09-30Use range iterators for `Map`Lightning_A
2021-09-29Fix const pointers types in docs and extension API.Fabio Alessandrelli
The GDVIRTUAL_NATIVE_PTR did not declare the correct GDNativeConstPtr template, resulting in "void*" being used as it's type info in both the documentation and the extension API dump.
2021-09-28Merge pull request #52481 from Faless/net/4.x_native_peersFabio Alessandrelli
[Net] Extension system for network peers, webrtc.
2021-09-25Document Android permission requirements for network access where neededHugo Locurcio
2021-09-24[Net/Docs] Update extensions documentation.Fabio Alessandrelli
2021-09-24[Net] Expose WebRTC classes to extensions.Fabio Alessandrelli
2021-09-24[Net] MultiplayerPeer cleanup, defaults.Fabio Alessandrelli
2021-09-20Don't generate empty doc sections and reduce code duplicationAaron Franke
2021-09-08Multiplayer networking renames/simplificationMax Hilbrunner
Removes _networking_ prefix from some methods and members, now that multiplayer has been largely moved out of Node and SceneTree and is seperated into its own set of classes.
2021-09-07[Net] Move multiplayer to core subdir, split RPCManager.Fabio Alessandrelli
Move multiplayer classes to "core/multiplayer" subdir. Move the RPCConfig and enums (TransferMode, RPCMode) to a separate file (multiplayer.h), and bind them to the global namespace. Move the RPC handling code to its own class (RPCManager). Renames "get_rpc_sender_id" to "get_remote_sender_id".
2021-07-30[Net] Implement RPC channels in MultiplayerAPI.Fabio Alessandrelli
2021-07-30doc: Use self-closing tags for `return` and `argument`Rémi Verschelde
For the time being we don't support writing a description for those, preferring having all details in the method's description. Using self-closing tags saves half the lines, and prevents contributors from thinking that they should write the argument or return documentation there.
2021-07-26Use Ref<T> references as iterators where relevantRémi Verschelde
And const when possible.
2021-07-23Use C++ iterators for Lists in many situationsAaron Franke
2021-07-20Add get_buffered_amount() to WebRTCDataChannelDavid Snopek
2021-07-18Optimize StringName usagereduz
* Added a new macro SNAME() that constructs and caches a local stringname. * Subsequent usages use the cached version. * Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time. * Replaced all theme usages by this new macro. * Replace all signal emission usages by this new macro. * Replace all call_deferred usages by this new macro. This is part of ongoing work to optimize GUI and the editor.
2021-07-17Fix "IDHandler.get_prop is not a function" error when calling some methods ↵David Snopek
on WebRTCDataChannel
2021-07-15[HTML5] Fix build (with module_webxr_enabled=no).Fabio Alessandrelli
The XR API changed a bit, and it's not just a rename, though probably an easy update for someone who is qualified :).
2021-07-15Misc cleanup of header includesRémi Verschelde
Was looking for misuse of module headers without checking that the module is actually enabled and got carried away...
2021-07-13Implement the ability to disable classesreduz
* This PR adds the ability to disable classes when building. * For now it's only possible to do this via command like: `scons disable_classes=RayCast2D,Area3D` * Eventually, a proper UI will be implemented to create a build config file to do this at large scale, as well as detect what is used in the project.
2021-07-12[Net] Rename WebRTCMultiplayer to WebRTCMultiplayerPeer.Fabio Alessandrelli
2021-07-12[Net] Rename NetworkedMultiplayerPeer to MultiplayerPeer.Fabio Alessandrelli
2021-06-11Rename Reference to RefCountedPedro J. Estébanez
2021-05-20Fix typos with codespellRémi Verschelde
Using codespell 2.0.0. Method: ``` $ cat > ../godot-word-whitelist.txt << EOF ang curvelinear dof doubleclick fave findn GIRD leapyear lod merchantibility nd numer ois ony que seeked synching te uint unselect webp EOF $ codespell -w -q 3 -I ../godot-word-whitelist.txt --skip="./thirdparty,*.po" $ git diff // undo unwanted changes ```
2021-02-08Initialize class/struct variables with default values in modules/Rafał Mikrut
2021-01-01Update copyright statements to 2021Rémi Verschelde
Happy new year to the wonderful Godot community! 2020 has been a tough year for most of us personally, but a good year for Godot development nonetheless with a huge amount of work done towards Godot 4.0 and great improvements backported to the long-lived 3.2 branch. We've had close to 400 contributors to engine code this year, authoring near 7,000 commit! (And that's only for the `master` branch and for the engine code, there's a lot more when counting docs, demos and other first-party repos.) Here's to a great year 2021 for all Godot users 🎆
2020-12-18SCons: Add explicit dependencies on thirdparty code in cloned envRémi Verschelde
Since we clone the environments to build thirdparty code, we don't get an explicit dependency on the build objects produced by that environment. So when we update thirdparty code, Godot code using it is not necessarily rebuilt (I think it is for changed headers, but not for changed .c/.cpp files), which can lead to an invalid compilation output (linking old Godot .o files with a newer, potentially ABI breaking version of thirdparty code). This was only seen as really problematic with bullet updates (leading to crashes when rebuilding Godot after a bullet update without cleaning .o files), but it's safer to fix it everywhere, even if it's a LOT of hacky boilerplate.