geckosio / phaser3-multiplayer-game-example

Phaser 3 multiplayer game example using geckos.io
MIT License
131 stars 31 forks source link

Use arcade-physics instead of @geckos.io/phaser-on-nodejs #20

Open yandeu opened 1 year ago

yandeu commented 1 year ago

We should replace @geckos.io/phaser-on-nodejs with arcade-physics.

Quitalizner commented 1 year ago

@yandeu. Hmm, I'm actually working on a game which uses Physics. Maybe I can update this. I do have a follow up question. Why aren't there any typescript examples using Geckos.io Also why is everything a Mono Repo? Would be great if the client and server were separated out.

yandeu commented 1 year ago

Is there a need for a typescript example?

Why not using a mono repo? It's easier to use.

Quitalizner commented 1 year ago

Some people are not very used to the concept of mono repo. And a typescript example would actually help, since there are C++ packages such as node_datachannel being used. Which cannot be bundled together, someone not very experienced might give up at this step when they try to compile.

To hit two birds with one stone, a separate repo for client and server built using typescript would help. I have it ready, you could just create the repos and I will make the PR

yandeu commented 1 year ago

Wait, we are talking about this (https://github.com/geckosio/geckos.io) repo, right?


If we are talking about the repo phaser3-multiplayer-game-example, for simplicity, I suggest the following:

Quitalizner commented 1 year ago

My apologies, my comment should have been on geckos.io I'm talking about geckos.io examples

yandeu commented 1 year ago

Ok

I will take the time this week to update THIS example and this (https://github.com/yandeu/phaser3-multiplayer-with-physics) as well.

But those are not really mono repos, since they contain only one app, unlike the geckos.io repo which contains 3 different npm packages. So I will keep both phaser example in one single repo.

Quitalizner commented 1 year ago

That'd be great. Thank you

yandeu commented 1 year ago

I just updated some thing and now the example works again.

The other repo: I decided to archive it.

But still, replacing @geckos.io/phaser-on-nodejs with arcade-physics is probably a good idea.

Quitalizner commented 1 year ago

Sure, thank you very much. It's hard to decouple arcade physics from phaser. I asked around in the forums. They suggested not to use phaser headless just to run physics on the server side. I'm working on a platformer which uses tilemaps. Even still they didn't recommend it. But this example is still great for learning and as a starting point for peer-to-peer mutliplayer