multiplayer: manual close and open the room

0 favourites
From the Asset Store
10 Orchestral Soundtracks / ~2 mins each / 11 audio clips in total
  • hi,

    in some of games we must close the room before start the game and open room again after game finished...

    please add this into multiplayer plugin

    thanks...

  • Could you give a case sample of your want.

    Why do you need to close the room?

    Why do you need to open a new room?

    Why do you need to do either after a round?

    You Rooms are not associate to layout. Just set a share variable between everybody that represents room state and use messages when a room state change occurs.

  • Could you give a case sample of your want.

    Why do you need to close the room?

    Why do you need to open a new room?

    Why do you need to do either after a round?

    You Rooms are not associate to layout. Just set a share variable between everybody that represents room state and use messages when a room state change occurs.

    in some games you need that .. like :

    command and conquer series.. and so many games.. (an engine must support all type of games) if player start room with 6 player max .. but if 4 player in the room and they start the game so .. no one must join the room after the game starting .. they can not join in the middle of game...

  • Why not just have a lobby and handle peer connections as part of the implementation of the multiplayer logic ? The host can kick/reject any unwanted player, and you would need something like this anyway to deal with players being disconnected and/or trying to reconnect.

    Unless I am missing something, I don't think this requires any new networking features ; this requires little work but helps with genericity and flexibility, anything too specific is likely to be a limiting factor for other types of games.

  • I dont' see a requirement of your needs to change anything. What you need can already be done.

    For the host when the game starts go into PlayMode. When another joins kick them.

    As for ready state and play state. Just note those on the host.

    Tons of games have the features you want in standard host/play, but the mp system already supports it. You just needs to figure out how.

    Good luck on your project. However as a word of advice. Do simpler MP first. The MP world is an entirely different beast to tame. I've already seen developers think just because it's in c2 that MP suddenly becomes easy. While C2 does lower the programming barrier. There is not a low that makes MP all that simpler.

  • [quote:1mc5btlj]@jayderyu , Refeuh

    for example :

    peers see the rooms and they choose a room and they connect to that room but after they clicking on the room they got kicked because players in the game...and they can't join in the room but room is not full and they can see that ... so this is not good .. because they must join in available rooms .. and if we have a very big room and all peers join into that... we can not do that .. that is obvious..(if lobby host got disconnect - peers disconnect and reconnect problem - they must return to that room after game end they must disconnect again! and who made the room must be host .. but we can not tell who is the host in game because we tell every body disconnect and reconnect again so maybe who is made the room not be host ! and after game that player is not host !!

    and construct 2 is here for making things easier... not harder !)

  • Well... in the end a tool is just a tool, and there's always a balance to find between genericity+flexibility and productivity+ease-of-use.

    The C2 solution to simple multiplayer is quite elegant ; it's functional and it works easily. Obviously the design choices in terms of technologies and architecture mean it won't be suitable for every project (esp. on the security side due to the host/peer approach), but it's good enough for the kind of games you would expect to do with such a high-level tool.

    Part of good development practices is to choose the right tool for the right tasks. If C2 is not suitable for your project, or if you end up fighting the existing functionalities rather than using them, maybe a different tool would be more appropriate.

    There's always the possibility of trying to run your own match-making, signalling, routing, etc. but if the goal is to make a game and not create new technologies, and would suggest working your design around the existing limitations to keep focusing on high-productivity.

  • mahdi71

    Well since I can do everything your asking for. I don't see the problem. I offer you good fortune to your design. I did MP programming, i wrote my own server and client. I find C2 MP easier due to it's event sheet. C2 MP is easier. Good luck. And you never know. Ashley might include your feature request.

  • peers see the rooms and they choose a room and they connect to that room but after they clicking on the room they got kicked because players in the game...and they can't join in the room but room is not full and they can see that ... so this is not good .. because they must join in available rooms .. and if we have a very big room and all peers join into that... we can not do that .. that is obvious..(if lobby host got disconnect - peers disconnect and reconnect problem - they must return to that room after game end they must disconnect again! and who made the room must be host .. but we can not tell who is the host in game because we tell every body disconnect and reconnect again so maybe who is made the room not be host ! and after game that player is not host !!

    You just need to be creative to be able to figure that out. You need a room manager, which you can do yourself, I did it, I call it lobbyhost. Instead of open/close room, let the lobbyhost assign running number to rooms, this way is much easier to maintain a unique room number. In my case I use unix time stamp as the running number.

    Leaving and joining room is as normal as it is, if you look at any other MMORPG, such as WOW, TERA they did this as well, notice the loading screen? It's actually a fake screen to download current data of the room, not loading the game locally. Game load locally much faster than they download all current data, that's the truth.

    In case of you're design your game in a way that you let players to create room themselves, and set who can join with or without password, set the room peer limit, create unique room name, auto join room, this is extremely doable, in fact the the MP plugin was designed totally for this scenario, which we call peer-to-peer MP.

    construct 2 is here for making things easier... not harder !)

    It is already much easier for most people than you can imagine. Try the traditional way then, see how it goes. The complexity of MP goes exponentially to the complexity of your game, you need to realize that first!

    Don't blame the bow if you can't get a bulls eye.

  • I dont' see a requirement of your needs to change anything. What you need can already be done.

    For the host when the game starts go into PlayMode. When another joins kick them.

    As for ready state and play state. Just note those on the host.

    Tons of games have the features you want in standard host/play, but the mp system already supports it. You just needs to figure out how.

    Good luck on your project. However as a word of advice. Do simpler MP first. The MP world is an entirely different beast to tame. I've already seen developers think just because it's in c2 that MP suddenly becomes easy. While C2 does lower the programming barrier. There is not a low that makes MP all that simpler.

    if when i loading the rooms list.. i connect to each host (with a small delay for connecting to each host like 0.5 sec) and ask for state and ping maybe.. then multiplayer server dont kick me out and block me? for connecting so much into server ? because for connecting to a room the multiplayer server must respond .. ? (if my room number be like 100 or more...) and i must keep rooms state updated in every 10 sec...

  • I don't see why you need new features to do this. You just have a special "waiting for players" mode at the start of the game, and once it's started, reject any new people joining (or just set the room size, so the signalling server sees that it's full, and then you can also de-list it from the list of current games so nobody even tries to join it). As with any multiplayer game the host is authoritative, so the host makes the decisions about when people can join and when to start the game.

  • I don't see why you need new features to do this. You just have a special "waiting for players" mode at the start of the game, and once it's started, reject any new people joining (or just set the room size, so the signalling server sees that it's full, and then you can also de-list it from the list of current games so nobody even tries to join it). As with any multiplayer game the host is authoritative, so the host makes the decisions about when people can join and when to start the game.

    i dont get that..

    so you say i must create one room for all peers ?

    what if my host left ?! all peers must reconnect again ...this is not good and so many other things happening like transfer messages between all peers for 1 game with 4 players ! and if i have 20 games running then i have so many message transfer and this is so much wasting bandwidth

    in my game peers must join in rooms and set color and position and team and... then they start game.. but problem is :

    if my host start the room with 6 max peers but if just only 4 peers in the room and they wants to start game .. then new peers can join... and if i kick them peers must click in so many rooms and they kicked all the time... !

    so what i must doing ?

    now i just disconnect and reconnect again and make room with another game instance .. so new room is hidden from list.. (reconnect is a problem because host can change in reconnect and sometimes peers can not join properly)

    another way. i connect to each host and get state of game when i listing the rooms (so many connections to multiplayer server (scirra server) and possibility to get blocked (i can use delay for connect to each host but still so many connections))

    another way.

    you add this feature to construct 2..

    is there another way ?

  • what if my host left ?! all peers must reconnect again ...this is not good and so many other things happening like transfer messages between all peers for 1 game with 4 players ! and if i have 20 games running then i have so many message transfer and this is so much wasting bandwidth.

    If you worried if the host left the game, you yourself should host the game! Why would you give that kind of authority to your player if you don't want them to be able to do that? You need to revisit your design obviously.

    now i just disconnect and reconnect again and make room with another game instance .. so new room is hidden from list.. (reconnect is a problem because host can change in reconnect and sometimes peers can not join properly)

    another way. i connect to each host and get state of game when i listing the rooms (so many connections to multiplayer server (scirra server) and possibility to get blocked (i can use delay for connect to each host but still so many connections))

    another way.

    This why I said you need a room manager, as in a centralized lobby host. This is actually the way to reduce connection to signal server! Have the lobby host to list "open" room to newly connected player, by storing the list of which room has started and has not in an array or whatever. You don't have to connect to each host to get game state this way, because the lobbyhost can filter this. That is the price to pay if you intend to get, I don't think hosting a lobbyhost would be costly, it's like your own customized signalling server.

    Ashley , some suggestion here:

    The only thing I think that is more useful to add for case like this is host action [action: unlist current room from signalling server], which is like tagging a roomname so that it won't appear if other new peer requested a roomlist, or something else that can provide the same end result.

    The reason why I think unlisting room is better that the ability to open/close room is, roomlisting is simply the higher level of management, because if open/close room is implemented anyway, the closed room will appear in the list anyway (I'm not sure whether this is still true, because I tested this a long time ago).

  • so you say i must create one room for all peers ?

    No, you can request room lists without being in a room.

    You can already filter rooms when requesting room lists to skip ones which are full or locked. I don't see why there needs to be a new feature here.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You can already filter rooms when requesting room lists to skip ones which are full or locked.

    Lol I totally forgot there was already the dropdown option for that.

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