{"id":17158084,"url":"https://github.com/marcospb19/godot-enet-packet-server-example","last_synced_at":"2025-06-11T17:32:41.517Z","repository":{"id":247157567,"uuid":"825146873","full_name":"marcospb19/godot-enet-packet-server-example","owner":"marcospb19","description":"Minimal example on how to setup a raw-packet `ENet` client and server in Godot 4.2","archived":false,"fork":false,"pushed_at":"2024-07-07T00:58:41.000Z","size":5,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T14:31:38.064Z","etag":null,"topics":["enet","godot","multiplayer","network","tutorial"],"latest_commit_sha":null,"homepage":"","language":"GDScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marcospb19.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-06T23:25:42.000Z","updated_at":"2024-10-27T19:42:33.000Z","dependencies_parsed_at":"2024-07-07T01:27:35.248Z","dependency_job_id":"7631ca4c-0649-4ed1-b1bf-54c916681d90","html_url":"https://github.com/marcospb19/godot-enet-packet-server-example","commit_stats":null,"previous_names":["marcospb19/godot-enet-packet-server-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/marcospb19/godot-enet-packet-server-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcospb19%2Fgodot-enet-packet-server-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcospb19%2Fgodot-enet-packet-server-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcospb19%2Fgodot-enet-packet-server-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcospb19%2Fgodot-enet-packet-server-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcospb19","download_url":"https://codeload.github.com/marcospb19/godot-enet-packet-server-example/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcospb19%2Fgodot-enet-packet-server-example/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259308157,"owners_count":22837974,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["enet","godot","multiplayer","network","tutorial"],"created_at":"2024-10-14T22:10:32.007Z","updated_at":"2025-06-11T17:32:41.498Z","avatar_url":"https://github.com/marcospb19.png","language":"GDScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `ENet` raw packet server/client example\n\nA tiny code example to show how to setup `ENet` server and clients for raw packets.\n\n- Godot 4.2.\n- Clients can only speak directly to the server.\n- Server broadcasts messages to everyone.\n- Clients receive a signal when other peers connect.\n\n## Disclaimers:\n\n- Raw packets aren't the recommended way of handling game state.\n    - Unless you have a specific reason to use raw packets, try these first:\n        - [`@rpc`](https://docs.godotengine.org/en/4.2/tutorials/networking/high_level_multiplayer.html#remote-procedure-calls)\n        - [`MultiplayerSynchronizer`](https://docs.godotengine.org/en/stable/classes/class_multiplayersynchronizer.html)\n        - [`MultiplayerSpawner`](https://docs.godotengine.org/en/stable/classes/class_multiplayerspawner.html)\n- No encryption.\n- No authorization.\n- No port forwarding.\n\n## How to run\n\nDownload and open the project in Godot 4.2:\n\n```sh\ngit clone https://github.com/marcospb19/godot-enet-packet-server-example\ncd godot-enet-packet-server-example\ngodot -e \u0026\u003e /dev/null \u0026 disown\n```\n\nSet it to run multiple instances:\n\n\u003cimg alt=\"navigating through menus: debug, run multiple instances, 4\" src=\"https://github.com/marcospb19/godot-enet-packet-server-example/assets/38900226/b9be23f9-593c-456e-964e-db20c1a6cfa7\" width=\"500\"/\u003e\n\nPress play (F5 hotkey), it should open 4 windows:\n\n\u003cimg alt=\"4 windows with 3 buttons each: Start Server, Start Client and Send Message, the last one is disabled from clicking\" src=\"https://github.com/marcospb19/godot-enet-packet-server-example/assets/38900226/813f8d59-b9ee-41a5-afb1-103469eece46\" width=\"500\"/\u003e\n\nStart clicking on buttons and you'll see logs inside of the Godot editor.\n\n\u003cimg alt=\"4 windows again, now with buttons clicked and colored, simulating a situation where someone spun up a server, a couple of clients, and sent messages between them all\" src=\"https://github.com/marcospb19/godot-enet-packet-server-example/assets/38900226/b1d89eb0-05c6-462f-9b8f-fb2beac95b16\" width=\"500\"/\u003e\n\n```ruby\npeer 2000: connected to peer 1\npeer 1   : connected to peer 2000\npeer 3000: connected to peer 1\npeer 3000: connected to peer 2000\npeer 1   : connected to peer 3000\npeer 2000: connected to peer 3000\npeer 1   : received msg from peer 3000: 'Hi from 3000'\npeer 2000: received msg from peer 3000: 'Hi from 3000'\npeer 3000: connected to peer 4000\npeer 1   : connected to peer 4000\npeer 4000: connected to peer 1\npeer 4000: connected to peer 2000\npeer 4000: connected to peer 3000\npeer 2000: connected to peer 4000\npeer 3000: received msg from peer 4000: 'Hi from 4000'\npeer 1   : received msg from peer 4000: 'Hi from 4000'\npeer 2000: received msg from peer 4000: 'Hi from 4000'\npeer 3000: received msg from peer 2000: 'Hi from 2000'\npeer 1   : received msg from peer 2000: 'Hi from 2000'\npeer 4000: received msg from peer 2000: 'Hi from 2000'\n```\n\n(IDs are random, I edited the above for better readability).\n\n## More docs?\n\nMy plan is to put some of these into the docs, there are no official docs that put together an example like this.\n\n## Open questions:\n\n1. Is this, by default, using `ENet`'s reliable mode?\n2. How hard is to change this from `Enet` to `WebRTC` or `WS`?\n\n## Can I copy this?\n\nYeah! That's the spirit!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcospb19%2Fgodot-enet-packet-server-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcospb19%2Fgodot-enet-packet-server-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcospb19%2Fgodot-enet-packet-server-example/lists"}