Support => TNet 3 Support => Topic started by: creativitysquare on December 14, 2014, 05:27:08 PM
Title: Locking a channel
Post by: creativitysquare on December 14, 2014, 05:27:08 PM
HI All
Imagine you want to make a competition and you accept max 2 players. When the two players are in the channels you start the competition.
I have two issues: 1) How do I synch so both clients start together? At the moment I let the host set the random parameters, eg. what random level they have to compete against. Once the non-host player joins, he gets these values from the host. Then I start the competition at the same time on both clients. However they are not in synch. If my PC is the host, the PC is ahead of about 1 second. If the iPhone is the host then they are pretty much in synch. Is it a issue related to performance difference between devices (hardware+connection)? Any suggestion to minimize it?
2) If one of the two players leave before completing the level there is one space for somebody that could potentially join. How do I lock the level so once there are two clients nobody else can join until the channel actually "dies" as both clients leave?
Thanks a lot! Egi
Title: Re: Locking a channel
Post by: ArenMook on December 15, 2014, 01:07:51 PM
1. You need to use RFCs. Instead of sending values to the newly joined player, they should already be there. So instead of setting some local value like "mySelection = 123;", do it via an RFC: