UE4 Blueprint Multiplayer Spawning Issue I'm attempting to copy modify the MultiplayerShootout project's multiplayer functionality for my own project. I'm running into issues when Player 2 joins a running session though. Finding it very hard to debug multiplayer stuff because you have to run it in standalone and toggling breakpoints doesn't seem to be illustrating any issues. Here's the issue https youtu.be 270p4YS36Pw The first player to search for a game hosts a game, then the OnPostLogin in the GameMode fires and calls the ClientPostLogin event in the PlayerController, then the PlayerController calls the RespawnPlayer event inside the GameMode which spawns and possesses the character. The second player finds a session and joins it, but the server is not spawning a character for them on the other PlayerStart. The logic is very much similar to the MultiplayerShootout, but I have modified it in the following ways The 1v1 button searches for sessions, and if it can't find any it will automatically host a session. The ClientPostLogin event on the PlayerController and the RespawnPlayer event on the GameMode accepts a Selected Character (Actor class) variable. This is so I can get the player to select their character before they matchmake and pass it through to the PlayerController and then GameMode for spawning purposes. Would really appreciate some help on this, been stuck on it for a while. Here's some of the blueprint scripting to make sense of it OnPostLogin event in the GameMode ClientPostLogin in the PlayerController RespawnPlayer event in the GameMode 1v1 button released event in the PlayScreen Widget HostGame event in the GameInstance JoinGame event in the GameInstance Edit I'm using UEngine version 4.24.3


Can't connect to Steam using Blueprints in UE4.25 I'm following this tutorial by Unreal Engine itself, but I don't have a Steam overlay popup like I'm supposed to, (according to the tutorial.) And actually a lot of people have a similar issues like this. What I have done tried is Enabling Steam overlay (in Steam settings, but it was already enabled) I've already edited the DefaultEngine config file I'm playing my game (in Unreal Engine) from the Standalone Game option Searching this up, re watching tutorial, looking at tutorial's comments Enabled the Online Subsystem Steam plugin And I still don't know what the issue is. I've also looked at this thread by the Unreal Engine community, but it didn't help that much.


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, there'll be a short delay until that player's action appears on the opponent's computer screen. This delay causes many game breaking problems. Let's say 2 hypothetical players, Player A and Player B, are fighting against each other right now in the game, and the latency is 1 second. Player A is moving toward Player B, but then Player B places a wall (or something of the like) that stops Player A from moving toward Player B. Player A doesn t see the wall appear on his her computer screen until 1 second later, but by then Player A has already moved past where the wall was placed. In a more game breaking situation, Player B is just about to kill Player A. Right before that happens, Player A uses a special attack that instantly kills Player B. But on Player B s computer, Player B kills Player A, because it takes 1 second before Player A s special attack happens on Player B s computer. This makes it so both players die even though only Player B was supposed to die. One solution to deal with the latency issue is to implement an artificial delay so that when there s a discrepancy, one player s game is momentarily paused to wait for the other player s game state to catch up. This is not a good solution because it makes the game feel extremely laggy and unresponsive, and it also renders some reactive actions useless (like dodging) because of the artificial delay. What can be done to fix these latency problems?


Testing Multiplayer Browser Game on Single Computer I am writing a multiplay browser based game and am running into an issue with playtesting simple interactions. When a browser window loses focus is stops running requestAnimationFrame calls. This effectively pauses the state all visuals when focus is lost. I would like to have two instances of the game running at the same time. I could playtest in one window and observe how a thirdparty would see those actions in another window. Right now I am only able to toggle between the two windows and see teleportation like behavior as the client state catches up to the new server state. I am not sure how, without setting up a second computer, I might test this. Anyone have any experience with this or any advice?


Handling actions in component based multiplayer game Please stay with me as I explain my question. I'm creating a multiplayer game. My design pattern follows broadly thoughts described in the post here. The idea is that each actor whether be it a (local) player or a npc does what a GameAction attached to this actor tells it to do. These GameActions are obtained by reacting to a received GameEvent. This enables only sending GameEvents through network and each client logic will obtain own GameActions for e.g. moving local copies of remote players themselves and also getting sanity checks from time to time. How should these actions be composed then? Who takes responsibility stopping actions? My problem right now is that if a LocalInputHandler produces on keyDown() a CHARACTER INPUT event it will be delivered to and consumed by a parent node the local player is living in. The parent node obtains a CHARACTER MOVE GameAction and attaches it to the specific local player. On update() the player character excecutes the GameAction. It moves, by itself. Like a small script interpreter. Isn't that awesome? No it isn't because if I didn't release the button (aka holding it) no new CHARACTER INPUT will be emitted and the player excecuted it's action and nothing happens. To solve this problem I came up with 6 classifications or types of GameActions Unstoppable loops forever, can only be stopped by itself OneTimeLooper loops until getting stopped, always finishes task before getting interrupted Looper loops until getting stopped, can be interrupted any time OneTimer performs action only once and can't be interrupted while doing it WeakWorker Performs action once but can always be interrupted Stopper AntiAction interrupts all types except unstoppables. Is a OneTimer This would lead having a CHARACTER MOVE action be a OneTimeLooper. It moves the attached actor until a CHARACTER MOVE STOP action tells it to do, being created because of an event originating from a keyUp() call. But this solution smells bad to me, because then each Character Actor Player has to have more than one GameAction it can hold to. A Stopper must have access to it's counterpart to know if it is allowed to stop. Also shouldn't higher order classes like parent nodes have the power to stop an GameAction since they also created them? Why not give LocalInputHandler power? How to change input style if you have a menu opened on top of the screen representing everything that happens in your world? Clarifications and optional text LocalInputHandler and localPlayer are coupled by handing over LocalInputHandler the ID (represented by UUIDs, which I'm still not sure using because they are so big for networking applications) of localPlayer in construction. Each InputHandler whether be it a remote or ai InputHandler will only now by ID which actor they are handling and will refer to this ID when creating a CHARACTER INPUT event by writing recepient actorID into the event. The message of this event is a int keymap which holds information about which key is held down. keymap is a member variable of a InputHandler It could be a boolean but for now it's an int array. Parentnode of an actor takes these informations (recepientID and keymap) and packs a CHARACTER MOVE GameAction into the event passing it down to the actor for consumption. In this process the keymap is being copied by calling .copy()on keymap because this will prevent opening a channel of direct communication from the InputHandler to the GameAction by not letting it just copy a reference but the array as a whole.


Building a simple bomberman game with Node.js and Socket.io I'm building this game mostly because I want to experiment with Node.js and Socket.io, and the game is more like a proof of concept. To start with, I have a 2D grid system as the game map. . . . . . . . . . . . . . . . Each position with values 0 empty 1 wall can not be destroyed by explosion 2 obstacles can be destroyed by explosion 3 bomb 4 9 some powerups 10 gt the id of player CLIENT SIDE I'm not planning to have any game logic happen on the client side, so the client simply send left, right, up, down and plant a bomb command to my server. There is however, some simple check that happen on the client side 1. check that there's no wall at the direction the client is moving to 2. the client didn't plant a bomb in the last 3 seconds. The client also receives the state of the map as a 2d array and knows how to draw everything using that info. SERVER SIDE Main game logic happen on the server side, which includes updating the position of player, calculating the damage of bomb explosion destroy stuff in the range, except walls and space behind walls Questions When the player is moving, he won't see himself moved until he gets the data back from server that updates his position. So I worry this delay may affect user experience, is it better that I move his position on his browser right away, and only update other players' position using info received from server, that means his own movement is rendered away, while his position info is sent to server. When rendering everything, it's simple to implement that whenever anything on the map move or change, redraw everything with the new data. Is that a waste? Can I only update things that change, for example, a player move right 1 position, nothing else changed on the game map, do I still have to redraw everything? I think I'm going to use Canvas to render. Please feel free to comment or answer if you think there are places I can improve or I simply thought wrong, thanks!


How to display image in second layer in Cocos2d I am very new at Cocos2d and is testing to displaying an image over the "Hello World" text on a second layer and need help to get it work. I guess it is some basic stuff here and appreciate any tips etc. with this. I know that if i put the display code (myLayer1) in the "init" it work or do the call self goHere from the "init" in myLayer1 it works but i want to call the "goHere" directly. I have the following code HelloWorld.m import "HelloWorldLayer.h" import "myLayer1.h" HelloWorldLayer implementation implementation HelloWorldLayer (CCScene ) scene 'scene' is an autorelease object. CCScene scene CCScene node 'layer' is an autorelease object. HelloWorldLayer layer HelloWorldLayer node myLayer1 layer1 myLayer1 node add layer as a child to scene scene addChild layer scene addChild layer1 return the scene return scene on "init" you need to initialize your instance (id) init always call "super" init Apple recommends to re assign "self" with the "super" return value if( (self super init )) create and initialize a Label CCLabelTTF label CCLabelTTF labelWithString "Hello World" fontName "Marker Felt" fontSize 64 ask director the the window size CGSize size CCDirector sharedDirector winSize position the label on the center of the screen label.position ccp( size.width 2 , size.height 2 ) add the label as a child to this Layer self addChild label myLayer1 a1 myLayer1 new a1 goHere myLayer1 release return self myLayer1.m import "myLayer1.h" implementation myLayer1 (void)goHere NSLog( " gt gt gt gt goHere lt lt lt lt ") CGSize size CCDirector sharedDirector winSize CCSprite vv CCSprite spriteWithFile "hand.png" vv.position ccp( size.width 2 , size.height 2 ) self addChild vv z 3 (id) init always call "super" init Apple recommends to re assign "self" with the "super" return value if( (self super init )) return self end


Authenticating users without a username or password I'm curious about what the process is for anonymously authenticating users when it comes to mobile games. There are quite a few examples out there, but the ones that immediately come to mind are Lords Mobile, Family Guy Quest for Stuff, and Clash of Clans. When you first open the game, you're assigned an account id and that id is tied to your device until you choose to register an account with a password or sign in through some SSO service. In that initial step where you're not creating a password or using SSO, how are these games making sure the requests are from both the user device that they come from? Or is it that they actually don't? I can imagine a simple setup where you're providing a key that needs to be refreshed every now and then just like you would with something like OAuth, but other than that you don't care that the user is who they say they are. After all, you're dealing with a request that already has to be validated for legality within the game rules.


Do "write once run anywhere" engines require platform specific code for multiplayer? I've been investigating the myriad selection of mobile game dev engines that allow compilation of your code onto multiple target platforms, but, something I can't seem to figure out is if multi platform "write it once" development is possible when you bring multiplayer into the equation. I've looked at Unity and Monkey mostly, so far, but aside from seeing threads on the Monkey forum such as "I've developed such and such networking library for Monkey"... I can't find a definitive answer. That example is one of many that causes me concern. Is it the case that if you used a cross platform engine, you'd have to write platform specific code for the networking portion of your game app? (Even if the rest of the game did work on your target platforms with no minimal platform specific "jiggery". I'm not talking about cross platform multiplayer, but I do presume that'd be a happy by product of a write once deploy anywhere (within reason) networking solution.


client server Silverlight turn based game domain model question I am making multiplayer (2 players) Minesweeper like the one that's available on MS Live Messenger. Client side is going to be silverlight, server side will be MVC Application. Client (the one who is waiting for his turn) will poll server every X seconds to get current state, the other client (who's turn it is will post his click to server and than roles will reverse) Now my question is should domain model classes be the same for client and server side? I mean you need Minefield class on both sides, but while server side class will have rules and logic, client side will be more or less a data holder.


How can I keep a consistent number of players per match in a continuous multiplayer game? Fortnite Battle Royale is an example of a non continuous multiplayer game. 100 players join a game which has fixed start and end times. When there's only one player remaining, the game ends. Agar.io is an example of what I like to call a continuous multiplayer game. Players join in and die out, but the game goes on forever. How would a game developer design a system to split players into different groups when there're too many online to fit in a single game? Let's say a game has a limit of 10 players, and 50 players are trying to join. The server will split them up into 5 separate groups. New players will be sorted evenly into these groups to replace players who died. When the player count increases past the global limit, new games will be created to fit them. The problem arises when the player count decreases. The system needs some way to seamlessly delete extra groups of players that are no longer needed. How can that be done without A) interrupting games to merge players together or B) block new players from joining into the group(s) that require deletion and waiting for everyone in it to die (which will be a bad experience for the last few players). Agar.io obviously has a player population management system that works, so how do they do it?


Is it possible to develop multiplayer games with HTML5? I know HTML5 is great for web games, but I don't really know if it's possible to develop online games with multiple users, keeping everybody synchronized and handling logins, et cetera. Is it possible to do this?


Networking to make a single player RPG into multiplayer I ve written a few games in Xcode before and would like to turn one into the simplest possible 2D top down RPG multiplayer game. Essentially just needing movements around a big tiled map (I love drawing), and chat. Keen to just host my own server on the iMac I use, with python and twisted framework (new to this but happy to take the time to learn). I m thinking TCP for chat and UDP for tracking movements but do they need to be on separate servers? Also for games like this I know there isn t much on the client side. All my map drawing and game logic is set up in Xcode, which I would prefer to keep working in because I m familiar with the language and love the sprite kits and tile maps. Do I have to redo it all in python on the server side for scaling in the future? Or for cross platform? I've done lots of research and found plenty of tutorials, just want to know I m on the right track. I m not looking to make a WoW killer just something simple I can gradually build on for fun


Is there a way to do local multiplayer on a combination of Windows Ubuntu computers? So far I've tried Bluetooth but it doesn't appear to work on either windows or Ubuntu (for this use case it can connect to printers fine). I've also looked up USB bridge cables, but from what I ve read so far, they can't be used for this, either. Since the game is a hobby project, the solution can neither be expensive, nor require months of work. It's a turn based game. Otherwise I wouldn't be asking but finding a different project after finding out neither Unity nor Unreal Engine can do this currently, I'm using neither. Is there a way to do local multiplayer on a combination of Windows Ubuntu computers?


how should a server handle client actions? So I've just started trying to make a multiplayer pong game and I have read a lot of different ways to code the connections. However, I read somewhere that you should have the inputs sent to the server queue up and then the server just processes it at fixed intervals. However, if this is done, how does the server know, process, and send accurate data based on the time the action was sent? Because if the data is just queued up, if something happens like 100 ms after another but the server processes them at the same time, wouldn't that mess up the synchronization of the game? Should the server instead be coded to handle the client actions immediately even if it costs a lot of cpu etc in larger games?


Cocos2D v3 and Physics simulation on server I'm trying to develop a real time multiplayer game using Cococs2d v3. The game is basically a side scrolling racing game. I wanted to develop the client using Cococs2d for iPhone, and the server side using Java. I've read about real time networking and the difficulties I can encounter, but also how can I overcome it. The most helpful articles I read was Valve's, Glenn Fiedler's game networking article and Gabriel Gambetta's article on fast paced multiplayer games. I can attach links to those articles if anyone is interested ) I have come to the conclusion that the physics should be implemented both on the client side and the server side. Using cocos2d v3 this could be done without any problems on the client side, but how can I use the same physics simulation in my server written in Java? For example how could the server know if there's a hill the client player is climbing, or if there's an obstacle it need to collide with? The physics engine the client use is written in Objective C.. Am I missing something over here? If my question is not clear enough, please tell me and I will explain it in more details. Thanks in advance )


Handling different screen sizes in multiplayer games sorry if this has been asked already. I did some checking around and couldn't find any helpful advice. I'm developing my first multiplayer game, and it'll be fullscreen when run. My issue is, how do I balance for screen sizes? It seems to me that it might be considered unfair if some players can see more of the playing field than others, and it's not an issue I'd ever considered before since all my previous projects have been single player and usually fixed resolution. Some options I'd thought of is a zoomable map, so players can handle how much of the screen they see to give them the choice between clarity and view distance. Another was a fixed internal resolution and black bars or sidebars if it's out of the aspect ratio. Thanks in advance for any help.


How to sync a LineRenderer in a multiplayer game? After a lot of searching online, I have come here as a last resort for my problem. The question says it all. How to sync a LineRenderer? One answer I found was to use a ClientRpc. I tried it with no effect. Below is the snippet of my code, IEnumerator laserBeam() This is called through another method on the click of a button Beam GetComponent lt LineRenderer gt () Beam.SetVertexCount (2) Beam.material BeamMaterial Beam.SetWidth (0.07f, 0.07f) Beam.enabled true Beam.SetPosition (0, gameObject.transform.position) Beam.SetPosition (1, target.position) RpcDrawLines (gameObject, target.position, true) yield return new WaitForSeconds (1.0f) Beam.enabled false RpcDrawLines (gameObject, target.position, false) ClientRpc public void RpcDrawLines(GameObject start, Vector3 end, bool isOn) LineRenderer beam start.GetComponent lt LineRenderer gt () if (isOn) beam.SetVertexCount (2) beam.material BeamMaterial beam.SetWidth (0.07f, 0.07f) beam.enabled true beam.SetPosition (0, start.transform.position) beam.SetPosition (1, end) else beam.enabled false So, this is the code. Works fine on the Server but no effect in the client. I know I am doing something wrong in the client rpc. But I have no idea what it is. Any way of help would be appreciated. Thanks Note I am using UNET


What sort of data should be sent for mouse based movement in a multiplayer game? I'm new to the Multiplayer Rodeo here so please bear with me... I am just getting started and I'm trying to figure out how to deal with movement. I've looked at the question Best way to implement mouse based movement in MMOG which gives me a pretty good idea, but I'm still struggling with what kind of data should be sent to the server. If a player is on position x 0, y 0 and I click with the mouse on x 40, y 40 to start movement, what information should I send to the server? Should I calculate the position based on velocity on client side and just send the expected location? Or should I send current location and velocity and direction? When the server is updating the clients on the players' whereabouts, should the position be sent only, and the clients expected to interpolate predict movement, or can the direction sent from the client (instead of just coordinates) be used. My concern(or confusion) is regarding the ping lag frequency of data update and use of a predictive algorithm, as I'd like the movement to be smooth even with a high latency, and prevent ability to cheat(though that's not the top priority).


how did coordinate handling in old flightsimulators work? Im currently working on a combat flight simulator pure for own fun. Using a floating origin i thought the float inprecision was history, however this was the case untill i tried adding multiplayer to the game. The server is authorative and i'm banging my head around positioning the players on the server and handling the gun hits and collisions. Using sectors i reset the origin of the clients but the server keeps the original position. This will lead into float inprecisions on the server, thus physic and collision checking are terrible. Now i'm just wondering how games like Airwarrior, Warbirds and aceshigh overcame these problems. What approach did they use? I'm assuming something else. If only i was able to use double precision, or even fixed point, but i'm tied to a physics model working with floats. I don't feel like changing that around, unless i have no other option. Thanks for any pointers. stephan


Hobbyist game dev, want to create async multiplayer game. Are server costs manageable? I want to make the game I want to play, and that game happens to be an asynchronous multiplayer game. Think Hero Academy or Hearthstone, where there are 2 players and each submits moves to a central server. Alternatively (and not ideally), clients connect to each other and play is limited to a fixed window of connection, but still there needs to be a central server to acquire new opponents. That said, this is very much going to be a hobby type endeavor I'm just one guy after all. This is not going to commercially support itself. If I have 100 players ever, that would be fantastic. Given that I'm going to have to eat server costs myself, what are my options for getting a server? I don't need much bandwidth or CPU, due to the nature of async games only the sending of the gamestate current move, and perhaps some checking of legal moves. Going to Amazon or getting dedicated hosting seems drastically overkill for what I want. If it makes a difference, I'm intending to learn and use Unity for this.


Basic Connections Through Socket Server I'm designing a simple 2 player RTS with Stencyl, a program that uses blocks for coding. The current code updates lists whenever an actor moves (new X and Y), and I'd want the server to update the game state with each change to the list. However, to start off I don't even know how to set up a socket server. Stencyl has taught me the basics of logic, but I've yet to learn any programming languages. I've downloaded a Smartfox 2X socket server that I'm intending to use. Right now I'm only looking to make baby steps I want to do something to this effect "When someone connects to the server, open insert file here". How can I do this? My intention is to have this file be the game client. Is this "open file when connected" method the best way to go about this? When answering assume that I know nothing, because really, though I have done research (I know that UDP TCP for real time), implementation wise I know nothing.


Before multiplayer match setup I am implementing a before match setup in following way Users request a multiplayer match (click "New Game" button or similar) After enough users request the match connection is established Users are then moved into Select level view On that view, there is "Become Master" button, which an user can use to become Master The Master has ability to select level to play After clicking "Become Master" the users vote simple popup appears "Accept User X becoming Master?" If 50 agrees, user X becomes master. Master then selects level he wants. After 10 seconds, game starts all users are moved to In game view, to play selected level. Question I am wondering if I am not doing this too complicated? Shouldn't I randomly choose the master, or somehow make selection mechanism simpler?


How can I implement slow motion for one player in multiplayer? Special attacks in Mortal Kombat Mobile require slow motion i.e. delay in game play. On multiplayer mode, when the opponent uses special attacks, I don't observe any lag delay. When I use special attack, the game goes in slow motion mode for me, however I guess my opponent doesn't experience any delay. How is this possible? How can I implement something like this? Can my multiplayer mode still be real time when using a feature like this?


How to support more than 4 XInput controllers? I'm making a multiplayer game in GameMaker Studio 2. The game supports upto 12 controllers, where the first four are XInput controllers. The rest would be DirectInput. If I try playing with 8 Xbox controllers, only 4 of them are detected in the game, as expected. But, is there a way to get more than 4 Xbox controllers working?


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 offering a very good overview of the issues to consider. Glenn in his article and comments gives a very strong case for using UDP over TCP, but SC2 obviously uses TCP. To qoute Gleen, The problem with using TCP for games is that unlike web browsers, or email or most other applications, multiplayer games have a real time requirement on packet delivery. For many parts of your game, for example player input and character positions, it really doesn t matter what happened a second ago, you only care about the most recent data. So from his statement, I am guessing that his approach is to send the the full game state of every unit on each frame. If the server does not receive a player input on the current frame, then it's just back luck on that player. For God of War Acension, in which he is lead network dev, this should work quite well I guess. For SC2, due to it's replay capability, my gut feeling tells me that the underlying engine is a deterministic fixed timestep "user input playback machine", where the only data exchanged is player inputs. Hence Glenn's statement mybe completely irrelevant for SC2. Player input is important, and input sequence is even more important. I don't think it's feasible for SC2 sending game state of 200 units and more at 30 60 FPS. Question I could be wrong, but I have attempted to identify 2 possible types of data. What are other techniques? Will be good to qoute the game if you will. EDIT found this link about starcraft networking model


Property replication vs RPC Communication directions I have an UParticleSystemComponent attached to ACharacter. Its activation is controlled by user input, so it receives several updates per second. For replicating the activation state of the particle system, the user input triggers an update of the value of a replicated variable (UPROPERTY(Replicated)) on the ACharacter. This works fine for the direction Listen server Clients, however not for the directions Client Listen Server Client Client. I assume this is the case b c "Property updates only come from the server (i.e., the client will never send property updates to the server)". So for Client Client replication I have to rely on RPCs and can't use property replication at all?


Client side prediction on FPS game I've recently attempted to develop a simple client prediction for an FPS based on Gaffer on Games famous blog (http gafferongames.com game physics networked physics ). Now I've gotten to the point that everything works (more or less), my main problem is crossing the message sent from the server and finding the appropriate snapshot on the client. I can use the last average ping time to find a very near state, but it will never be exactly timed placed as on the server. So my question is how exactly can I sync and find the time stamp sent from the server to the client and find which snapshot is the correct one on the client?


Clientside anticheating in multiplayer game 1vs1 I'm developing a simple card game, where there will be a matchmaking system that will put you against another human player. This will be the only game mode available, a 1vs1 against another human, no AI. I want to prevent cheating as much as possible. I have already read a lot of similar questions here and I already know that I cannot trust the client and I have to make all verifications server side. I intend to have a server (need one for the matchmaking anyway) and I intend to make some verifications server side but if I want to check everything server side this makes my server to be able to keep track of the state of all current games and check every action, and I don't have the money infrastructure to support that server. My idea is to make clients check and verify some of the actions made by their opponent and if they find some illegal action notify the possible cheating to the server and make the server verify it. This will still require my server to keep track of all current games, but it will save resources only checking some things that cannot be checked at client side(like card order in the deck) and only checking other things when they are actually wrong. (only those they can check with out allowing themselves cheating! for example they can't check if the played card was in hand cos that will need them to know all cards in hand) Summing up, my questions are is this a viable approach? will I actually save resources doing this or the extra complexity in the server and client for exchanging this messages is not worth it? do you know any game that has successfully or unsuccessfully tried a similar approach? Thanks all for reading and answering


Multiplayer platformer I'm considering building a multiplayer game having a central server handling the game and keep clients updated. I was checking various examples of ".io" games styles of implementation and seems pretty straight forward that the logic is on server and clients are mostly dummy. Now the question that I have is .. how dummy should be the client? Where do you draw the line? To give more context, I was thinking of building a platformer with 2 players on it, a few obstacles on the way etc. What is clear for me is any input the characters receive needs to be sent to the server and updated the other client. any map event logic will stay on the server and update clients when happening What is not clear for me is where do you place basic physics? like keeping the character on the map how about a simple movement like Jumping? should it be like a state sent to the server? what about the whole map? should the server know the entire map? what if I want to destroy one tile of the map? I would appreciate your point of view or if you know some examples links where I can find more info about these things. Cheers!


Synchronizing "token" between players(multiplayer) I am implementing the multiplayer(client server architecture) of a game, and I came to doubt about entities common to players. I understand how to share information such as the position of the players among themselves. However I am caught up in the logic of how to do for the common entities between them. Imagine Two players and a chicken, how would you share the position of the chicken between them? because it needs to move, and can not move in different places in the two clients, the two clients should see the chicken in the local place, but if I send the position of the chicken of one client, and also the other, there may be conflicts. What should I do. Choose one of the clients to be the "master" who will send the chicken position to the other players? How do they handle this in online games? I am thinking of doing the following I can not imagine the calculations being done on the server working properly, I will use the example of the hens, my hens would have an AI maybe too complex to stay on the server. I thought the following, one of the clients of the update area, as it is a big map, the clients are receiving updates being in chunks of the map, then one of the clients would be the master (the first one that entered the channel) , the others would just listen to it, the "master" client would then send to the server the chicken positions states and the server would send to all the clients enrolled in the channel the chicken position status. It works similar to a "token" who is at the top of the channel users list is going to deal with the chicken's calculations. advantages Less work for the server to handle. Disadvantages Poorly trained players could change the position of the hen and make the game experience unpleasant. What could you do to avoid this disadvantage?


Is this specific server architecture okay for a multiplayer game? So I am making a game in Node.js HTML5. And I am really struggling to determine what an effective server architecture looks like? Right now I have a server for a multiplayer game ( I plan on making servers instanced, so up to 80 people per instance). So everybody in the instances location and health are shared. And when an attack happens, i.e. a meteor is dropped from the sky, the x value is the only data passed to the rest in the instance ( they all do the computations on their own computer locally). When you are hit, you tell the server you were hit. (can't tell the server to hit other people, only yourself, becuase otherwise it's exploitable). That's the kind of architecture I was going for, you can only tell the server about events that damage yourself. ( I don't believe these events are overridable but I will try to determine that). Do I have the right idea about how to go ahead with this server? Do you have any tips or resources? NOTE It's under MMO but servers will hopefully top off at about 80. MMO in the same sense as Realm of the Mad God. )


What is dead reckoning and how do you deal with it? I've come across this problem before and it would be good to know the different ways of solving this problem.


Cocos2D v3 and Physics simulation on server I'm trying to develop a real time multiplayer game using Cococs2d v3. The game is basically a side scrolling racing game. I wanted to develop the client using Cococs2d for iPhone, and the server side using Java. I've read about real time networking and the difficulties I can encounter, but also how can I overcome it. The most helpful articles I read was Valve's, Glenn Fiedler's game networking article and Gabriel Gambetta's article on fast paced multiplayer games. I can attach links to those articles if anyone is interested ) I have come to the conclusion that the physics should be implemented both on the client side and the server side. Using cocos2d v3 this could be done without any problems on the client side, but how can I use the same physics simulation in my server written in Java? For example how could the server know if there's a hill the client player is climbing, or if there's an obstacle it need to collide with? The physics engine the client use is written in Objective C.. Am I missing something over here? If my question is not clear enough, please tell me and I will explain it in more details. Thanks in advance )


Unreal Engine Third person example project and multiplayer I was fiddling around with multiplayer stuff in Unreal Engine. I looked into events that run only on server, multicasting events, replication of variables... But there is something that I dont quite understand When I load the Third Person example proyect, and enable more than one player, I can see the position and movements of the players being replicated on all clients. While I understand that the position and the rotation of the players being replicated successfully (since the replication option is enabled in the pawn's blueprint option), I don't really understand why the animations are being replicated. I don't see any reference in the blueprint making animations replicated over the network. Are pawn animations implicitly replicated on clients when replicating the actor's position? Am I missing some option configuration I'm missing?


What time to display in text messages in multiplayer game? Say I'm having a multiplayer RTS game. There's a main server for each individual game and several clients connected to it. All packets are sent to server first and then server retransmits them back to clients. Say Server is located in one time zone and all of the clients are in different time zones. ClientA send a text message in chat at 12 03, what times should be stamped for other clients? Should his message be uniformely timestamped by Server (12 02) or each client should timestamp the message whenever it is recieved (12 04, 16 04, 03 03, etc..). Bear in mind, that all the messages are to be in the same order on all clients, server takes care of that. So thats the question use local time for each client or use global server time to timestamp chat messages?


Do "write once run anywhere" engines require platform specific code for multiplayer? I've been investigating the myriad selection of mobile game dev engines that allow compilation of your code onto multiple target platforms, but, something I can't seem to figure out is if multi platform "write it once" development is possible when you bring multiplayer into the equation. I've looked at Unity and Monkey mostly, so far, but aside from seeing threads on the Monkey forum such as "I've developed such and such networking library for Monkey"... I can't find a definitive answer. That example is one of many that causes me concern. Is it the case that if you used a cross platform engine, you'd have to write platform specific code for the networking portion of your game app? (Even if the rest of the game did work on your target platforms with no minimal platform specific "jiggery". I'm not talking about cross platform multiplayer, but I do presume that'd be a happy by product of a write once deploy anywhere (within reason) networking solution.


Will Geolocations for IPs ever change? I'm making a game where the geographic location of a user is used to give them a little flag icon next to their user name. To do this, I've been using the ipstack API. However, the API only allows up to 10,000 requests per month, and since I make a request every time a user connects, this could easily lead to overuse. Would it make sense to just store geolocation data on my server and only make a request when an unknown IP connects? Or will the geolocation data ever change for an IP?


How can I implement multiplayer cloaking with visuals that resists client side hacking? I've been thinking about implementing stealth in a multiplayer game. It's a MOBA style game, so think League of Legends (LoL) and Heroes of the Storm (HotS). Multiple clients connect to a single server, which broadcasts the game state to all clients. Clients send their input data to the server, which might reject it when encountering invalid commands, thus rendering cheating impossible (well, in theory). Now, I mention these games on purpose because both implemented stealth differently. LoL has stealth with two possible states you're either completely visible or completely invisible. HotS on the other hand, implements stealth in such a way that you can tell by a shimmer in the air I think this is a neat mechanic, as it promotes rewards paying attention to your surroundings. However, this being a multiplayer game made me realize that this might prove easily exploitable. When you implement stealth in 'the LoL' way, you can simply stop sending player coordinates to the other clients. When the player's character breaks stealth, the server can broadcast the location again. However, with the HotS model, a shimmer can be seen in the air where the character is moving about. This means that the server must be sending the player's location to the other clients. Which means that players that change the texture or model or even the game code itself could render the cloak mechanic useless. Here is a thread on the HotS boards about it. My question is whether there is some way to implement cloaking (with a 'shimmer', la HotS), without having the issue that crafty players can modify the game (data) and 'beat the system'. Is this possible, and if not, how do other multiplayer games with this mechanic deal with this? Is only the LoL style of invisibility uncheatable? I thought about having the server send bogus 'cloak' locations every now and then, but this also harms fair players that are just paying attention, so that won't do.


Efficient solution for multiplayer space partioning? This question is a little tricky, but I will try to make it clear. Lets say I am building an online game (not MMO scale), but that supports as many players as possible, in a authoritative server approach. I want really big worlds with lots of AI simulated enemies. I am aware of a few strategies to save server CPU by subdividing the space and not processing what doesn't need processing. I have already split the world by regions, that will require loading times and small transitions, which I think is important to maintain the quality of gameplay when playing locally (alone or even with a couple of friends). I don't expect the players to be in more than one or two regions. The problem is that a region can become pretty big, and have a lot of NPCs simulating at once. How do I handle this without affecting the players' experience? Approaches like one server per region and alike are not in the table. I am mainly looking for data structures to hold hordes of enemies, and even peaceful NPCs. To finalize the question, please note that vehicles exist, therefore its considerably fast to travel within a region, influencing the "when" to cull areas.


What are the pros and cons of non unique display names? I know of at least big title game (Starcraft II) that doesn't require unique display names, so it would seem like it can work in at least some circumstance. Under what situations does allowing non unique display names work well? When does it not work well? Does it come down to whether or not impersonation of someone else is a problem? The reasons I believe it works for Starcraft II is that there isn't any kind of in game trading of virtual goods and other than "for kicks" there isn't much incentive to impersonate someone else in the game. There's also ladder rankings so even trying to impersonate a pro is easily detectable unless you're on a similar skill level. What are some other cases where it makes sense to specifically allow or disallow duplicate display names?


In a multiplayer game, should everything that is not user input be done server side to prevent cheating? I've heard this said before, but it seems somewhat unrealistic. These are the two scenarios I'm working with User Presses move key, moves themselves, and tells the server server tells other clients or User presses move key, and tells the server server calculates if the user is allowed to move there server tells all clients It seems like option one would make the users movements feel very floaty and delayed. Do most multiplayer games use a combination? (user moves itself, gets confirmation from the server, and moves itself back if it was an illegal move.) Maybe it's a non issue and I'm overthinking it.


Best way to go for simple online multi player games? I want to create a trivia game for my website. The graphic design does not have to be too fancy, probably no more advanced than a typical flash game. It needs to be secure because I want users to be able to play for real money. It also needs to run fast so users don't spend their time frustrated with game freezing. Compatibility, as with almost all online products, is key because of the large target market. I am most acquainted with Java programming, but I don't want to do it in Java if there is something much better. I am assuming I will have to utilize a variety of different languages in order for everything to come together. If someone could point out the main structure of everything so I could get a good start that would be great! Language choice for simple secure online multiplayer games? Perhaps use a database like MySQL, stored on a secure server for the trivia questions? Free educational resources and even simpler projects to practice? Any ideas or suggestions would be helpful...


PHP Browser Game Private Messages? First off, I'm asking this question here because gaming and messaging are intimately connected. Why win if you can't gloat? Nevertheless, I won't be offended if this needs to be moved to overflow. I need a PM system for my browser game, which already has a user and authentication system (To clarify the game already has a user system). Specifically, I'm wondering if a PHP library already exists that I can use to save some time. Better yet, if anyone knows of a nice Codeigniter library for messaging, that would be perfect. I already have a good idea on how I would approach this if I have to write my own, but it seems like something that would already exist in a robust form (despite my failed Google searches). Requirements Messages can be sent to individuals, multiple users, and guild mates (which is essentially just multiple users with server side selecting who to target). Users can reply to individual or all recipients Messages appear in sender's outbox and receiver's inbox. Utilizes some 2 table design to handle marking read deleting messages on a user by user basis Messages are semi threaded. I.e. I won't necessarily have them appear in the GUI as threaded, but previous messages should be included at the bottom of a reply. Maybe better to say, previous messages are identifiable and accessible. (This, I'm not yet 100 sure how I would design if I write my own. I.E. whether to include the text of the previous message into the new message or somehow remember the previous message's database ID to link later) Technology in Use PHP, Codeigniter, Javascript, JQuery, Ajax, Sqlite Note I have seen that there are some similar questions on overflow, but they were very little help in the answer department. Otherwise, people were looking for either chat boxes or more umm.. like social media site threads, which I find a bit different than something you would find in a game.


Handling increasing numbers of users (server) For this post, we'll assume my game is multiplayer chess as it essentially requires the same functions. User logs in to the server and requests a game the server provides a simple matching service and once done, they start the game. They get 30 seconds timed by the server per turn with 6 players in each game and however many spectators (probably very limited). I would like to know how you would scale this. I've considered two options Option 1 1) Main server to handle login match making (which regardless of user numbers should be a fairly easy task) 2) Start new Node servers for each game that close when the game ends. I'm not entirely sure how this could be implemented yet. (i.e. would the user connect to the main server still and the requests just be passed to the new server or would the user change connection to the new server and then back again when done? changing connection would reduce the load even further and as the two servers won't require communication between them, should be fairly simple) Option 2 Have 1 Node server and somehow scale it. Suggestions input? I'm planning on hosting on Amazon AWS and am well aware that the chances of my game even warranting this level of detail are probably nil but I'm taking this as a learning opportunity. Thanks.


How can I reverse engineer an old MMO? I want to revive an old MMO. Only the old client exists from the game, so I would have to write a whole server for it. I'm not sure how to start editing things in the already made client. Most likely I will need catch requests and somehow change those to my own. How do I go about actually working editing that client? What should I use, having only .dlls on some other already compiled files?


Property replication vs RPC Communication directions I have an UParticleSystemComponent attached to ACharacter. Its activation is controlled by user input, so it receives several updates per second. For replicating the activation state of the particle system, the user input triggers an update of the value of a replicated variable (UPROPERTY(Replicated)) on the ACharacter. This works fine for the direction Listen server Clients, however not for the directions Client Listen Server Client Client. I assume this is the case b c "Property updates only come from the server (i.e., the client will never send property updates to the server)". So for Client Client replication I have to rely on RPCs and can't use property replication at all?


Implementing single and muliplayer without messing everything up 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 a clever programming pattern I can't find for this situation? Let's make a simple example of my problem. Let's say I want to make a pong clone with single and online multiplayer, how should I go about this? Make separate classes for both modes? I read somewhere that the MVC pattern might be a good choice in this case but I'm not sure how to implement it correctly. Should I create a Player data class and then multiple controller classes for example PlayerControllerSingleplayer, AIController, PlayerControllerMultiplayerSelf, PlayerControllerMultiplayerOpponent. And then a PlayerRenderer view class? I've read some articles about mvc previously but still don't know really much about it or how to do it correctly in my case. I will be using libgdx and probably kryonet for the networking if that might be important. Thanks for every piece of advice in advance!


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? Which are the pros and the cons or are there any reasons why I shouldn't do that?


The tolareable lag range in a multiplayer game I am programming a multiplayer game. I calculate the ping in ms as ping the time i recieved pong the time i sent ping I implemented client side prediction and interpolation algorithms. When I test the game with my friends, it works quite fine for those who have a ping under 100ms, but after 120ms it becomes unplayable as they have told me. So my question is wheter I should try to improve the client's game experience under a latency more than 120 ms or not ( is a lag 120ms considered tolerable ? ) Thank you all ! NOTE My game is a fast paced game so the lag compensation matters.


realtime multiplayer game database design I'm creating a real time client server game, where each match is a 1v1. I'm a little lost as how to implement this. I want it to be viable for 1,000 simultaneous matches, but as I'm expecting around 100 db entries per match (I need to log players' past states), that would be a 100k row table. I don't know if I should use an RDBMS that indexes the table by match ID, and if that would be fast enough. I'm also contemplating using plain files with my own extension for each match, but that would be 1,000 of them on my machine, and I don't know if that would be too slow. If anyone has any suggestions on how I can implement this, I'd really appreciate it.


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 can files be used to keep track of players positions?


Is it possible to control the difficulty of a multiplayer game? I'm developing a multiplayer game, played between 2 players. But in these types of games, there can only be 1 winner and 1 loser for per match. So for each player who wins, another player had to lose. This means that roughly 50 of all players in the game are having a bad time (losing more than they win). In a single player game, it's easy to solve the problem of "50 of players lose more than they win." You just make the game easier to beat (reduce difficulty). Unfortunately, you can't do this with a multiplayer game, since players' opponents are other players. I don't know if there's a way to control the difficulty of a multiplayer game, but is this even possible?


Input and output of a server side game using web sockets I am having a look at redeveloping an old flash based top down zombie shooter game I made in highschool so that it supports multiplayer using socket.io. My experience over the last 5 years has been mostly writing server side code, so writing the game logic itself on the server isn't a huge concern. The places I am having trouble with due to my very limited experience with sockets specifically is What the most appropriate input and output should be to and from the server in a game context. How much data is appropriate to send. Off the top of my head, I imagine the process would look something like The server runs the game (using NodeJS). Clients that connect send their input to the server (key presses, clicks, etc). Those inputs are queued against the client ID on the server and interpreted to move their character or whatever it does. The server sends back the updated position of the client as well as everything else around the client in the "world". The last point is where I have the most doubts. Assuming a reasonable collection of objects in the world, I am not confident that sending through the position of everything every 30ms to every client would be sustainable (though I really don't know what is sustainable with web sockets). Then again, maybe it actually is perfectly fine to do this. Obviously I can limit the amount of objects by only sending ones who have actually been updated (so static objects would never come through, etc) but I am not sure whether that is necessary at all or whether that is something extremely crucial. I also don't see this working if we implemented something like everyone being able to fire 100s of projectiles (or some other massive collection of constantly updating objects). Are there any general guidelines or common knowledge around how much data you would expect to see come through a web socket and how frequently? Am I way off the mark or would this work okay for a moderate amount of clients? I realize this all sounds very broad so to try tighten it up a bit I am specifically interested in how much data is realistic to send through web sockets and how frequently. Any auxiliary information based on the above is a great addition.


What is the best time to implement Multiplayer system? I have been starting a new online multiplayer game project this week and as the title says Is it better to implement the Multiplayer feature right away, or is it ok to implement it when the game already has some other stuff, like maps and physics?


How can I make actions that effect the position of another player appear responsive when my game server is authoritative? You are playing as Lucio in Overwatch. You boop another player and they immediately get booped away. It feels really responsive. But the server hasn't actually registered the boop yet. By the time your command reaches the server, that player might be in a different location and the result of your boop might be completely different. If we needed to wait for a server confirmation, we wouldn't see our boop for, say, 200ms. (assuming 200ms RTT.) You are driving around in PUBG and see another player. You drive your car in to a player who is running around on foot. They appear to immediately die or at least get bumped away by the impact. You hit the player where you saw him but he is actually somewhere else on the server (you may have actually missed him!). If our game does not respond immediately, we would see the other player clip in to your car as they continue running, then, say, 200ms later they would die or get knocked around (again assuming a RTT of 200ms) How are situations like these resolved? It seems like the result is simulated locally (prediction) but the outcomes could be so drastic that an incorrect prediction could result in a lot of confusion. (Running over a player who isn't actually in your way, booping a player to your left off a cliff, but they are actually in front of you and won't fall down the cliff)


Turn based multiplayer animate moves from last turn I'm trying to make a 2 player turn based strategy game, using the Google Play Games APIs According to the documentation, As a match progresses, the current player can modify and store the game data on Google's servers. The other participants can then retrieve and update this data on their turn. What this seems to be saying (sorry if I'm completely misinterpreting this I've never played with the Play Games APIs before) is that, since each turn is just updating the game state data on the server, a round could look something like this Unit A is on Square 1, Unit B is on Square 3 P1's turn Player 1 moves Unit A to Square 2 P1's turn Player 1 kills Unit B with Unit A P2's turn When Player 2 looks at the game, it shows Unit A on Square 2, and no Unit B What I want is for both players to see the animation when Unit A moves, rather than Player 2 just seeing the new state and not the transition Unit A is on Square 1, Unit B is on Square 3 P1's turn Player 1 moves Unit A to Square 2 P1's turn Player 1 kills Unit B with Unit A P2's turn When Player 2 looks at the game, it shows Unit A on Square 1 and Unit B on Square 3, then animates Unit A moving to Square 2 and killing Unit B So basically each player gets a replay of the action from their opponent's turn before taking their turn. I know it could be possible to do something like this by looking at the differences in position of a unit between turns, then animating the change this, however, breaks down when you have something like an attack, where all you know is a unit was destroyed and wouldn't necessarily be able to infer which unit attacked and should be animated. How would I go about implementing something like this?


Connecting players in an Online TCG I've been developing single player games for a while now and I have decided to start working on a online PC(and maybe mobile) TCG. The design is almost complete and I can cover most of the code as far as single player goes. My question is Do I have to implement some sort of server client model in order to make it possible for two player to get in a match together?


Achieving smooth movement curves correct collision detection with a google app realtime multiplayer game server I'm an hobbist game developer. I'm trying to make a clone of a game like this http superhex.io to experiment with multiplayer online. First of all I'm not sure if there is a better way to implement server client comunication. So far I have implemented a server which updates the game state every 0.5 seconds and sends the information to all the clients. You can try my current prototype here https hexpose.appspot.com With respect to local development where the 0.5 seconds rounds are very regular, playing on the public server you see that the pace is not regular... I think this is due to a variable latency in server client comunication. Suppose I have many players moving on an arena like in this game. The superhex original gameplay is very fluid, you see enemies move on smooth curves. How this can be achieved? The position of enemies is known later (because of client server client latency) than the position of my player. But collision are anyway correctly detected. Is it just a matter of very slow latency and good server infrastructure or it depends on game logic implementation?


object position handling for multiplayer a game I am creating a multiplayer HTML game which focuses on manipulating planet trajectories with gravity points. I am creating bunch of planets with random initial velocity and random direction and i am sharing info about this planets to a server. Though i am keeping track of every planets position on server, i am not sharing this values every second to each player. My idea is that if i only share planets position whenever a new player joins then from that point onward clients should be able to calculate new position of planet every second because directions and speed of the planets will be same for all players. This idea works for screens with same resolutions and aspect ratio but it fails for other cases. can anyone suggest other idea for keeping track of planets position for screen with resolutions? This game is multiplayer so i need something that will allow me to provide same scene to every player.


Is It Possible To Make Matchmaking System Without Server? I want to make a matchmaking system without a server, but I don't know much about matchmaking. First, let me list what I want to do Cheating is not important in the game, so that the architecture will be listen server. (One of the clients in the lobby will be host.) The players will be connected to each other by sending invitations. I will not list any lobbies in the game. All the data in the game will be sent via RPC functions. (I have already coded this.) The game will be published on mobile platforms. I wonder if I can connect 2 players to each other in the game without a server. Is that possible? Can I make this kind of system by using a library like socket.io?


Testing Multiplayer Browser Game on Single Computer I am writing a multiplay browser based game and am running into an issue with playtesting simple interactions. When a browser window loses focus is stops running requestAnimationFrame calls. This effectively pauses the state all visuals when focus is lost. I would like to have two instances of the game running at the same time. I could playtest in one window and observe how a thirdparty would see those actions in another window. Right now I am only able to toggle between the two windows and see teleportation like behavior as the client state catches up to the new server state. I am not sure how, without setting up a second computer, I might test this. Anyone have any experience with this or any advice?


Transmit map vs Transmit seed Given a map created with procedural generation algorithms, should the server transmit the seed used to generate this map (so client must contain the same algorithm) or maybe send all the information?. I'm inclined to send the seed, i have in mind generating big maps. Right now, i have one seed to generate multiples seeds, and each one is used to generate a chunk, so this last seed would be transmited to each client everytime someone needs information about a new chunk.


How can I make permanent death in a MUD seem acceptable and fair to players? I have considered writing a MUD for years, and I have a lot of ideas my friends think are really cool (and that's how I'd hope to get anywhere word of mouth). Thing is, there's one thing I have always wanted, that my friends and strangers hated permanent death. Now, the emotional response I get to this is visceral revulsion, every time. I'm pretty sure I am the only person that wants this, or if I'm not, I'm a tiny minority. Now, the reason I want it is because I want the actions of the players to matter. Unlike a lot of other MUDs, which have a set of static city states and social institutions etc, I want the things my players do, should I get any, to actually change the situation. And that includes killing people. If you kill someone, you didn't send them to time out, you killed them. What happens when you kill people? They go away. They don't come back in half an hour to smack talk you some more. They're gone. Forever. By making death non permanent, you make death not matter. It would be similar if a climax to a character's arc is getting a speeding ticket. It cheapens it. Non permanent death cheapens death. How can I 1) Convince my players (and random people!) that this is actually a good idea?, or 2) Find some other way to make death and violence matter as much as it does in real life (except within the game, of course) sans character deletion? What alternatives are there out there?


Hobbyist game dev, want to create async multiplayer game. Are server costs manageable? I want to make the game I want to play, and that game happens to be an asynchronous multiplayer game. Think Hero Academy or Hearthstone, where there are 2 players and each submits moves to a central server. Alternatively (and not ideally), clients connect to each other and play is limited to a fixed window of connection, but still there needs to be a central server to acquire new opponents. That said, this is very much going to be a hobby type endeavor I'm just one guy after all. This is not going to commercially support itself. If I have 100 players ever, that would be fantastic. Given that I'm going to have to eat server costs myself, what are my options for getting a server? I don't need much bandwidth or CPU, due to the nature of async games only the sending of the gamestate current move, and perhaps some checking of legal moves. Going to Amazon or getting dedicated hosting seems drastically overkill for what I want. If it makes a difference, I'm intending to learn and use Unity for this.


Handling different version clients in a multiplayer game What are various ways of handling different version clients in multiplayer games? For example, when there's an update, some games allow you to play with people who have a different version of the client. How is this handled?


How would I balance a multiplayer competitive game I'm looking at my first foray into developing a game, and would love to know whether you guys have any thoughts on game balancing on limited multiplayer games. The game I have in mind involves a neutral player that has to achieve a goal, with two supporting "deity" players who are one of 'good' and 'evil' One of the deity players would try to help the player achieve their goal, while the other would try to thwart them. Any thoughts or pointers on how I can ensure the deities are balanced? If you want me to expand, I will, just didn't want to give away too much of the game play before I finish it.


Multiplayer and creeps (NPC enemies) how to compute bullet hits given the lag? We are making a multiplayer co op game, where players will shoot not each other but AI enemies (creeps), controlled by the game. The chosen implementation is client server with an authoritative server. Edit we use client side prediction for both creeps and avatats to give the illusion of immediate responses. So far we managed to make creeps movement syncronized on the client and the server, that is at the same point in time each and every creep are located in the very same place on the client and on the server. However, the player avatars cannot be syncronized in this way it is simply impossible. Player avatar will always lag on the server. Now the problem arises when we try to shoot and hit the creeps. The two avatars (client and server ones) will fire bullets in different places (because one lags from another), but the creeps positions are equal. Bullets hit almost instantly, which means that quite often the bullets will not hit the creeps on one of the machines and, as the server is authoritative, it will have the final say in what actually happened. Ofcourse such behaviour is unacceptable. One solution would be to force creeps to lag on the server, but that is a poor solution as the lag (ping) may vary dynamically and, more importantly, the game is designed to allow for up to 4 player multiplayer mode and I cannot even start to think, how to fit this solution to other players' bullets. The only thing I could find so far on the internet is the fact that in FPS multiplayer shooters you see your opponent in the past and the server "rewinds" each of you before hit scanning. But how do you exacly implement this? Do you keep the list of recent positions actions on the server? But what if hit scanning involves taking skeletal animation into account? Do you store recently played animations aswell? Any advice would be appreciated.


Ensure packet owner from connection is the authentic user In a multiplayer game, how can you be sure that the IP from a packet is the real IP? By spoofing I could send, for example, a "suicide packet" which tells the server that the owner of said packet wants to destroy its avatar when in reality I faked it. Do games just give up on this aspect?


How important is online multiplayer? I am making a small game that has four players. It can be played with 1 or 2 players locally, with the remaining players controlled by AI. I am considering online play, but it is an area I know very little about, so it will take a lot of study and work to put it in. I am using my own engine, so I would have to implement it myself, or at least search around for a free library, learn its API, and probably rearrange several of my data structures and methods to make it work. Then I would have to implement lobby screens and possibly backend stuff (I have a little php experience but not a lot). My question is, is it really worth it? Of course it would be nice to have, but do players expect it these days? I imagine people expect it for big budget games, but how about small indie games?


Sever side physics simulation and client 'inputs' send rate in a fast multiplayer game I am building a very tiny first person multiplayer game. I'm just aiming to get the basic rights client side prediction and reconciliation entity interpolation. I have read many articles on these topics but I have a question that I can't find answer for. Consider the following problem There's a queue on the server where the client inputs are stored (movement keys camera vectors) Server runs the physics simulation 60 times per second. This means that each input from a client will be simulated for 16.6 ms. Now, consider that I have two clients one with a beefy computer able to run the game loop 100 times per second, and a slower one that is only able to run it 30 times per second. My game will send the 'client inputs' packet to the server on every iteration of the game loop. This means that the 100 fps client will send 100 packets, while the 30 fps client only 30. What this means is that the fast client will get more simulation time on the server, since each input is simulated for 16ms. So the fast client will move significantly more than the slower client. What is the appropriate way to design the 'client input' packet send rate? What is a solution that ensures that fast clients and slow clients receive an equal or roughly equal amount of simulation time? Thanks for your time!


Will Geolocations for IPs ever change? I'm making a game where the geographic location of a user is used to give them a little flag icon next to their user name. To do this, I've been using the ipstack API. However, the API only allows up to 10,000 requests per month, and since I make a request every time a user connects, this could easily lead to overuse. Would it make sense to just store geolocation data on my server and only make a request when an unknown IP connects? Or will the geolocation data ever change for an IP?


Better ways of handling the server for a Multiplayer Browser Based Game I am looking to create a multiplayer browser based game, similar to tribal wars and such, and i'm trying to think of better ways of handling the server, for example when troops and buildings are completed and the landing of troop movements


UDP sending important data often Should I use a reliable send or unreliable with resend? I'm making a multiplayer RPG. My problem is that I send player data very often (100 ms), that contains Position (float x, y, z) Radius (float angle) Animation (int16 t id) And because the package is unreliable, sometimes packets are lost and here the problem starts. The packet is only sent if something changes, like animation but animation is important, they must arrive to the clients. So the question is, should I change reliability to reliable? Or just split packet into two? Or simply resend packet?


Why do console versions of multiplayer games support fewer players than PC versions? source http answers.yahoo.com question index?qid 20111205162848AAb1sl9 64 Players on P.C ( 32vs32) amp bigger maps with more vehicles amp buildings. 24 on Consoles ( 12vs12) ( It was planned to have a 32 player limit, but was later reduced to 24). Why does the console version have a maximum of 24 players? Is it hardware related? One of the reason was that players can host games themselves. If thats true its very sad that you cannot play 32x32, because one or two guys want to host games.


Client side prediction on FPS game I've recently attempted to develop a simple client prediction for an FPS based on Gaffer on Games famous blog (http gafferongames.com game physics networked physics ). Now I've gotten to the point that everything works (more or less), my main problem is crossing the message sent from the server and finding the appropriate snapshot on the client. I can use the last average ping time to find a very near state, but it will never be exactly timed placed as on the server. So my question is how exactly can I sync and find the time stamp sent from the server to the client and find which snapshot is the correct one on the client?


What sort of data should be sent for mouse based movement in a multiplayer game? I'm new to the Multiplayer Rodeo here so please bear with me... I am just getting started and I'm trying to figure out how to deal with movement. I've looked at the question Best way to implement mouse based movement in MMOG which gives me a pretty good idea, but I'm still struggling with what kind of data should be sent to the server. If a player is on position x 0, y 0 and I click with the mouse on x 40, y 40 to start movement, what information should I send to the server? Should I calculate the position based on velocity on client side and just send the expected location? Or should I send current location and velocity and direction? When the server is updating the clients on the players' whereabouts, should the position be sent only, and the clients expected to interpolate predict movement, or can the direction sent from the client (instead of just coordinates) be used. My concern(or confusion) is regarding the ping lag frequency of data update and use of a predictive algorithm, as I'd like the movement to be smooth even with a high latency, and prevent ability to cheat(though that's not the top priority).


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 broadcast address. This has the disadvantage of being filtered sometimes by routers or switches in different network environments. Attempt to connect to a server on every IP in your subnet. This has the disadvantage of being slow (Especially if the network uses 10.XXX.XXX.XXX for their IPs) and a mini ddos attack, but isn't going to be filtered. How do games do this especially in other network environments?


Basic Connections Through Socket Server I'm designing a simple 2 player RTS with Stencyl, a program that uses blocks for coding. The current code updates lists whenever an actor moves (new X and Y), and I'd want the server to update the game state with each change to the list. However, to start off I don't even know how to set up a socket server. Stencyl has taught me the basics of logic, but I've yet to learn any programming languages. I've downloaded a Smartfox 2X socket server that I'm intending to use. Right now I'm only looking to make baby steps I want to do something to this effect "When someone connects to the server, open insert file here". How can I do this? My intention is to have this file be the game client. Is this "open file when connected" method the best way to go about this? When answering assume that I know nothing, because really, though I have done research (I know that UDP TCP for real time), implementation wise I know nothing.


Can various browsers be assumed to maintain predictible state accurately in multiplayer online gaming? With many games it is said that server will assume that clients keep track of the world accurately. Assuming this is true, for a browser based multiplier space invaders game you would only tell the client when new bullets or the players ship moves and everything that behaves in a predetermined manner in the js client. It would be expected that positions would be the same in the browsers. Do you think you could trust browsers to do this? I feel that timings could differ between rendering loops and cause positions to get out of sync and might just get the server to maintain all the positions to make sure.


Efficient solution for multiplayer space partioning? This question is a little tricky, but I will try to make it clear. Lets say I am building an online game (not MMO scale), but that supports as many players as possible, in a authoritative server approach. I want really big worlds with lots of AI simulated enemies. I am aware of a few strategies to save server CPU by subdividing the space and not processing what doesn't need processing. I have already split the world by regions, that will require loading times and small transitions, which I think is important to maintain the quality of gameplay when playing locally (alone or even with a couple of friends). I don't expect the players to be in more than one or two regions. The problem is that a region can become pretty big, and have a lot of NPCs simulating at once. How do I handle this without affecting the players' experience? Approaches like one server per region and alike are not in the table. I am mainly looking for data structures to hold hordes of enemies, and even peaceful NPCs. To finalize the question, please note that vehicles exist, therefore its considerably fast to travel within a region, influencing the "when" to cull areas.


client server Silverlight turn based game domain model question I am making multiplayer (2 players) Minesweeper like the one that's available on MS Live Messenger. Client side is going to be silverlight, server side will be MVC Application. Client (the one who is waiting for his turn) will poll server every X seconds to get current state, the other client (who's turn it is will post his click to server and than roles will reverse) Now my question is should domain model classes be the same for client and server side? I mean you need Minefield class on both sides, but while server side class will have rules and logic, client side will be more or less a data holder.


How come serverless functions are so much more expensive than a VPS hosting my PHP API? I'm working on an online turn based game. I will have a server, but it will be used strictly for storing match data and relaying it to the match's participants (or spectators). For simplicity, no game logic will be processed in the server and the participants will be the ones to decide the legality of the enemy's moves etc. My backend cloud knowledge is limited. I can work fine with PHP and MySQL, so I can technically make a PHP API, host it, and have the players poll it via HTTP requests every few seconds to get updates on the match (or upload commands). The PHP script will always open a MySQL connection, do one or two small queries and return a tiny bit of JSON formatted data. To summarize, I believe that a single request would take at most 2 seconds to complete, and the output will be usually less than 100 bytes. Given this fact, I figured I could perhaps try one of those serverless cloud functions services, like Azure's. It sounds just perfect for my kind of scenario. For this project, I am estimating at most 100 users playing a match at any given time. And given the way the game is designed, they should probably poll data every two seconds. So 100 30 24 60 30 130M executions per month. With Azure, that could be around 540 monthly just to support about 100 players. This got me thinking, what if I just host the PHP API and MySQL database in a normal VPS, like GoDaddy's perhaps? Their cheapest option is about 50 a month. They don't meter the number of requests, concurrent users or bandwidth used (my usage is pretty low anyway, less than 15GB monthly). So my question is, how come a 'serverless function' service is massively more expensive than just using a normal VPS to host my PHP API? Is there a catch that I may be missing? Naturally it's all about testing I should try both of them, but I figured someone has been through this already, or perhaps there is something obvious I am missing.


How can I implement multiplayer cloaking with visuals that resists client side hacking? I've been thinking about implementing stealth in a multiplayer game. It's a MOBA style game, so think League of Legends (LoL) and Heroes of the Storm (HotS). Multiple clients connect to a single server, which broadcasts the game state to all clients. Clients send their input data to the server, which might reject it when encountering invalid commands, thus rendering cheating impossible (well, in theory). Now, I mention these games on purpose because both implemented stealth differently. LoL has stealth with two possible states you're either completely visible or completely invisible. HotS on the other hand, implements stealth in such a way that you can tell by a shimmer in the air I think this is a neat mechanic, as it promotes rewards paying attention to your surroundings. However, this being a multiplayer game made me realize that this might prove easily exploitable. When you implement stealth in 'the LoL' way, you can simply stop sending player coordinates to the other clients. When the player's character breaks stealth, the server can broadcast the location again. However, with the HotS model, a shimmer can be seen in the air where the character is moving about. This means that the server must be sending the player's location to the other clients. Which means that players that change the texture or model or even the game code itself could render the cloak mechanic useless. Here is a thread on the HotS boards about it. My question is whether there is some way to implement cloaking (with a 'shimmer', la HotS), without having the issue that crafty players can modify the game (data) and 'beat the system'. Is this possible, and if not, how do other multiplayer games with this mechanic deal with this? Is only the LoL style of invisibility uncheatable? I thought about having the server send bogus 'cloak' locations every now and then, but this also harms fair players that are just paying attention, so that won't do.


Is 50KBs of bandwidth practical for players? For my client server lockstep 16 player RTS game, I've calculated the maximum bandwidth usage per second to be 50KBs for hosting a game (though this value is closer to 20KBs practically). 90 of this bandwidth usage is due to sending out packets and the rest, incoming packets. To cut down on costs, I'd like to have players host games and official servers function in the background as backups (in case the player host drops). Is it reasonable to expect 1 in every 16 players is able to handle this bandwidth demand? Note The game will be on PC.


How can I reverse engineer an old MMO? I want to revive an old MMO. Only the old client exists from the game, so I would have to write a whole server for it. I'm not sure how to start editing things in the already made client. Most likely I will need catch requests and somehow change those to my own. How do I go about actually working editing that client? What should I use, having only .dlls on some other already compiled files?


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 should know that it falls into the strategy and simulation genre. That means No running around with characters or similar but only atomic actions (regarding client server communication) like "build thing A on location X". At one point I realized there is a huge problem having a browser based front end relying on a REST API back end makes it a more than excellent target for bots. While automation is desireable for business it is poison to a game which is about fun. I experienced it first hand in a browser game in the past were the most successful players were bots which subdued everybody. From my current point of view I do not see any possibility to protect against bots when building a multiplayer online game based on a REST API. Exception Making it open source so everybody can host his own instance for private groups or even just oneself (to not get annoyed by jerks with bots). Is there any way to differenciate between an honest player who just set an alarm for the next possible action and a bot automatically taking every chance on appearance of it? Besides such show stoppers like captchas. If not, I would think about another technology stack which makes it at least much harder to mess with client server communication (proprietary encrypted binary protocol in a native code client). Edit Thank you, your answers are inspiring but also made me realize that specific countermeasures cannot be made by going further into details of the game. However, that would be too much for a question on Stack Exchange. So I just want to point out the most important points Players are exploring, developing and managing whenever they want to. Their businesses still run fine when they are offline (it is a peaceful game, no weapons involved). Only expansion and progress need the players action. Those actions are limited by time is one of the key resources (like in EVE Online skill training). All processes in game require it. There is no point in being online 24 7. The average player should be successful already with spending not more than an hour every day in one or two sessions (roughly, the concept is still in development).


Achieving smooth movement curves correct collision detection with a google app realtime multiplayer game server I'm an hobbist game developer. I'm trying to make a clone of a game like this http superhex.io to experiment with multiplayer online. First of all I'm not sure if there is a better way to implement server client comunication. So far I have implemented a server which updates the game state every 0.5 seconds and sends the information to all the clients. You can try my current prototype here https hexpose.appspot.com With respect to local development where the 0.5 seconds rounds are very regular, playing on the public server you see that the pace is not regular... I think this is due to a variable latency in server client comunication. Suppose I have many players moving on an arena like in this game. The superhex original gameplay is very fluid, you see enemies move on smooth curves. How this can be achieved? The position of enemies is known later (because of client server client latency) than the position of my player. But collision are anyway correctly detected. Is it just a matter of very slow latency and good server infrastructure or it depends on game logic implementation?


HTML5 multi player game data event validation best practices I'll start by saying that I am fully aware that this question might seem subjective at first, but I'll try and provide a specific test case scenario for it to be a clear question about validating the data received from 2 multiplayer game clients. Scenario Imagine we have a multi player Tower Defense (TD) game. And let's assume that the game is built using HTML5 Canvas, Javascript and a multi threaded web server, for example, Tornado running in the back end. And in this scenario both of the players have an option to place a turret anywhere they want. After a turret is placed, a bunch of enemies are released from both sides and move in a straight line towards the other side. As soon as an enemy reaches turret range, we can assume that it is destroyed in 1 5 shots. If it takes more than that, the enemy safely passes to the other side. Now, my problem lies in the fact that usually I would do all the validation server side, but it becomes increasingly difficult to do, because I would need to simulate every step of the game. Instead, I would like to depend on the event data (enemy destroyed enemy gets safe passage) received from both clients. Question The main question then is this What is the best and hopefully easiest way to implement these sorts of checks and would there be anything prohibiting me from continuing with the development using HTML5, Canvas and Javascript?


Synchronizing "token" between players(multiplayer) I am implementing the multiplayer(client server architecture) of a game, and I came to doubt about entities common to players. I understand how to share information such as the position of the players among themselves. However I am caught up in the logic of how to do for the common entities between them. Imagine Two players and a chicken, how would you share the position of the chicken between them? because it needs to move, and can not move in different places in the two clients, the two clients should see the chicken in the local place, but if I send the position of the chicken of one client, and also the other, there may be conflicts. What should I do. Choose one of the clients to be the "master" who will send the chicken position to the other players? How do they handle this in online games? I am thinking of doing the following I can not imagine the calculations being done on the server working properly, I will use the example of the hens, my hens would have an AI maybe too complex to stay on the server. I thought the following, one of the clients of the update area, as it is a big map, the clients are receiving updates being in chunks of the map, then one of the clients would be the master (the first one that entered the channel) , the others would just listen to it, the "master" client would then send to the server the chicken positions states and the server would send to all the clients enrolled in the channel the chicken position status. It works similar to a "token" who is at the top of the channel users list is going to deal with the chicken's calculations. advantages Less work for the server to handle. Disadvantages Poorly trained players could change the position of the hen and make the game experience unpleasant. What could you do to avoid this disadvantage?


Local player always at same position I am trying out UNET ( Unity Multiplayer Service ) and I am building a space invaders like game but with two players at each side of the screen shooting at each other. I want the local player to always be at the bottom of the screen and see the enemy at the top. I tried checking isLocalPlayer and isServer and only if both are false this means it's the enemy player and change his transform and rotation to be facing downwards and be at the top. But this brings unexpected behavior like spawning the bullets on the original position.


What is dead reckoning and how do you deal with it? I've come across this problem before and it would be good to know the different ways of solving this problem.


QT for lan game devleopment I am making a small game for a course in my school and was planning on using QT to build it. I have worked with pygame last year and turbo c about 5 years agao to make games, small easy stuff. This time I am planning to make a game that supports multiplayer over lan, the game idea is simple however, information about the game is here. I was hoping to know from you all, if it is a good choice to use QT for this! I am totally new to QT, but a decent c programmer. Also what problems would I encounter when it is a LAN game, for a start I just want it to support 2 players on the local network. Thanks


Why can't cross platform multiplayer games exist? At least, why are they so difficult to make? assuming that's the reason why not even AAA studios accomplish this feat for their games. Especially with modern cross platform game engines like Unreal and Unity that can build on Xbox, PS4, and PC, why hasn't this been done yet on a large scale? For example, Diablo III is a game released on a variety of platforms. Despite it being a product of Blizzard, one of the wealthiest video game companies in the world, it does not allow an Xbox player to play with someone using a PC.


What is the best time to implement Multiplayer system? I have been starting a new online multiplayer game project this week and as the title says Is it better to implement the Multiplayer feature right away, or is it ok to implement it when the game already has some other stuff, like maps and physics?


How to display image in second layer in Cocos2d I am very new at Cocos2d and is testing to displaying an image over the "Hello World" text on a second layer and need help to get it work. I guess it is some basic stuff here and appreciate any tips etc. with this. I know that if i put the display code (myLayer1) in the "init" it work or do the call self goHere from the "init" in myLayer1 it works but i want to call the "goHere" directly. I have the following code HelloWorld.m import "HelloWorldLayer.h" import "myLayer1.h" HelloWorldLayer implementation implementation HelloWorldLayer (CCScene ) scene 'scene' is an autorelease object. CCScene scene CCScene node 'layer' is an autorelease object. HelloWorldLayer layer HelloWorldLayer node myLayer1 layer1 myLayer1 node add layer as a child to scene scene addChild layer scene addChild layer1 return the scene return scene on "init" you need to initialize your instance (id) init always call "super" init Apple recommends to re assign "self" with the "super" return value if( (self super init )) create and initialize a Label CCLabelTTF label CCLabelTTF labelWithString "Hello World" fontName "Marker Felt" fontSize 64 ask director the the window size CGSize size CCDirector sharedDirector winSize position the label on the center of the screen label.position ccp( size.width 2 , size.height 2 ) add the label as a child to this Layer self addChild label myLayer1 a1 myLayer1 new a1 goHere myLayer1 release return self myLayer1.m import "myLayer1.h" implementation myLayer1 (void)goHere NSLog( " gt gt gt gt goHere lt lt lt lt ") CGSize size CCDirector sharedDirector winSize CCSprite vv CCSprite spriteWithFile "hand.png" vv.position ccp( size.width 2 , size.height 2 ) self addChild vv z 3 (id) init always call "super" init Apple recommends to re assign "self" with the "super" return value if( (self super init )) return self end