hewiefreeman / GopherGameServer

:trophy: Feature packed, easy-to-use game server API for Go back-ends and Javascript clients. Tutorials and examples included!
https://hewiefreeman.github.io/GopherGameServer
Apache License 2.0
173 stars 21 forks source link

C++ client API #3

Open hewiefreeman opened 5 years ago

hewiefreeman commented 5 years ago

A lot of games are programmed primarily in C++, so a C++ client API would be a very nice addition to the list of official GGS client APIs. This is open to anybody who would like to contribute, and is at least an intermediate C++ developer.

You will retain full rights to your code and it's license type, and will receive credits on the GGS's main page, as well as a link to your API.

If you're willing to take this project on, let me know and I'll give you all the info you need to get started with any guidelines you need to stick to. Thank you for your interest in contributing to Gopher Game Server!

apurvupadeo commented 5 years ago

@hewiefreeman I am a beginner in open source community and would like to start contributing. I have worked with cpp before and I really want to work on this. Let me know if I can contribute!!

hewiefreeman commented 5 years ago

Of course you can! Do you have any experience with WebSockets and writing C++ libraries/APIs? That's pretty much all you need to know to get started other than some server specific JSON formatting.

Though I would suggest us chatting or talking on Discord before you dive into it. There are a few things about the server that are very strict, and may become a pain if you don't know about them.

Shoot me an email with your Discord or Skype name.

unkemptArc99 commented 3 years ago

@hewiefreeman - I am also a beginner in OSS community. This project is very interesting to me and I would like to contribute to the same. I have worked with C++ before and have developed libraries/APIs before. WebSockets would be a new concept for me, but I am highly excited to work and learn about networking internals. Let me know how I can help :)

Please feel free to reach out to me on Discord. I have sent you my Discord username through LinkedIn (apologies if this way is more intrusive for you. I could only see your LinkedIn profile as a way of communicating).

hewiefreeman commented 3 years ago

@unkemptArc99 Thanks for your interest in contributing! I think a good place to start would be to find a good C++ websocket client library, and make sure you can connect to an instance of GGS with it.

It would also be very useful if you knew javascript so you can look over the JS client and base your C++ one off that. Is that something you're confident with?

unkemptArc99 commented 3 years ago

@hewiefreeman - Definitely, I am currently working on just going through the wiki. And I will make my first task to connect a cpp execution to an instance of the GGS (I will possibly go for localhost server setup and then try to connect the same from the cpp program by hardcoding connection values).

Please do forward me the JS client. I will be happy to have a look through it. I have some experience with JS.

hewiefreeman commented 3 years ago

@unkemptArc99 sounds like a good plan! The JS client is linked in the readme under the Client APIs section (its the only client so far). Let me know when you are starting, and I can help get your client connected to the server. GGS only accepts responses that comply with it's message format, and can be a little confusing at first.

unkemptArc99 commented 3 years ago

@hewiefreeman Is there a doc on the message format? If so, please forward the link to me. If not, I think I can work on that as well when I am trying to make the API 😊

unkemptArc99 commented 3 years ago

@hewiefreeman - Somehow I am not able to handshake with the gopher server for setting up the websocket connection through the CPP program. The error I am getting is this - libc++abi: terminating with uncaught exception of type boost::wrapexcept<boost::system::system_error>: The WebSocket handshake was declined by the remote peer

On the other hand, I set up a sample Python websocket server (just to test if I am not doing a goof-up from cpp side), and that was working well - I was able to handshake with it, send data, read data.

I am trying to handshake at the "/" path. Is there something I am doing wrong? Or are there any server settings that I have missed?

The code I am using to connect is based on Boost C++11 websocket APIs and is located in the test directory of https://github.com/unkemptArc99/ggsCppClient. The example gopher server code is located in the testAssets/golang directory. I am trying to model your chatRoom example in JS client repo with the CPP execution.

Edit: Also, I feel it will be better to communicate over IM rather than the issue page. Or else it will make things messier. 😄

hewiefreeman commented 3 years ago

@unkemptArc99 Sorry it's taken so long for me to get back to you! That's weird that the CPP lib won't connect, but Python does. Are you using SSL on one but not the other? Anyway, I think Discord would be a good way to show me what's going on. Do you use Discord, if so what's your handle?

saudch007 commented 1 year ago

@hewiefreeman I am a C++ enthusiast. Currently, understanding your project. Just do let me know if its still available for contribution?

hewiefreeman commented 1 year ago

This project is always open for contributions. Have you looked over the docs and wiki? Do you know javascript? If you do, it would be good to look over the javascript client API as well

akhateeb22 commented 9 months ago

@hewiefreeman hello, I'm a DevOps Engineer and I can help with DevOps things and In Go and Javascript, Could you please guide me where to start?