# Best Practices for Implementing Multiplayer

**URL:** <https://discourse.processing.org/t/best-practices-for-implementing-multiplayer/2952>\
**Category:** p5.js\
**Created:** [August 25, 2018, 5:07pm UTC](https://discourse.processing.org/t/best-practices-for-implementing-multiplayer/2952 "2018-08-25T17:07:23Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Battlesquid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/battlesquid/32/1222_2.png) [@Battlesquid](https://discourse.processing.org/u/Battlesquid)\
**Post date:** [August 25, 2018, 5:07pm UTC](https://discourse.processing.org/t/best-practices-for-implementing-multiplayer/2952/1 "2018-08-25T17:07:23Z")

</div>

Hello all. I’ve been working with p5.js and p5.play for some time, and I’ve been interested in making some multiplayer games, but I don’t know if my implementation is well structured. I tried my hand at it with [this game](https://github.com/Battlesquid/jra-alpha) and multiplayer works, but it’s rather slow, and I’m thinking it has something to do with the way I implemented the code. Can anyone please provide an explanation of how to implement multiplayer better?

Thanks in advance 🙂

---

<div class="post-metadata">

**Author:** ![kfrajer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/kfrajer/32/196_2.png) [@kfrajer](https://discourse.processing.org/u/kfrajer)\
**Post date:** [August 25, 2018, 5:24pm UTC](https://discourse.processing.org/t/best-practices-for-implementing-multiplayer/2952/2 "2018-08-25T17:24:03Z")

</div>

What does your game do?

What do you mean is slow? Slow responsiveness? Please provide more objective details.

Kf

---

<div class="post-metadata">

**Author:** ![Battlesquid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/battlesquid/32/1222_2.png) [@Battlesquid](https://discourse.processing.org/u/Battlesquid)\
**Post date:** [August 25, 2018, 5:29pm UTC](https://discourse.processing.org/t/best-practices-for-implementing-multiplayer/2952/3 "2018-08-25T17:29:31Z")

</div>

The game is [here](https://jra-alpha.herokuapp.com). By slow, I mean that the movement is rough.

---

<div class="post-metadata">

**Author:** ![jeremydouglass](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/jeremydouglass/32/20_2.png) [@jeremydouglass](https://discourse.processing.org/u/jeremydouglass)\
**Post date:** [September 10, 2018, 6:34pm UTC](https://discourse.processing.org/t/best-practices-for-implementing-multiplayer/2952/4 "2018-09-10T18:34:00Z")

</div>

@Battlesquid – you might try pinging @r4nd0m, who has recently been developing a real-time online multiplayer game with p5.js

> [@I created multiplayer online game with p5js](https://discourse.processing.org/t/i-created-multiplayer-online-game-with-p5js/854):
>
> Hi everyone, I would like to share with community the game I created with p5js as a renderer. It is a realtime multiplayer game, similar to AgarIO and other games in that ecosystem. You can try it out on [http://owom.io](http://owom.io) Feel free to ask any questions regarding tech, and any ideas on how the game might be improved are welcome!
