Multiplayer Example with Custom Movement?

0 favourites
  • 4 posts
From the Asset Store
Unlock platyers earning coins, and save it with Localstorage
  • Hi,

    I am trying to create a Diablo-style multiplayer RPG. Characters should move towards the mouse when held down. It works fine as long as I am not running a multiplayer setup (single player / only host).

    Once a peer is connected, any input makes the characters move in a weird way and they do not seem to stop at all. When debugging, I can see that the vector of the custom movement never resets to 0, so that might explain the continuous movement, although I can confirm that I stop / set velocity to 0. When in single player, that works without issues.

    Long story short, I am not asking you to debug my game. Instead, I am looking for any working example where multiplayer is combined with a custom or "move to" movement behavior. I can only find 8D examples and it would be helpful to have proof that other movements are even supported in multiplayer.

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • sounds like you are mixing up the inputs, which I remember was hard to get straight. I have done very little with multiplayer, but was helping my son with a game he wanted to make a couple years ago. We lost the source capx file in a hard drive crash, but you can still run one of the tests here:

    https://www.rieperts.com/games/Ocean9

    You are a fish, and it follows your mouse around the screen. When you click it will eat the little white planktons, which makes you grow. I think the goal was to get bigger than other players and eat them.

    So, this wont help much, but shows that it is possible.

  • Allan, thanks a million times for taking the time to write a response! You are awesome!

    You were indeed right, I messed up some inputs due to copy / pasting stuff (used X where it should be Y).

    One more question: Did you encounter the problem that there is a slight "rubber banding" happening for the peer when suddenly stopping the character? The host seems to move the character a little bit further than the peer and then corrects it afterwards.

    I could mitigate it by sending the exact coordinates where the peer wants the character to stop, but there is still a tiny little rubber banding happening as the server overshoots.

  • yeah, I remember that happening... but I don't remember if we got far enough to do much about it.

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