summaryrefslogtreecommitdiffstats
path: root/modules/enet
Commit message (Collapse)AuthorAgeFilesLines
...
* [Net] ENetMultiplayerPeer now sends fragmented packets unreliably too.Jordan Schidlowsky2021-12-151-2/+8
| | | | | | | | | It used to always send them reliably when transfer mode was unreliable or ordered if the packet size was more then the enet host MTU (1400 bytes by default). This commit also adds a warning when debug is enabled to explain the effects of sending fragmented packets unreliably.
* Replace Godot docs URL with `$DOCS_URL` in XML class referenceRémi Verschelde2021-11-151-1/+1
|
* doc: Fix style inconsistencies for `[b]Note:[/b]` paragraphsRémi Verschelde2021-10-052-4/+4
| | | | And fix up formatting not supported by makerst.
* [Net] Rename RPC constants and annotation arguments.Fabio Alessandrelli2021-10-011-1/+1
| | | | | | | | | 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
* Merge pull request #52481 from Faless/net/4.x_native_peersFabio Alessandrelli2021-09-283-56/+23
|\ | | | | [Net] Extension system for network peers, webrtc.
| * [Net/Docs] Update extensions documentation.Fabio Alessandrelli2021-09-241-2/+0
| |
| * [Net] MultiplayerPeer cleanup, defaults.Fabio Alessandrelli2021-09-242-54/+23
| |
* | [ENet] Fix server not correctly relaying peer disconnects.Fabio Alessandrelli2021-09-271-1/+1
| |
* | Document Android permission requirements for network access where neededHugo Locurcio2021-09-251-0/+1
|/
* Don't generate empty doc sections and reduce code duplicationAaron Franke2021-09-201-2/+0
|
* Multiplayer networking renames/simplificationMax Hilbrunner2021-09-081-2/+2
| | | | 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.
* [Net] Move multiplayer to core subdir, split RPCManager.Fabio Alessandrelli2021-09-073-10/+10
| | | | | | | | | | | 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".
* [Net] Silence ENetMultiplayerPeer close_connection.Fabio Alessandrelli2021-09-021-1/+3
| | | | | Used to print an error when it was not active, now it just returns immediately as per the documentation.
* Document ENetConnection compression must match between client and serverHugo Locurcio2021-08-231-0/+1
|
* Replace HTTP links with HTTPS for sites with HTTPS versionsAaron Franke2021-08-221-1/+1
|
* [Net] Fix ENetMultiplayerPeer status during connection.Fabio Alessandrelli2021-08-061-1/+1
| | | | | While the client emitting "peer_connect" for the server, the status was still set to CONNECTION_CONNECTING, causing bugs in the upper layer.
* [Net] Implement RPC channels in MultiplayerAPI.Fabio Alessandrelli2021-07-302-18/+33
|
* Merge pull request #51067 from akien-mga/doc-return-argument-self-closing-tagsRémi Verschelde2021-07-303-194/+97
|\ | | | | doc: Use self-closing tags for `return` and `argument`
| * doc: Use self-closing tags for `return` and `argument`Rémi Verschelde2021-07-303-194/+97
| | | | | | | | | | | | | | | | 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.
* | [Net] Fix ENet 'connect_to_host' creating only one channel.Fabio Alessandrelli2021-07-301-1/+1
|/ | | | | | | | Passing `0` to `enet_host_create` will allow the maximum amount of channel supported by ENet. For some reasons, `connect_to_host` will instead only create 1 channel when passed `0`. This commit normalize the behaviour to always allocate the maximum allowed channels when passing `0`.
* [Net] Refactor ENetMultiplayerPeer to use ENet wrappers.Fabio Alessandrelli2021-07-293-831/+481
|
* [Net] Implement lower level ENet wrappers.Fabio Alessandrelli2021-07-298-0/+1458
|
* [Net] Add generate_unique_id to MultiplayerPeer.Fabio Alessandrelli2021-07-292-23/+1
| | | | | | Used by ENetMultiplayerPeer and WebSocketServer to generate network IDs, and exposed to the user for p2p networks (e.g. WebRTCMultiplayerPeer) and custom MultiplayerPeer implementations.
* Optimize StringName usagereduz2021-07-181-8/+8
| | | | | | | | | | | * 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.
* Enable range coder compression by default in NetworkedMultiplayerENetHugo Locurcio2021-07-162-5/+6
| | | | | | | | | | | | | From empirical testing, this seems to provide the best compression compared to other compression algorithms when used in the Multiplayer Bomber demo. Other algorithms may provide better compression ratios for more complex games, but some compression is probably better than no compression. Zstandard was also not very efficient in my testing, so I added a note in the documentation.
* Implement the ability to disable classesreduz2021-07-131-1/+1
| | | | | | | * 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.
* [Net] Rename NetworkedMultiplayerENet to ENetMultiplayerPeer.Fabio Alessandrelli2021-07-125-95/+95
|
* [Net] Rename NetworkedMultiplayerPeer to MultiplayerPeer.Fabio Alessandrelli2021-07-123-8/+8
|
* [Net] Remove most multiplayer hooks from SceneTree.Fabio Alessandrelli2021-07-121-1/+1
| | | | Use `multiplayer` or `get_multiplayer()` instead of `get_tree()`.
* Merge pull request #48331 from Faless/net/4.x_enet_relay_laxRémi Verschelde2021-06-171-1/+4
|\ | | | | [Net] ENet non-relaying server now process broadcasts.
| * [Net] ENet non-relaying server now process broadcasts.Fabio Alessandrelli2021-04-301-1/+4
| | | | | | | | | | | | | | | | | | Setting `server_relay = false` prevents the server from letting clients communicate with each other, but without this fix, the server would also ignore broadcast packets. With this change, the server still does not relay messages to other clients, but will correctly process broadcast messages (and "exclusive" messages) as if they were directed to just the server.
* | Fix typos with codespellRémi Verschelde2021-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ```
* | Rename `IP_Unix`, `IP_Address` and `TCP_Server` to remove underscoresHugo Locurcio2021-05-062-11/+11
|/
* Merge pull request #48235 from Faless/feature/network-local-port-enet-salvagedRémi Verschelde2021-04-283-35/+40
|\ | | | | [Net] Implement NetworkedMultiplayerENet.get_local_port
| * Implement NetworkedMultiplayerENet.get_local_portFabio Alessandrelli2021-04-283-35/+40
| | | | | | | | Allows retrieving the local port to which the peer is bound.
* | Core: Drop custom `copymem`/`zeromem` definesRémi Verschelde2021-04-271-3/+3
|/ | | | | | | | We've been using standard C library functions `memcpy`/`memset` for these since 2016 with 67f65f66391327b2967a20a89c3627e1dd6e84eb. There was still the possibility for third-party platform ports to override the definitions with a custom header, but this doesn't seem useful anymore.
* Fixes small typos and grammar correctionAnshul7sp12021-03-121-1/+1
|
* Add set_peer_timeout to NetworkedMultiplayerENet.Fabian2021-02-273-0/+26
|
* Initialize class/struct variables with default values in modules/Rafał Mikrut2021-02-082-35/+19
|
* Mention that NetworkedMultiplayerENet uses UDP onlyHugo Locurcio2021-01-141-0/+2
| | | | This is important to clarify for those doing port forwarding.
* Update copyright statements to 2021Rémi Verschelde2021-01-014-8/+8
| | | | | | | | | | | | | | 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 🎆
* SCons: Add explicit dependencies on thirdparty code in cloned envRémi Verschelde2020-12-181-2/+14
| | | | | | | | | | | | | | 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.
* Reorganized core/ directory, it was too fatty alreadyreduz2020-11-071-1/+1
| | | | | | -Removed FuncRef, since Callable makes it obsolete -Removed int_types.h as its obsolete in c++11+ -Changed color names code
* Add link titles for all links in the class referenceHugo Locurcio2020-08-311-2/+2
| | | | | This makes them display in a nicer way in the editor help. (The title will display instead of the full URL.)
* Fix crash in ENet changing refuse_new_connectionsFabio Alessandrelli2020-07-291-1/+5
| | | | When the host is not started.
* Funnel refuse_new_connections to Godot ENet.Fabio Alessandrelli2020-07-141-0/+3
|
* Improve the ENet channels documentation in NetworkedMultiplayerENetHugo Locurcio2020-07-131-2/+2
| | | | This closes https://github.com/godotengine/godot-docs/issues/3598.
* Add override keywords.Marcel Admiraal2020-07-101-14/+14
|
* Style: Enforce braces around if blocks and loopsRémi Verschelde2020-05-142-14/+27
| | | | | Using clang-tidy's `readability-braces-around-statements`. https://clang.llvm.org/extra/clang-tidy/checks/readability-braces-around-statements.html
* Style: Enforce separation line between function definitionsRémi Verschelde2020-05-141-0/+2
| | | | | | | | | | | | | | | | | | | | | | | I couldn't find a tool that enforces it, so I went the manual route: ``` find -name "thirdparty" -prune \ -o -name "*.cpp" -o -name "*.h" -o -name "*.m" -o -name "*.mm" \ -o -name "*.glsl" > files perl -0777 -pi -e 's/\n}\n([^#])/\n}\n\n\1/g' $(cat files) misc/scripts/fix_style.sh -c ``` This adds a newline after all `}` on the first column, unless they are followed by `#` (typically `#endif`). This leads to having lots of places with two lines between function/class definitions, but clang-format then fixes it as we enforce max one line of separation. This doesn't fix potential occurrences of function definitions which are indented (e.g. for a helper class defined in a .cpp), but it's better than nothing. Also can't be made to run easily on CI/hooks so we'll have to be careful with new code. Part of #33027.