Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it work with Godot 4.2.2 #14

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sirikon
Copy link

@sirikon sirikon commented May 16, 2024

Hi there! We've been adapting the script to make it work properly on Godot 4.2.2. Here are the changes we had to introduce to make it work for us.

  • Fixed the SERVER_INFO packet parsing (it was just picking the port and ignoring address and peer name).
  • Changed remaining calls from listen (not present anymore in Godot 4.2.2) to bind.
  • Closed sockets before signaling hole_punched, so if a new socket starts immediately afterwards, there won't be any problems with the port being in use.
  • Made sure that both server_udp and peer_udp are closed before emitting hole_punched.

Hope this is useful!

@sirikon sirikon changed the title Make it work with Godot 4 Make it work with Godot 4.2.2 May 16, 2024
@btarg
Copy link

btarg commented Oct 8, 2024

I'd really like to try this to get seamless working multiplayer in Godot 4 stable!
Edit: I am concerned however about using such an old Python version and dependencies for the server. Maybe the server can be rewritten in modern python or another language instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants