Tag Info

New answers tagged

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

The client and the server will go out of sync eventually, so you'll have a smoother game if you interpolate instead of simulating with the server and then correcting, but this will induce extra lag. You cannot answer this definitely, it's up to you to decide which suits your application better. Also your questions seems a bit lacking in terms of describing ...


1

I would say that a client expresses intent to the server to do the following Start attacking Stop attacking Execute a special attack When a player enters combat on the server side, a simulation is started. The simulation examines the player's weapons and their swing timers and begins calculating when white-attacks (aka auto-attacks) occur to the target. ...


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