How do I compensate for lag?

0 favourites
  • 8 posts
  • So i exported my game today to test with a friend. Usually when i run it locally there's very minimal peer lag. However, when i tested it, its absolutely unplayable. As the peer, movement is very stuttered, lots of teleporting and results in both characters dissapearing. As the host watching the peer, its just the same, peer is very laggy and dissapears.

    If anyone could give me any tips on how to fix this, or explain what is happening, id be very grateful. Here's some screenshots from my events.


  • send the file capx better so we can see what happen in Bug mode

  • Did you set the bandwidth profile to LAN?

  • Cant upload capx atm, will do later.

    What do you mean by bandwidth profile?

  • "Set bandwidth profile". Multiplayer object action.

    From manual:

    Switch between Internet or LAN (Local Area Network) bandwidth modes. The bandwidth profile must be set before joining a room, and only the host's setting is used for all peers in the room. The default mode is Internet, which sends updates 30 times a second with an 80ms buffer. LAN mode sends updates 60 times a second with a 40ms buffer. LAN mode will use about double the bandwidth of Internet mode and will degrade gameplay quality more if there is latency or PDV in the connection. LAN mode should never be used for Internet games - it is intended for networks where bandwidth is effectively unlimited and latency effectively zero, which is typically only the case with local area networks, and taking advantage of this can improve gameplay quality. Internet mode should however work well over LANs, so if in doubt leave it on that.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Tried setting it to internet. Nothing changed, must have been on it default. Ive also played around with the send modes and interpolation to no success.

    How can i make sure the peer doesn't move until it receives the message back from the host?

    Is there a way for the host to know if the peer desync's, and set the object position back to where it should be? or stop the inputs from peer until the object catches up?

    Starting to think this is impossible. Ive set my game up the same way as in the real time game tutorial, and its not playable.

  • Anyone have any tips or can tell me what i need to look into? Ive read everything i can find, not that i completely understand it all...

    Ive used the same methods as the real time multiplayer game tutorial, theres also only 1 peer and 1 host in a game. Surely this cant be eating enough bandwidth to make the game unplayable.

    There must be a way!

  • Ok here's my capx. If anyone could take a look and let me know if there's anything i can do, that would be awesome. You can toggle on the simulate latency in the signalling group, so u can see the lagfest.

    This is my first attempt at multiplayer, so if there's something obvious i'm doing wrong please point it out.

    Edit. Toggle on the Archer icon and press Versus to go into the game.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)