Godot Version
4.2.1
Question
Pretty straightforward question. I have tried 2 solutions, one with a plugin, another with HttpServer from C# but I can’t get any of those to work. I once did this in Unity and there were simple guides and got it running in no time
Please include in your question what you are trying to do.
Why do you want your game to be a HttpServer?
What kind of data do you intend to transfer and why?
What is going to be the client(s) connecting to your game?
1 Like
Hey Timothy, thanks for your answer.
I’d like my game to be an http server so I can send the game’s real-time information to a webpage whenever the webpage asks for it. So if I log in in the webpage and want to see how my character is equiped, the game server would give that information through API calls.
The data would be in JSON format, strings and numbers.
This can be achieved using the WebSocketServer and WebSocketClient classes. While it’s not the same protocol, it can be used to achieve the same things and web browsers can interact with this protocol natively. In fact, it’s more suited for persistent connections compared to HTTP.
Material Maker uses WebSockets to connect the website to the locally running application.
2 Likes
Thankyou! I will try this solution, it seems the fastest one 