One of my friends made a small playable game, and asked me to change it, so it's the internet. I do not want to make major changes to client applications.
When a game is created, the server sends UDP broadcast packets to tell everyone that a game has been created. Now, I need to change this broadcast to send these packets to a group of Internet IP addresses.
Can you please tell me that the following solution is a good one: I will make a room server, it is called 'room-broadcast-server', in which everyone who joins the room has IP addresses. After that, instead of sending that broadcast packet to the cloud, the packet will be sent to the room-broadcast-server, which will broadcast this packet to anyone who is included in the room.
The problem is: Get these packets from 'Room-Brocast-Server' and they will try to do a comic with room-broadcast-server, which will come with a machine made Instead. I would like to fool the customers so that they think the packet came from the game server, and not the room-broadcast-server. How can I make it?
Are you modifying only the server, or both the servers and Customer? I would have thought that it would be easy to completely remove the broadcast and the clients clearly want to connect to the server, instead of depending on the server's broadcast they must choose.
As Version 1, you simply require players to connect the server to IP address / DNS name in the client to connect.
For version 2, you can add support for "lobby" where you have (known) central lobby server that connects both clients and servers to find each other (hence the server lobby To connect their presence to the announcement and then connect to the client lobby so that they connect to browse the server).
In a game that I am writing (but due to lack of free time, currently can be: p) I wrote the "lobby" server as a simple PHP + MySQL web application And to use the clients and servers to select it for HTTP updates and so on, in this way, I can host the central lobby server on the cheap web host and any game can play (this flaw is cheap Web host arbitrary sock Do not allow connections, so I was not able to apply it to NAT punch-in, but if this game became popular, then when the lobby was to take the server to a more expensive host, which did Allow arbitrary socket connection ...)
Comments
Post a Comment