Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
yandeu opened this issue Dec 19, 2022 · 9 comments
Open

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

yandeu opened this issue Dec 19, 2022 · 9 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@yandeu
Copy link
Member

yandeu commented Dec 19, 2022

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

@yandeu yandeu added enhancement New feature or request help wanted Extra attention is needed labels Dec 19, 2022
@Quitalizner
Copy link

@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
Copy link
Member Author

yandeu commented Dec 21, 2022

Is there a need for a typescript example?

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

@Quitalizner
Copy link

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
Copy link
Member Author

yandeu commented Dec 21, 2022

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:

  • Using socket.io instead of geckos.io
  • Using arcade-physics instead of @geckos.io/phaser-on-nodejs
  • Instead of re-writing it in TS we could simply use the @ts-check attribute.

@Quitalizner
Copy link

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

@yandeu
Copy link
Member Author

yandeu commented Dec 21, 2022

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
Copy link

That'd be great. Thank you

@yandeu
Copy link
Member Author

yandeu commented Dec 21, 2022

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
Copy link

Quitalizner commented Dec 24, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants