Tag Info

New answers tagged

0

The key to large-scale synchronization is determinism. Basically, if you can plug X into a function and get the same Y on all computers, you can send X instead of Y. For example the de facto RTS game sends commands rather than health, positions, rotations, etc. since syncing 500+ positions can use up quite a bit of bandwidth. For example, the command ...


0

You can also combine approaches from other answers (esp. splitting work into chunks, and finding bottlenecks in code) with implementing the most CPU-intensive tasks in asm.js - it's (a subset of) JavaScript, and it's fast on Fx and Chrome (and IE support is coming later).


-1

Try a hash of your entire "synchronized game state" instead of averaging data. There are some nice benefits to it, and is basically the standard for the RTS genre.


0

I highly recommend RakNet; it's relatively lightweight and implements a virtual connection over UDP for you (you don't have to manually send acks). I've had great success in using it across multiple projects.


1

First, lets get this out of the way, aiming for 100k user is ridiculous for semester project. Aiming for 100k users playing in one physical server is insane for any game. XNA is not an engine and no where near as high level as Unity. XNA just provides nice set of code, gathered in library with all the necessary "boilerplate code" done. It is DirectX for ...


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 ...


1

The Getting Started page for building Unity apps for Winows store specifically says Unity doesn't support networking on Windows Store platforms. It does mention that WWW functions work correctly though. If you're desperate, try porting your networking to HTTP.


1

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 ...


0

I have programmed a 2-player-local-network-pong game a few weeks ago, here's how I did it: -One side opens a server, the other one connects automatically -they are both spamming their paddles x position towards each other @ 60fps or less [UDP] -if one side hits the ball they decide about the balls new velocity and position and send that to the other one ...


0

Panda Pajama answer is pretty good. Basically the question comes down to what is the minimal amount of data you can send that will put multiple clients in the same awareness of each others state, and how do you handle the lag where during that lag clients might be in a different state. So procedurally generated, where all the interactions are known before ...


39

I've worked on the networking code for two real time AAA networked games, one for smartphones and one for a handheld console. To directly answer your question "why", well, some games use one or the other because it suits them better than the other. This depends not only on the type of game, but also on what type of network we're talking about (linked arcade ...


3

I have no insight on Valve's development process, so this is purely my opinion, but: Interpolation: I'd say it'd be better for fast paced games, like FPSs for example, where having a consistent position for an enemy on time across players is important. Interpolating means that, even if some packets are dropped (AFAIK, most multiplayers FPSs use UDP instead ...


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 ...


0

http://docs.unity3d.com/ScriptReference/GameObject.FindGameObjectsWithTag.html Returns a list of active GameObjects tagged tag. Only Find GameObject at root of scene, No recursive.



Top 50 recent answers are included