Hey Sirvoid and tunepunk - quick question for you guys... is this a pretty common latency/lag scenario? I'm only sending X and Y every .3 seconds, and I'm sending it via a token:
I know it's not TOO bad, but is there any way to tighten it up a bit more? OR in either of your experience, can you still have a great and competitive game session experience with that bit of lag? Or how would I work around it?
Thanks guys - you guys seem to know a lot about Photon so I figured I'd ask. Sorry to resurrect an old thread like this.
Hmmmm. For this kind of game i don't think i would send XY, except for adjusting positions.
If movement speed is constant, you can just send for example on key press: Sending only move, and the direction. For jump, send jump, speed and direction, and when the character stops moving you send stop moving, along with the XY position of the place to stop at, so the position is synced. A little bit of lag you can't really escape, but for this kind of game i would limit messages by just sending, on key down, and key up, basically. No need to send every 0.3 seconds.
The other clients would simulate exactly what the other player did.
For bullet's I'm not really using real bullets with collisions. I'm using a raycast approach on fire, and only send the XY position of the origin of the bullet, and the end position of the bullet (an solid object hit), when the other client get's that informatioin, i just move a sprite between those points, and detect collisions simply by distance between bullet player < XX pixels.
Hope that helps. If you have any other questions you can send me a PM,