Author Topic: Drop-in coop party setup screen/waiting area  (Read 3326 times)

Shifty Geezer

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 9
  • Posts: 226
    • View Profile
Drop-in coop party setup screen/waiting area
« on: July 26, 2016, 09:15:20 AM »
How should one implement a 'waiting area' ahead of joining a level that knows what's going on within the game level?

There's a game level running with one or more players. A new player should be able to see what characters are being played as ahead of picking their own character and equipment (Channel Data). They should then request to join and be allowed to do so when the level is ready to receive them (RFC notify host WantToJoin(), receive RFC JoinNow(level data)).

devomage

  • Sr. Member
  • ****
  • Thank You
  • -Given: 7
  • -Receive: 67
  • Posts: 250
    • View Profile
Re: Drop-in coop party setup screen/waiting area
« Reply #1 on: July 26, 2016, 06:14:48 PM »
For the game I'm making I have an "invited" list on the channel.  Create the channel with nobody in it and deal with invites accordingly by the host of the channel.  I call this a "private" match.  Where a public match wouldnt care if they were invited - just join from a list of match channels.  Same idea for private chat channels, if needed.

Everybody in the game stays in the initial static "lobby" channel -- this allows for a nice player list and chat options.  I added a "location" path to the player's datanode to track where the player is at:  "lobby", "character select", "match", etc.

Oh how I love multiple channels!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Drop-in coop party setup screen/waiting area
« Reply #2 on: July 26, 2016, 11:09:46 PM »
Yup, be in more than one channel. One channel for the game, another for key communication that can be shared with players "globally".

Shifty Geezer

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 9
  • Posts: 226
    • View Profile
Re: Drop-in coop party setup screen/waiting area
« Reply #3 on: July 27, 2016, 03:22:39 AM »
Okay. I'm doing something wrong then, because having the setup screen in channel 1 and the game level in channel 2, all the created objects (Remote Creation on the host) in Channel 2 are appearing in channel 1!
« Last Edit: July 27, 2016, 03:34:17 AM by Shifty Geezer »

cmifwdll

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 149
  • Posts: 285
  • TNet Alchemist
    • View Profile
Re: Drop-in coop party setup screen/waiting area
« Reply #4 on: July 27, 2016, 03:31:12 PM »
Isn't that what you want?

Move (or point) the camera (and other objects from channel 1) waaaay off-world to hide the objects from channel 2.

Shifty Geezer

  • Full Member
  • ***
  • Thank You
  • -Given: 7
  • -Receive: 9
  • Posts: 226
    • View Profile
Re: Drop-in coop party setup screen/waiting area
« Reply #5 on: July 28, 2016, 11:39:35 AM »
No, it was a result of using TNManager.LoadLevel() instead of JoinChannel. It's certainly an option to have the character selection in the game level, but keeping it in its own scene allows better management and more options.

Presently it's working correctly, with players joining Channel 1 and having the setup there, and then joining channel 2 to play the game. Just need to work out how to keep/pass data for channel 1, or how to communicate between channels...

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Drop-in coop party setup screen/waiting area
« Reply #6 on: July 29, 2016, 10:33:08 AM »
When you call TNManager.Instantiate, the first parameter is the ID of the channel where the object will be instantiated.

When you call tno.Send, the message always goes to the channel where the object resides.