this post was submitted on 28 Sep 2025
5 points (100.0% liked)
Godot
7407 readers
14 users here now
Welcome to the programming.dev Godot community!
This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.
Make sure to follow the Godot CoC while chatting
We have a matrix room that can be used for chatting with other members of the community here
Links
Other Communities
- !inat@programming.dev
- !play_my_game@programming.dev
- !destroy_my_game@programming.dev
- !voxel_dev@programming.dev
- !roguelikedev@programming.dev
- !game_design@programming.dev
- !gamedev@programming.dev
Rules
- Posts need to be in english
- Posts with explicit content must be tagged with nsfw
- We do not condone harassment inside the community as well as trolling or equivalent behaviour
- Do not post illegal materials or post things encouraging actions such as pirating games
We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent
Wormhole
Credits
- The icon is a modified version of the official godot engine logo (changing the colors to a gradient and black background)
- The banner is from Godot Design
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I don't have experience with web sockets in godot but I do have experience in web development
I assume it's because you are hosting the game from somewhere other than where you are trying to connect.
A look at this article should help. https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS#examples_of_access_control_scenarios
You'll need to send some extra headers that will allow the browser to connect to it.
I think this one? https://developer.mozilla.org/en-US/docs/Web/HTTP/Guides/CORS#access-control-allow-origin
I only ever set it to * and forgot about it when I have done API development.
I hope this is helpful!
Now the game awaits pending, but then shows "CONNECTION_TIMEOUT".
I think it might be helpful to understand the flow from a high level to help you further. Because right now I'm bit confused on the ordering / actors involved and what the difference between what is supposed to happen and what is happening.
Doesn't have to be a great diagram. Something shitty like this diagram below.
Don't pay attentions on the quality, the meaning is important here. It's a normal diagram.
And, yeap! The game's webserver (nginx) locates in the same VPS where locates the game's APIs. So, a browser loads the game's client (WebGL version of the game) from the same place, where in the next step, after loading has finished, this browser will connects to that place for connection to the game's APIs.
Thanks to you, @nobody_special ๐ค
But I already guessed where's the problem was be.
https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content
If it said shortly, I needed to add to the IP address for a connection (for example 192.168.0.150), one of the name of the secure protocols (wss://, https://, etc.) (result: wss://192.168.0.150/)
So, I think that I'm in one step closer to the solution.
Now the developer consoles seems somehow like that:
But the game still doesn't works.
Thanks for your help, again ๐ค