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

[Feature Request] Tutorial of Nakama-JS integration with Boardgame.io #36

Open
crypto-rizzo opened this issue Nov 5, 2018 · 10 comments

Comments

@crypto-rizzo
Copy link

As of now I think the introductory docs are a little sparse, especially for newer developers. I think it'd be great a way for the community to see first hand how Nakama would be implemented with another framework. I think BoardGame would be a good fit since its UI agnostic (among other things)

I'm actually trying to doing this myself but I just wanted to open up a dialogue here in case anyone had any advice or suggestions for getting started.

@novabyte
Copy link
Member

novabyte commented Nov 6, 2018

Thanks @camus-code. This is a great idea but I'll see what I can do to assign an engineer to put an example together. What difficulty have you had so far with Boardgame.io?

@crypto-rizzo
Copy link
Author

@novabyte Thanks for responding man! To be honest I find Boardgame.io rather straightforward. The problem I have, though, is figuring out how exactly to fit Nakama inside of it.

Basically, I have a simple multiplayer example built from the multiplayer docs. From what I understand, it's just using a simple Node.js server to host the game master. Is this where Nakama would come in?

@novabyte
Copy link
Member

novabyte commented Nov 6, 2018

@camus-code Yep absolutely. Nakama takes the place of the server API which is here:

https://github.com/nicolodavis/boardgame.io/blob/master/src/server/api.js

It's changed a fair bit since I last looked but you can see the familiar create/join/leave/etc functions which Nakama also has. Now it looks like they maintain some state on the server now which I'd recommend our authoritative match handler to achieve if you want although I remember they also supported client relayed convergence of game state as well.

@crypto-rizzo
Copy link
Author

@novabyte Ok sweet thanks so much for a link pointing me in the right direction. There's just a lot going on in both the codebases so it's a little difficult for me to parse through. I should have some free time this week so hopefully I'll be able to get something going in the meantime.

Just to be clear, I would basically try and replace the server API code with the code from the JS client guide? https://heroiclabs.com/docs/javascript-client-guide/

@crypto-rizzo
Copy link
Author

Just keep me posted if you have any dialogue with your team about this issue @novabyte ! Thanks again for your interest in the idea

@nicolodavis
Copy link

Just chiming in: boardgame.io supports pluggable transport adapters. This is the current implementation that talks to the boardgame.io server component. Another adapter that talks to Nakama instead can be added (and I'm happy to bundle it in as an official integration if it works well).

@novabyte
Copy link
Member

@nicolodavis That would be great to build an official adapter for Boardgame. I'll see if one of the client team can tackle it ahead of Christmas. 😄

@crypto-rizzo
Copy link
Author

@novabyte Really glad this is coming together like this. Keep me updated on any developments or if you need an extra pair of hands for some of the code 👍

@crypto-rizzo
Copy link
Author

@novabyte Hey man, just wanted to check in and see if there's been any progress made and see if I can assist in any way. I know this is a super busy time of the year, so no worries at all if not.

@mofirouz
Copy link
Member

mofirouz commented Dec 2, 2018

Hi @camus-code - no progress has been made on this yet. You'll see activity on this ticket as soon as we've had the chance to investigate further.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants