Author Topic: Quick Questions  (Read 4941 times)

LightSky

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 2
  • Posts: 56
    • View Profile
Quick Questions
« on: January 03, 2014, 04:01:46 AM »
I am making a 2D side scroller for mobile.  I am currently having users join random channels based on their game preferences and I want to sync their Avatar spawns based on once all players in the Channel have loaded the scene.  Is there a built-in way in TNet to check what level the user has loaded?

Also, I am using a joystick and sending quick packets  to update the Avatars position every FixedUpdate based on the User's input.  I am still getting jittery movement and I have experimented with Auto-Sync Rigidbody as well to no avail.  Any idea on how to improve it? 

Thanks   :D

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Quick Questions
« Reply #1 on: January 03, 2014, 05:58:23 AM »
TNet is designed with the idea that all players have loaded the same level, so no, there isn't. How can you sync something if they are located in different levels?

LightSky

  • Jr. Member
  • **
  • Thank You
  • -Given: 3
  • -Receive: 2
  • Posts: 56
    • View Profile
Re: Quick Questions
« Reply #2 on: January 03, 2014, 01:54:07 PM »
TNet is designed with the idea that all players have loaded the same level, so no, there isn't. How can you sync something if they are located in different levels?

Oh no, I meant that if Player 2 has a faster device and loads faster than the other players and then calls for their Avatar to be created and the other players will not see that call, so it looks like it doesn't exist.  I am working around it by having a countdown timer before the match starts and it will spawn all of them at that time, thus giving all the players a time to load.  I would be easier to check to see if they all loaded so I wouldn't have to wait longer than needed.




ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Quick Questions
« Reply #3 on: January 04, 2014, 09:58:51 AM »
If you specify a Saved type target, the call will be buffered and the other player will see it when he loads. That's the whole idea behind Target.AllSaved / Target.OthersSaved.

All TNManager.Create calls are also saved.