Tag Info

New answers tagged

0

My personal opinion on this is that if it's a competitive game, the information should not be available on the client until it's ready to be shown to the player. The League of Legends launcher at one time knew the names of your opponents, but displayed "Summoner 1", "Summoner 2" etc. So a few times someone said in the pre-game chat "Hey Summoner 1 is an ...


5

General concept Create a server class (to handle connections and messaging) and a client class (to handle connecting to server by IP and port). Then ask the player whether they want to create or join a server. If create, start a server and join it with the client. If join, join the existing server. Minecraft singleplayer can be opened to the LAN, by ...


0

Why is Server-Lockstep easier to implement? With a server, you know for sure that all clients are getting the same data on Frame X because the server sends out the data on X frame. If each client got their information from other clients, they would have to first figure out if he has everyone's information. Then he has to make sure that nobody else has ...


0

How can I know whether a player is connected? There are several ways, but you could use an AJAX request that pings every 10 seconds. If the user last timestamp was in the last 10+1 seconds, he should still be 'connected'. How can I detect when a player closes the browser, and set them to disconnected? Use the above solution, the user simply times ...


0

For a realtime Game there are two kinds of network packet: client send request then server response server push packet to client if you want to sync game state such as hp, mp, position, client need to send these state packet to server, then server push these packet to all other clients; server only send state change of each entities. so for state sync, ...


0

Given what you've wrote I'm guessing that you're working on a real time game, not turn based. So you'll want to send player specific UDP packets continuously at a more or less fixed rate. Do not use full TCP for real time games - if you need TCP-like behavior then emulate it with UDP. This is because both use IP (see also OSI model), and one protocol can ...


0

When to send events? In a typical game design a particular range is set where the center is the player. In the server point of view, it does not send you details on what does not concern your range of sight or range your player is affected at. So it does not send events(bandwidth) if it happens on [another map] or [on the same map but you are not in ...



Top 50 recent answers are included