_id
int64
0
49
text
stringlengths
71
4.19k
26
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?
26
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
26
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?
26
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?
26
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
26
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!
26
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?
26
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. )
26
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.
26
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 )
26
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?
26
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?
26
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.
26
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?
26
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.
26
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.
26
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?
26
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.
26
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...
26
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.
26
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.
26
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?
26
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?
26
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!
26
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?
26
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.
26
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.
26
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?
26
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?
26
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.
26
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?
26
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)
26
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?
26
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?
26
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?
26
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.
26
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?
26
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?
26
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?
26
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.
26
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?
26
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.
26
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?
26
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.
26
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.
26
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?
26
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?
26
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!
26
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?
26
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
26
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?
26
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?
26
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.
26
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?
26
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).
26
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?
26
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.
26
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.
26
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.
26
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.
26
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.
26
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.
26
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.
26
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.
26
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?
26
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).
26
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?
26
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?
26
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?
26
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.
26
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.
26
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
26
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.
26
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?
26
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
26
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.
26
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.
26
reading input from multiple mice in QB64 in Windows 10? I am looking to write a non network multiplayer game for Windows 10 with QB64 that accepts input from 2 or more USB mice plugged into the system. Like a simple Pong game where additional players plug mice into a USB hub to use as game controllers. I have been googling this and found some older threads Is it possible to detect two different mice at the same time, and have their movements recorded seperately? Asked 8 years, 9 months ago How do I read input from multiple keyboards mice on one computer? Asked 7 years, 6 months ago however these are pretty old threads from before Windows 10, also they seem to be more oriented towards C or .NET. Can anyone provide some example how it might be done with QB64 under Windows 10? Thanks
26
How do I allow a player to build a dedicated server, but prevent them from cheating? Instead of maintaining a central server, many games allow players to build their own server, like Minecraft. But if you give them the server side program, how could you prevent them from cheating? I thought it's impossible, but Team Fortress 2 seems doing that. Usual TF2 servers are built by players. But Valve sells the items in TF2, so they must have a way to prevent server owner generating these items.
26
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. )
26
Revenue model for an open source multiplayer game I've had an idea for a multiplayer game, and ideally, I'd absolutely love for it to be open source. However, I also want to make a profit from it so I can make more games and maybe even have a dev team. Is it possible to keep it open source and generate revenue? One idea I've had is to charge for online multiplayer services, but then users could easily circumvent that by patching in their own servers. Is there a revenue model that can work for this kind of game project?
26
Simple mobile multiplayer game. TCP UDP? I'm tying to dive into multiplayer game programming. The game is quite simple, it's a 2D scroller mobile game, the player need to touch the screen in order to move 1 step and it could contain up to 4 players at max. 1 of the player could create a room for other players to join. I was thinking that I would use TCP for this and will only send packets when 1 of the player trigger an event like moving or exiting the game. Is my approach is correct? Since from what I've read, many games are created in UDP instead of TCP. In case of UDP, what is sent between the clients and the server? The position of each entity in the game at a fix time interval? I'm really new multiplayer programming. I'd appreciate if someone would share their story. Thank you.
26
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.
26
lag compensation for slow bullets (opposing players perspective) I have figured out how the server is suppose to "rewind" for bullet collisions so that when you hit a player on your screen, the server will also say you hit them. However, when you press a key to shoot on your computer, it will take x ms until the opponent sees that you shot. by then, the moving opponent will be past the position that you fired while the sever says that they were still hit anyway. What you will see You aim and shoot at them, the bullet hits them and they take damage (this works out perfectly so far) What they will see They are moving and you shoot at them. the bullet trails behind them and misses, flying off into the distance. Yet they still take damage. How can this be fixed?
26
Single player game into Multiplayer game I developed a Single player game in Flash (Tic Tac Toe) and in the Multiplayer mode i will be able to do both player playing on the same system with out network. I would like to extend it and make it enable to play the Multiplayer game for two player playing it online. How i can be made give me some ideas , How test the Multiplayer game playing along with different computers(I do not have internet connection in home). How I able to change the single player game into Multiplayer game , any minor changes required or I have to change the code base completely. In which way i can make it possible.
26
Anti cheat How secure is the client? Let's say, theoretically, that I'm developing a first person shooter with, of course, a map with things like walls. In the client code, the player is obviously halted upon collision with these wall objects. The server, however, only receives the player's location coordinates. Without some sort of data encoding in the client, the player could easily read the network communication to the server and send false coordinates to the server, allowing them to go wherever they wanted. My question is, is there a way to encode this location message to the server before it exits the client binary such that it would be extremely difficult for someone to read? Even by someone who disassembles the code to try and break the encoding? Or do all player collisions have to be detected by the server?
26
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
26
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?
26
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 )
27
file write restarts Corona app I am attempting to implement an auto save feature into a mobile game. I have the following code writing to the save file function saveFunc(input) local saveData input local file io.open( "saveFile.txt", "w" ) for i,val in ipairs(saveTable) do saveData saveData.." n"..val end file write( saveData ) io.close( file ) end This writes to the file correctly. The problem is that after the function finishes, the whole app restarts. Watching the output console, it re prints the "Copyright (C)..." as if I had Relaunched the app. I know it is this specific function because if I comment out the call for this function the game continues as normal. I also tried commenting out the io.close(file) but the program still restarted. How can I write to a file and not restart the app?
27
Roblox script Can't get "IntValue"? I am new to Roblox scripting (Lua apparently) and was fiddling with a function that is called when one Part (dubbed the "Sender") is touched by another Part, which is actually a tool with a Part called "Handle" inside of it, and a third Part nested inside that. I have also added an IntValue to the latter to be read upon touching. The object tree looks like this Apple (Tool) L Handle (Part) L TouchInterest L Value (IntValue) L Apple (Part) L Handle to Part Strong Joint The function is called alright, and the part with the name "Handle" is correctly identified, but I cannot for the world get a hold of the IntValue using the following code function onTouch(hit) print("Sender touched by "..hit.Name) local val hit FindFirstChild("IntValue", true) if val not nil then print("Found IntValue "..val.Name) if val.Name "Cash" then Get Money For Apple print("Players "..game.Players.LocalPlayer.Name) game.Players.LocalPlayer.leaderstats.Money.value game.Players.LocalPlayer.leaderstats.Money.value val.value end else print("IntValue Not Found!") end hit Destroy() end script.Parent.Touched connect(onTouch) In other words It keeps on logging "IntValue Not Found"! I have changed the name of the IntValue to "Value" and back to "IntValue" to no avail. I have been adding clones of it to several different layers of the composite object, but no results. Any help is greatly appreciated! BTW The object is a Tool, because the player is supposed to be able to pick it up and place it on the "Sender".
27
how to display current time as a static value in lua pico8 Pico8 has a function time() that when called displays the current time from start of program. i.e. print(time(),0,0,14) prints time at (0,0) with colour 14 However the function doesn't stop and keeps drawing the time each frame. I'm trying to figure out how I would draw the time without it increasing changing. So If I printed this 5 seconds from the start of the program I'd want it to display 5, but not change from that 5 value. https pico 8.fandom.com wiki Time I don't know how to store a static value of this time as a variable. Although according to the wiki, assigning var time() will cause time at 0 to be stored. Another way of phrasing this is...how would I display the time of 10 seconds when the following print is triggered? So after 10 seconds "time's up" is displayed. How would I display the current time 10, as well, as a static? Maybe I don't know what the time is when the event is triggered, so how can I count using time()? function init() last time() end function update() (empty update to use game loop) end function draw() cls() if (time() last) gt 10 then print("time's up!", 44, 60, 7) end end
27
NLua How to implement Roblox like function security? Roblox uses Normal Identities, basicly they assign a lua block object to a certain number. They use 2 for Scripts and LocalScripts, which can only use non secured functions, while the command bar can access everything that is LocalUserSecurity and RobloxPlaceSecurity. How can I implement this type of Lua Security into NLua?
27
Automatically triggering standard spaceship controls to stop its motion I have been working on a 2D top down space strategy shooting game. Right now it is only in the prototyping stage (I have gotten basic movement) but now I am trying to write a function that will stop the ship based on it's velocity. This is being written in Lua, using the Love2D engine. My code is as follows (note object.dx is the x velocity, object.dy is the y velocity, object.acc is the acceleration, and object.r is the rotation in radians) function stopMoving(object, dt) local targetr math.atan2(object.dy, object.dx) if targetr object.r math.pi then local currentspeed math.sqrt(object.dx object.dx object.dy object.dy) if currentspeed 0 then object.dx object.dx object.acc dt math.cos(object.r) object.dy object.dy object.acc dt math.sin(object.r) end else if (targetr object.r) gt math.pi then object.r object.r object.turnspeed dt else object.r object.r object.turnspeed dt end end end It is implemented in the update function as if love.keyboard.isDown("backspace") then stopMoving(player, dt) end The problem is that when I am holding down backspace, it spins the player clockwise (though I am trying to have it go the direction that would be the most efficient at getting to the angle it would have to be) and then it never starts to accelerate the player in the direction opposite to it's velocity. What should I change in this code to get that to work? EDIT I'm not trying to just stop the player in place, I'm trying to get it to use it's normal commands to neutralize it's existing velocity. I also changed math.atan to math.atan2, apparently it's better. I noticed no difference when running it, though.
27
Efficient tile maps in Corona SDK I need to create a tile map based level system for Corona SDK that loads files created with Tiled 1 . It also needs to support user touch scrolling and zooming. I've searched the Corona forums for possible solutions but the ones they talk about don't convince me. They basically have a matrix of Sprite objects which have an image loaded and a given position. That makes scrolling and zooming a bit hard. Any better ideas? 1 http www.mapeditor.org
27
Love2d Failed to load tileset map I'm reading the Love2D Development book, which i think i will stop reading because is outdated and very instable, sometimes i got a lot of troubles. Backing to the question, i made a tileset map with Tiled and saved in .tmx with Base64 ( uncompressed ) then i used Advanced Tiled Loader and used the code from the book This is the main.lua file local loader require ("Advanced Tiled Loader master Loader") the path to our .tmx files and sprites loader.path "map " local map loader.load("tilemap.tmx") function love.load() love.graphics.setBackgroundColor(255, 153, 0) load the level and bind the variable map loader.path "map " local map loader.load("tilemap.tmx") end function love.draw() map draw() end When i tested the game, the result was this http i.imgur.com JM8EYrv.png The result was suposted to be like this http i.imgur.com W26XFjE.png So what it could be?
27
Verb Noun Parsers and Old School Visual Novels Hi I'm working on a simple old school visual novel engine in Lua. Basically I have most of the code set up besides one important feature. The Text Parser. Lets get into how words are generally structured. In the screenshot I input the command "my wish is for you to die" How would a human understand this? my noun object wish verb is connective equator similar to for connective object (for all objects of ..) you noun object to connective action similar to do die verb the computer can then parse this and understand it like this (pseudo example) my user you get current label() you "Lost Coatl" wish user command user command for all objects of "Lost Coatl" do die() end execute user command() What other ways do videogames use text parsers, what would be the simplest way for a newbie coder such as myself?
27
update image properties Is there a way to update the location of an image? I'm currently calling my image dynamically using itemImage display.newImage(inventory t.ID 1 ) t. being my target ID. But in order for Storyboard to properly work, I need to change its location in my code to above my function, rendering its dynamic properties useless. Is there a way to update it like you can do with .text? something along the lines of itemImage.image(inventory t.ID 1 ) itemImage.imageUpdate(inventory t.ID 1 ) etc...
27
Is my Lua form scene loading setup efficient? At the moment, I'm working on a small game project using LUA and the love2d framework. Using this framework, I've made my own assets (i.e. button images, form images, etc), and using these assets I've been able to make a functional application, but not yet a game. In my project, I plan on having several scenes, and I'm not quite sure whether my method for scene management switching is efficient safe to use (safe, as in minimal bugs). So the process I'm using is as follows if scene selector.active scene "splash" then if sceneSplash.loaded false then sceneSplash.link.load() sceneSplash.link.update(dt) sceneSplash.link.draw() sceneSplash.loaded true else sceneSplash.link.update(dt) end elseif scene selector.active scene "menu" then if sceneMainmenu.loaded false then sceneMainmenu.link.load() sceneMainmenu.link.update(dt) sceneMainmenu.link.draw() sceneMainmenu.loaded true else sceneMainmenu.link.update(dt) end end where scene selector is a link to the follow file Misc Vars active scene "splash" version nil Resources cre nil xp nil End Vars Global Script Indicator calls calls.active scene active scene calls.version version return calls and sceneSplash sceneMainMenu are links to lua files which act as the scenes. Each file manages its own updates, which are passed through by the main.lua found by the love.update and love.draw functions which are passed through to the forms relevant load update draw functions. I'm aiming at using about 10 forms, 3 variable files and 2 misc function files (file management encryption IO operations logging etc). So the TL DR version is is it efficient safe (safe in terms of minimal bugs) to pass through draw and update functions from main.lua to other lua script files? So far, the process works without any bugs, even when I go back to a previously accessed 'scene', so I assume the process will work 'safely' when I'm using more scenes.
27
Game state management (Game, Menu, Titlescreen, etc) Basically, in every single game I've made so far, I always have a variable like "current state", which can be "game", "titlescreen", "gameoverscreen", etc. And then on my Update function I have a huge if current state "game" game stuf ... else if current state "titlescreen" ... However, I don't feel like this is a professional clean way of handling states. Any ideas on how to do this in a better way? Or is this the standard way?