Multiplayer Platformer Jump

Report Construct 2 bugs here.

Post » Thu Aug 11, 2016 6:48 pm

apeisa wrote:Hoping for fix on this also. There are some workarounds (multiplayer-amp-platform-behavior-position-syncing_p806548?#p806548), but it would be great to get native multiplayer and platform behavior work nicely together.

Try adding local variables to track player input instead of applying the player input directly to the player objects.

For example:

If pressing left > platform move left

instead try:

if pressing left > set Player localvar to -1

if pressing right > set Player localvar to 1

if not pressing left & not pressing right > set Player localvar to 0

if Player localvar = -1 > platform move left
if Player localvar = 1 > platform move right

It's more steps, but it's also a LOT less data to send for online multiplayer, since you're just checking on/off state when they occur instead of continuously.
Posts: 518
Reputation: 20,070

Post » Thu Aug 11, 2016 7:28 pm

@digitalsoapbox That is pretty much what I am doing. I am saving inputs with setbit() method into inputs variable (just like in multiplayer tutorial 4), but not using the built-in input syncing and prediction, but syncing that variable and moving all players on each screen locally with same functions.

Movement is smooth for everyone. I do occasionally (like on landings etc) sync positions and it is very rare to get any syncing glitches (something I can tweak of by syncing positions more often).

Unfortunately my game has physics on bullets (or darts) and that is something I have to live with. It is still pretty great gameplay for all, but host has clear advantage (since all physics calculations are done on host). Probably will end up adding server there, so all players will be on same level.

I watched Sombrero trailer - looks very cool! Pretty similar game than what I am building (I love that kind of 2D action games - will definitely buy Sombrero). Have to admit that you have much cooler graphics and without bullet physics it is much more suitable for online play! Is the release coming soon?
Posts: 4
Reputation: 456

Post » Tue Sep 13, 2016 10:36 pm

If somebody got a problem with Jump on Peer Side... try delete (Enable local prediction for Peer) this action if you are using it there:
Example from default Template:
Game (group)=>
Peer (group) =>
Peer On created (event / trigger) => ...some actions
Peer.peerid = Multiplayer.MyID ( sub event ) => Multiplayer - Enable local prediction for Peer - TOGGLE THIS ACTION

But this is not enough. Especially for mobile devices... On desktop little better
Last edited by mcart on Tue Sep 13, 2016 11:50 pm, edited 1 time in total.
Posts: 19
Reputation: 417

Post » Tue Sep 13, 2016 11:38 pm

Stupid Sync = Absurd
Posts: 19
Reputation: 417


Return to Bugs

Who is online

Users browsing this forum: Salvo776 and 1 guest