photon bad??

Options
mad_sir1
mad_sir1 ✭✭
edited June 2013 in Photon Server
Hi ,everyone .photon provides us a strong net gameserver,I have learn a lot from it ,but a very serious problem ,that my games can't run smoothly,the players dosen't move smoothly ,that is very bad ,if I can't solve it ,I will give up the photon ,I have confused on it many days ,so I think the photon liteapplication bad??Oh I don't think ,so I want to find the problem ,but I can't find any problem in my source code . my game use the lite framwork, on the client side ,I use the Opraisevent() to send my position to others who are in the same room ,others can receive the event and show the players movement ,but the move is not smoothly , I use the local internet ,and I test on the iPad and the computer ,but it is the same problem, the update() method I call the peer.server() about 40 times a second , I have look at the realtime demo and run it ,I find the realtime demo can't move smoothly ,so I think is the lite framwork bad ??or something I have lost ,but I can't find that?? any one can help me ?/ :cry:

Comments

  • Tobias
    Options
    The Realtime Demo is not expected to move players around smoothly. It's sending distinct positions and applying them "as is" when they arrive.
    The lag between players is not always as low as in local network and it's not always constant.
    In other words: You can't solve this issue by sending more updates per second.

    The solution is to interpolate the player's movement and extrapolate it beyond the last update a player got for a remote character.
    For example: If you send 15 updates/sec and get a framerate of 30, every second frame must be calculated as "in between" or you calculate where the character should be in that next frame, based on past movement.
    You can send pure positions or also send "direction" to support calculating the next expected position.

    However, this part depends on your game a lot, so we can't help you with the details.
    Look up "lag hiding" techniques and try to find the one that fits your game best.