Phaser 3 - Real-Time Multiplayer Game with Physics

That’s useful, thank you very much!
I already tried to setup a project with webpack-dev-server + nodemon, but with no effect… :frowning:
I guess it’s still because I don’t fully understand how it works yet, i’ll give it a try later since now i’m ok with working only with nodemon.
Thanks again yannick :slight_smile:

1 Like

New Multiplayer books is 95% complete and will be available soon on Amazon.

I have a new “discounted” set of books on https://www.smashwords.com/books/byseries/45986 which will include the Multiplayer books

Affiliates earnings are available.

This is absolutely brilliant! Thank you so much for posting this and for sharing your well written and readable code!

2 Likes

Thank you so much for your comment. I really appreciate that :slight_smile:

I just publish another great real-time multiplayer example. Take a look at topic #6076

hi, your example is great thanks.

But i have a question : how do you store values on the game ?
I would like to make a multiplayer game but i need to store +/- 20MB of data shared with all the players.

How do you proceed ?

20MB!? That’s a lot? What’s all that data?

I would simply use a database. MongoDB for example?

Hi Yannick,

If my game works very well on the playstore (always be optimistic), my database contains thousands of x and y positions and some others parameters to replay games that have not been solved by other players.

If you have a good example about mongodb I’ll take it :slight_smile:

MongoDB is easy to use. You will find a lot of tutorials online.

Suddenly a free MongoDB database was deleted from Heroku: mLab MongoDB Add-on Discontinued: The mLab team has discontinued their MongoDB add-on. The mLab MongoDB add-on will be removed from all Heroku apps on November 10, 2020. A free version of MySQL has the limit - 5MB. But I found a way for myself - I use SQLite. You can install it like this: npm i sqlite3. Start learning here: SQLite Node.js Tutorial

Thanks for sharing your example. It takes 10 seconds to run.

1 Like

There is still a free MongoDB available called Atlas: MongoDB Atlas Database | Multi-Cloud Database Service | MongoDB

Can we use it from Heroku? I think we cannot. I mean that Heroku had a free MongoDB but now it has not.

Yes you can. It does not matter where your MongoDB server is hosted.

1 Like

Using SQLite on Heroku is very bad idea. Heroku deletes it every 24 hours: SQLite on Heroku | Heroku Dev Center

Great works. But I got some problem when run your example. It crashed after sometime or when I start new window to play new game or close window. Could you check back on Github the issue?