Questions tagged [multiplayer]

Played by multiple players, cooperatively or competitively, locally or remotely.

Filter by
Sorted by
Tagged with
75 votes
6 answers
34k views

How to write a network game? [closed]

Based on Why is it so hard to develop a MMO?: Networked game development is not trivial; there are large obstacles to overcome in not only latency, but cheat prevention, state management and load ...
Tamara Wijsman's user avatar
39 votes
9 answers
56k views

How can I make a peer-to-peer multiplayer game? [closed]

How can I make a p2p multiplayer game? I would like to have a server-less multiplayer game. But then, how all the clients know each other? Why the p2p-protocol is so famous in file transfer but not ...
Tuomas Hietanen's user avatar
30 votes
5 answers
4k views

How do I avoid "too" lucky / unlucky streaks in random number generation?

I'm currently dealing with a multiplayer combat system where the damage dealt by the players is always multiplied by a random factor between 0.8 and 1.2. In theory, a truly random RNG may eventually ...
User not found's user avatar
20 votes
6 answers
11k views

What are some ways to prevent or reduce cheating in online multiplayer games? [closed]

Punkbuster exists just to prevent cheating, and yet cheating is common in punkbuster enabled games. Modern Warefare 2 is seriously locked down from the end user running their own server or making any ...
kevin42's user avatar
  • 4,486
13 votes
4 answers
8k views

Prevent Multiplayer Cheating

I am almost complete developing a small indie-style multiplayer game. While I intend to allow people to cheat in single-player, this is obviously not acceptable in multi-player. Does anyone know of ...
JosephG's user avatar
  • 357
311 votes
14 answers
27k views

How can I find an optimum set of colors for 10 players?

I want to give each of 10 players a unique identifying color. Is there an optimum set of colors for this? How do I create one? Every set I've come up with contains colors that are too similar. ...
David Thielen's user avatar
14 votes
4 answers
5k views

How should I track players' real-time positions in an MMO?

How do you keep track of the positions of the players in a MMORPG? I read that you can use either a database or you can store the coordinates in files. I tried using a database but it was slow. How ...
rxjsisfine's user avatar
10 votes
1 answer
5k views

Network client-server message exchange and clock synchronization help

i'm doing a fast paced physics game that is a table hockey. With two mallets and one puck. The game runs on iphone / ipad and i'm doing the multiplayer part through GameCenter. This is how the ...
gmemario's user avatar
  • 659
9 votes
2 answers
15k views

Best way to interpolate player movements in a very fast paced Unity game?

In my Unity online multiplayer game players move very fast and I currently use Lerp to interpolate between their last position and current position: ...
idn's user avatar
  • 171
0 votes
1 answer
707 views

Can't figure out what's making the player teleport back to spawn

I've been working on a multiplayer game that uses pathfinding and I'm really confused over this one weird bug. On your screen, the other player glitches between the spawn point and his current ...
Chairio's user avatar
35 votes
4 answers
20k views

How does client-side prediction work?

I've read Valve + Gafferon and hundreds of pages from Google, but for whatever reason I can't get my head around client prediction. To my understanding, the basic problem is: Client A sends input at ...
Chris Evans's user avatar
26 votes
5 answers
13k views

Game logic on the server! Good or bad?

I'm currently planning a simple online multiplayer game. And here is the question. Does it make sense to make the whole game logic on the server and just send the input from the client to the server? ...
Dominic's user avatar
  • 363
20 votes
3 answers
11k views

How to make a multiplayer game work reliably behind NAT?

Even games that are 100% client/server sometimes have issues when the client is behind NAT. Peee-peer games are even a bigger issues. Some games need to use multiple transports (such as UDP and TCP) ...
kevin42's user avatar
  • 4,486
19 votes
4 answers
8k views

Best strategy (tried and tested) for using Box2D in a real-time multiplayer game? [duplicate]

I am currently tackling real-time multiplayer physics updates for a game engine I am writing. My question is how best to use Box2D for networked physics. If I run the simulation on the server, should ...
user avatar
16 votes
3 answers
17k views

Interpolating positions in a multiplayer game

In order to save bandwidth in my multiplayer game, I do not update every object every server tick, instead each object has an updateRate which tells the game that this object is expected to be updated ...
Ivo Wetzel's user avatar
  • 2,412
15 votes
4 answers
9k views

Does it make sense to use both TCP and UDP at once?

After reading Is UDP still better than TCP for data-heavy realtime games?, I'm wondering if it makes sense to use both TCP and UDP at the same time, but for different things: TCP for sending ...
gandalf3's user avatar
  • 257
10 votes
3 answers
2k views

How do you design a record/replay system for a frequently changing game?

I'm working in a free MMORPG and I have a problem. I'm (with other people) developing a video recording system for the game. The idea is basically: we record all the packages sent & received with ...
Marco's user avatar
  • 203
8 votes
2 answers
9k views

What data to exchange in multiplayer real time games?

I am a hobbyist programmer and right now I am curious about what data is exchanged in a multiplayer session in real time games like starcraft 2. I did a bunch of searches. I found gafferongames.com ...
Jake's user avatar
  • 547
5 votes
1 answer
888 views

Handling Different Aspect Ratios for a Multiplayer Game

I'm currently designing a competitive 2D, side-scrolling multiplayer game and I want support full screen play at any aspect ratio (e.g., 4:3, 5:4, 16:10, 16:9). Doing that is not so much a problem, my ...
NoobsArePeople2's user avatar
5 votes
6 answers
2k views

Developing an ELO like point system for a multiplayer gaming site

I'm currently working on a gaming site where users will submit virtual players for different games, like Chess, Nash, Backgammon, Go, etc. The idea is that users don't compete themselves, but through ...
Alejandro Piad's user avatar
3 votes
1 answer
3k views

How to develop both a client and headless server together in Unity

I'm making a multiplayer 2d shooter platformer in unity. And after studying the different options to program an authoritarian server and with the great help that many of you have already provided me ...
coantia's user avatar
  • 47
3 votes
1 answer
559 views

How are trajectories calculated and transmitted to other players, in multiplayer?

I play a lot of "Call of Duty", and can see tracers for gunfire, missiles, care packages falling from helicopters etc. There is a lot of activity. I am curious to know the algorithm one would use, at ...
angryITguy's user avatar
2 votes
2 answers
2k views

Implementing an online database [closed]

I'd like to get into online games programming. I thought that as a start i'd be a good idea to implement an online database that would store the progress and score for a game i have made, i'll ...
dreta's user avatar
  • 3,524
51 votes
10 answers
17k views

How to detect and prevent abuse (botting) of online game API?

I have been ocassionally working on a game idea in my free time. The gameplay and content renders it to be implemented as a online multiplayer game built with well established web technologies. You ...
p13n's user avatar
  • 613
33 votes
2 answers
19k views

How should multiplayer games handle authentication?

I've been lurking around to understand how an authentication system would work in games, but after many searches, it seems that working with ssl/certificates could be a little complicated for just a ...
Wolfrevo Kcats's user avatar
29 votes
14 answers
12k views

How to implement "bullet time" in a multiplayer game?

I have never seen such a feature before, but it should provide an interesting gameplay opportunity. So yes, in a multiplayer/real-time environment (imagine FPS), how could I implement a slow motion/...
tomsseisums's user avatar
  • 3,356
20 votes
1 answer
5k views

How do game clients know that a server is running on their LAN?

In lots of multiplayer games there is the option for LAN play. My question though is how does a client know where a server is on the LAN? The only ways I can think of Send out broadcasts over the ...
TheLQ's user avatar
  • 355
20 votes
3 answers
4k views

How to predict movement correctly when a player is invisible?

I have a multiplayer game and I'm doing client-side prediction, but some players can drink a potion and become invisible... The problem is that when they become invisible I don't share anything that ...
affiszervmention's user avatar
18 votes
6 answers
2k views

In what kind of variable type is the player position stored on a MMORPG such as WoW?

I even heard J. Carmack quickly talk about it... How a software can track a player's position so accurately, being on a such huge world, without loading between zones, and on a multiplayer scale ? ...
jokoon's user avatar
  • 5,243
17 votes
6 answers
5k views

Creating a seamlessly looping 2D multiplayer level?

A discussion came up recently about how to create a 2D side-scrolling multiplayer game that can have an looping level design (Think of Starbound and how their worlds are looping). I thought the ...
KenQueso's user avatar
  • 173
15 votes
2 answers
3k views

Should the game host be the authority, or another dumb client?

When designing a networked multiplayer-game where one player hosts and others connect, there are two strategies I'm aware of: Have the host-player's game be the authority, with all other players as ...
BlueRaja - Danny Pflughoeft's user avatar
13 votes
2 answers
3k views

How would a game-state snapshot system be implemented for networked real-time games?

I want to create a simple client-server real-time multiplayer game as a project for my networking class. I've read a lot about real-time multiplayer network models and I understand the relationships ...
Vittorio Romeo's user avatar
13 votes
4 answers
9k views

Simplest most effective way to rank and measure player skill in a multi-player environment?

I know of the Truskill algorithm, it's quite complex but effective. My question is there other algorithms/methods to determine a players skill for accurate measuring for multi-player competitive ...
Wight's user avatar
  • 1,184
12 votes
3 answers
35k views

Limitations of p2p multiplayer games vs client-server [closed]

I am reading up on multiplayer game architecture. So far most of the articles i've found deal with the client-server model. I'd like to know what are the limitations for using a p2p architecture? ...
spaceOwl's user avatar
  • 899
12 votes
3 answers
7k views

Realtime multi-player game design principles for Node.js

I've been reading the Valve article on multi-player networking which has been adapted from Yahn Bernier's 2001 paper called Latency Compensating Methods in Client/Server In-game Protocol Design and ...
Yoshima's user avatar
  • 223
11 votes
3 answers
18k views

Best solution for multiplayer realtime Android game [closed]

I plan to make multiplayer realtime game for Android (2-8 players), and I consider, which solution for multiplayer organization is the best: Make server on PC, and client on mobile, all communition ...
piotrek's user avatar
  • 1,388
11 votes
3 answers
14k views

How do I sync multiplayer game state more efficiently than full-state updates?

I've done a little game network coding before, but primarily with TCP for games without real-time needs. I am working on a 2D Java game with networked multiplayer. For learning, I want to do this ...
Haz's user avatar
  • 211
9 votes
2 answers
7k views

How to structure a simple game server for a multiplayer game?

I would like to create a simple multiplayer game server for a simple game: The game is supposed to be similar to Command & Conquer, you have a few tanks and a few soldiers. You can select one ...
Jonas's user avatar
  • 195
9 votes
3 answers
14k views

How to synchronize clocks in multiplayer game?

I have 2 to 3 clients, that can exchange messages through Apple Game Center. The only synchronization I need is: start the game at the same moment. I guess this involves clock synchronization. How ...
GameCoder's user avatar
  • 261
8 votes
2 answers
1k views

Detecting wins in peer to peer RTS games like Starcraft

A typical RTS game is implemented with the standard networking model: peer to peer lockstep. Consider Starcraft 2, given that Battle.net presumably doesn't know anything about the state of game given ...
user782220's user avatar
  • 1,007
8 votes
6 answers
4k views

Which server platform to choose [closed]

I'm going to write a server for an online multiplayer with these requirements: Pretty simple turn based game (think a card game) that is played entirely on the server (security reasons) Must be able ...
Bart van Heukelom's user avatar
7 votes
3 answers
5k views

Tips for communication between JS browser game and node.js server? [closed]

I am tinkering around with some simple Canvas based cave flyer game and I would like to make it multiplayer eventually. The plan is to use Node.js on the server side. The data sent over would ...
Petteri H's user avatar
  • 1,743
6 votes
1 answer
683 views

Applying the input for the always-moving player in the multiplayer game

I've read several articles published on gambrielgambetta.com, gafferongames.com plus some pages about how Valve handles multiplayer networking in its games but I still can't get it how to implement ...
nmindiedev's user avatar
6 votes
1 answer
5k views

Should I encrypt my multiplayer network traffic?

My plan has been to use RSA to exchange AES session-keys with a client, which is then used for all the usual in-game stuff. Clients never connect with each other, all communication is client to server ...
Anonymous Entity's user avatar
6 votes
4 answers
2k views

How significant is the addition of multiplayer to a singleplayer game compared to starting with multiplayer in mind?

Especially for game designers or software engineers, I was wondering how significant of an increase in difficulty/frustration/workload it would be for multiplayer to be an afterthought of a ...
user avatar
4 votes
4 answers
3k views

Key mapping for a 2-players game

I've been struggling for a while trying to figure out the best way to map two players on a single keyboard. Let's consider something generic: Arrows Validation Cancel (optional) Some common actions ...
Vincent's user avatar
  • 143
4 votes
2 answers
3k views

How can I alleviate network lag issues with players from other countries?

I am developing a small multiplayer game where players move through the map and interact with each other. The game is written in VB.Net. When I tested my game with players on a LAN everything worked ...
Edgars Gutkis's user avatar
2 votes
1 answer
828 views

Can Cloud Functions be used for a multiplayer game server?

I'm building a turn-based online multiplayer game with Unity for both desktop and mobile. Traditionally, I would build a Java socket server, host it in Google Compute Engine or similar, and have ...
JVon's user avatar
  • 121
2 votes
1 answer
2k views

How to solve "server lag" problems that break the game

How do real-time multiplayer games deal with latency problems (or “server lag”)? Imagine an online fighting game where 2 players battle head-to-head in real time. When a player performs an action, ...
clickbait's user avatar
  • 257
2 votes
3 answers
493 views

Implementing single and muliplayer without messing everything up [closed]

I don't know a good way to implement single and multiplayer in a game without messing up the whole project structure. Should I create separate classes for single and multiplayer entities or is there ...
Philipp Kirsch's user avatar