# Phaser 3 - Real-Time Multiplayer Game with Physics

**URL:** <https://phaser.discourse.group/t/phaser-3-real-time-multiplayer-game-with-physics/1739>\
**Category:** Examples\
**Created:** [March 19, 2019, 11:20am UTC](https://phaser.discourse.group/t/phaser-3-real-time-multiplayer-game-with-physics/1739 "2019-03-19T11:20:05Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![yannick](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/yannick/32/732_2.png) [@yannick](https://phaser.discourse.group/u/yannick)\
**Post date:** [April 13, 2019, 12:22pm UTC](https://phaser.discourse.group/t/phaser-3-real-time-multiplayer-game-with-physics/1739/20 "2019-04-13T12:22:01Z")

</div>

> [@Aitorman](#):
>
> Isn’t it too slow to recompile before each restart?

Yes, it is slow. But you can tweak the webpack configs to improve it. If I would work on a large project, I would probably use webpack-dev-server to serve the /client, /physics and /stats over it, instead to serve it over the node server like in production. This will retranspile the code and restart the browser immediately. Also I would configure the /server to retranspile and restart via nodemon, only if a file needed by the server has changed. This will make development much easier.

> [@Aitorman](#):
>
> What’s the reason to separate physics and stats in different webpacks?

Only for readability. You could of course merge them.

> [@Aitorman](#):
>
> Extra question, is it really worth it using webpack for a project made with JS? I’m using ‘use strict’ in my server code and type=“module” in my client for ES6 modules.

Yes, it is worth it! Since you can use ESNext syntax or TypeScript. Btw I’m using TypeScript in this project.  
Please take a look at a [starter template](https://phaser.discourse.group/t/954). It uses webpack and does a lot of work for you. You will see that it opens many new possibilities and it is just much easier to develop with it.

---

_[View the full topic](https://phaser.discourse.group/t/phaser-3-real-time-multiplayer-game-with-physics/1739)._
