Anyone tried a turn based multiplayer game on C2 ?

0 favourites
  • 7 posts
From the Asset Store
Hand-animated Sprite Base for isometric game/animation development
  • I'm about to finish my turn based strategy game , but just want to be sure that multiplayer option works.

    I mean of course it works but i want to know that in 1 game there will be 12 players , so can it make the server rough times ?

    Or are there might be any packet loss or some delay issues ?

  • And i've got one more question.

    What if host ( the player server ) disconnects from the game ?

    Is game going to be end or others can continue the game without any problems.

    You know todays there are a lot of rage quit'ters. lol

  • it can't. if it's a server side turn based game, server works only as much as players (1 per current turn) pushes data up on server.

    unless you have a huuuuuge amount of players at the same time, then you're pretty much ok. if you do have ~1000 or more players pushing data onto server at the same time (ending their turn) this could slow things down. still you would have to do this - make asycn calls to database so they are queued up for processing, and since servers can easily process ~1000 connections at once, they will be processed in a matter of minute / two /etc.. other players wait until they have the turn. it can take that minute two or more since they don't know when really the other player is done, and through pings on database you should check turns.

    also if someone DC-s, make it a permanent DC and make sure when it's that players turn, to automatically skip it.

  • Tic Tac Toe - multiplayer is turned based so ... yes multiplayer turn based games are possible.. i have no clue how C2 server system works... its rather complicated and doesn't make sense to me personally

    but it should work....

  • it can't. if it's a server side turn based game, server works only as much as players (1 per current turn) pushes data up on server.

    unless you have a huuuuuge amount of players at the same time, then you're pretty much ok. if you do have ~1000 or more players pushing data onto server at the same time (ending their turn) this could slow things down. still you would have to do this - make asycn calls to database so they are queued up for processing, and since servers can easily process ~1000 connections at once, they will be processed in a matter of minute / two /etc.. other players wait until they have the turn. it can take that minute two or more since they don't know when really the other player is done, and through pings on database you should check turns.

    also if someone DC-s, make it a permanent DC and make sure when it's that players turn, to automatically skip it.

    Thanks for the reply !

    What if we make peer to peer system to peer = host system ?

    I mean if i use my computer as a server , and keep it open always , can it handle the server mission completely ?

    So there won't be any troubles if anyone leaves ?

    It's like peer(server = my computer) to peers.

    A stable peer done all the work so if players disconnect or else it wont change the games current play.

  • yes you can.

    most of the games today work on this principle:

    • you have a server that accepts connections
    • players search match and when they are found by some rules they are put on 1 instance on that server
    • they are all connected to the same IP with instance ID
    • when someone moves (let's say it's a real time fps) - server
    • processes data and predicts future movement and sends that data back to all players (except the one who's input it did)
    • players see change with some delay (ping, depends on how far you really actually are from server and connection speed and so on (but this is not the point)

    and that's about it. ofcourse server has to process data from every user, and it's a lot of job so server are usually hardcore PCs, dual xeon and so on, with good connection speed, etc.. also, they can handle more then 1 instance, for example - let's say a game takes 10 players, and server handles 100 instances - 1000 players on that server. also you have to know how much data you send to server so that if it's full it can handle, and how much it sends. for example - max data sent to server from each player could be ~100kB * 1000 players = 100 000kB = 100mB /s connection speed for download on that server so that's another thing to watch, but usually data packets are smaller and speeds today are big.

    that's how it's done in real - time games. but in turn based games you have a bit of an advantage, and that is that you don't have to calculate prediction on server,

    you just have to send new positions / game data to server, and he dispatches it to other players so they update their view. and you do it only on the end of the turn. the only thing to handle here is some combat between players / interactions and so on.

    and yes, you can have a pc which creates an instance of the game, and people can join / leave while game stays in the same state as it is, but you've got to design the game carefully, and it's a tough job really.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Servers are pretty sturdy, so it would work just fine, but keep in mind that it's not "12 people per server" but "12 people per room on a server".

    So you can have like 10 rooms with 12 people in each room, in a single server. I think this is how it works, at least.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)