TrueSync Tutorial bug
Hi,
The TrueSync tutorial appears to be buggy if all users don't enter the game at the same time.
Steps to reproduce are this:
- Create fresh project, import TrueSync and the tutorial package here:
https://doc.photonengine.com/en-us/truesync/current/tutorial/tstutorial-part4-rollbacks-tracking
- Build three separate copies of the game. (lets call them Game1, Game2, Game3)
- Open 'Game1' and 'Game2'... Two Players are now waiting in the lobby as expected.
http://imgur.com/591ravn
- Master player then presses 'start' button... Two players are now in game and movement + controls are working well
http://imgur.com/ZI3m7gG
- Open 'Game3'...
- Player3 seems to connect successfully, and goes straight past the lobby and into the game.
- However there are no other players,
- Game3 shows that there are 3 players connected
- Game1 and Game2 still only show that there are 2 players connected
- Input controls don't work at all for 'Game3'.
- 'Game1' and 'Game2' controls still work, but don't show the third player.
http://imgur.com/FZ7eICD
The expected/desired behaviour is that Game3 spawns a new player in all games upon joining the game.
Any ideas?
Many thanks
The TrueSync tutorial appears to be buggy if all users don't enter the game at the same time.
Steps to reproduce are this:
- Create fresh project, import TrueSync and the tutorial package here:
https://doc.photonengine.com/en-us/truesync/current/tutorial/tstutorial-part4-rollbacks-tracking
- Build three separate copies of the game. (lets call them Game1, Game2, Game3)
- Open 'Game1' and 'Game2'... Two Players are now waiting in the lobby as expected.
http://imgur.com/591ravn
- Master player then presses 'start' button... Two players are now in game and movement + controls are working well
http://imgur.com/ZI3m7gG
- Open 'Game3'...
- Player3 seems to connect successfully, and goes straight past the lobby and into the game.
- However there are no other players,
- Game3 shows that there are 3 players connected
- Game1 and Game2 still only show that there are 2 players connected
- Input controls don't work at all for 'Game3'.
- 'Game1' and 'Game2' controls still work, but don't show the third player.
http://imgur.com/FZ7eICD
The expected/desired behaviour is that Game3 spawns a new player in all games upon joining the game.
Any ideas?
Many thanks
0
Comments
-
It's my understanding that you can't join a player to a TrueSync session already in progress because the new player won't have any way to know what position the objects are in the session. This is because trueSync simulates a physics simulation simultaneously on all connected clients when the session starts. A new player won't have that past simulation and the current input data from the other players won't be enough information to get caught up.0
-
Thanks Dan, that would make sense i guess.
Wondering perhaps if the playback mechanism in truesync has this ability?0 -
Great answer Dan, you are totally right. And @feathers the Game3 should even connect, but the code is simplified for tutorial purposes. We have a way to send all previous players inputs, but this could take a lot of time to be simulated until Game3 have reached the same point as other players, it is still a topic of discussion the later-join feature.
0 -
Thanks @JeffersonHenrique , having some time to wait is not really a big issue in the game i am building, however joining an existing game is a must-have. Could you please point me to some more information on the later-join feature?0
-
Hi @feathers, later-join is possible but this feature need that a new client simulates all the game until he reaches the current state, if it is on the first frames it is ok, but if the game are a lot of frames ahead this could take a lot of time to be resimulated on the new client, which is not a good thing. This is one of the main reasons we are stil discussing about later-join feature.0