Hey! How exactly does P2P work? Like, if you managed to connect to two players, would you actually see that other person’s character on the screen? I haven’t been able to test it out lately, so that’s why I’m asking here. Thanks!
No, that’s not how it works. I recommend reading the wiki page and checking out the example to understand it.
Once you connect two Instances together, you can send and receive data as events. For example, you can send an event “playerPosition” with as parameter a structure { x = Player.X(), y = Player.Y() }, and handle that event from the other instance with the condition event received, like if the event “playerPosition” is received, store the sent variable in a Scene variable otherPlayerPosition, and then set the position of another player object to otherPlayerPosition.x and otherPlayerPosition.y
Ah, ok. I’ll have to work on it my game a little more then.