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

Godot 3 Compatibility #12

Open
Melech opened this issue Apr 17, 2018 · 2 comments
Open

Godot 3 Compatibility #12

Melech opened this issue Apr 17, 2018 · 2 comments

Comments

@Melech
Copy link

Melech commented Apr 17, 2018

I tried running this code using Godot 3 and it had a couple errors that took me a while to figure out.

I made a fork and updated the code to work for me in Godot 3.0.2. Here is a link:
https://github.com/Melech/Godot-3-NodeJS-Websocket

Changes:
The function connect() has been renamed to connect_to_host()
The is_connected() function does not appear to work, so I changed it to get_status()==STATUS_CONNECTED
Changed running of the main loop to be called by scene.gd inside _process rather than as a separate thread (which caused thread crashing when game exits)
Removed nodejs dependencies (coffee and express)
Disabled masking of sent messages (because it doesn't appear to be required and I couldn't figure out how to unmask it in node)

I hope this helps

@Melech
Copy link
Author

Melech commented Apr 18, 2018

It's also worth mentioning that I could not get sending packets above 125 bytes to work with "ws", so I converted my project to work with "websocket" instead.

Using "websocket" I am able to send and receive up to 8kb packets without any errors that I can detect
https://github.com/Melech/Godot-3-NodeJS-Websocket/tree/Better-Websocket

@marcosbitetti
Copy link
Owner

Some package configurations to send more data over 125bytes... but I remember to be make it... or maybe try something related....
I make a coffe break in this project because Godot 3.0 network features... but i can check it nearby

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

No branches or pull requests

2 participants