-
-
Notifications
You must be signed in to change notification settings - Fork 25
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 / Question #11
Comments
That is a really interesting idea, but I am afraid that it will take a lot of time as there are a lot of functions to implement. So if you want to try it yourself, here is a short guide on how to set up a development environment:
If you encounter any problems with this setup, please tell me and I will try my best to help you revolve them. I know that this guide is pretty messy, so don't hesitate to ask if you have any questions or something isn't clear :) |
I've got it building using cmd, I just couldn't really figure out how to implement new functions - haven't exactly created Java bindings for the Game SDK before. The files (e.g. this) aren't exactly the easiest to understand at first glance, and so I was having some slight issues in trying to figure out how it was implemented so that I could add the lobby functionality. |
Ah, I see. The main idea is that the "normal" Java functions call native C functions which then call the Game SDK. For callbacks it works exactly the other way around: The SDk calls a provided C function which then calls a Java function. This for example happens in line 35. Another thing that needs to be done by the native library is converting between C structs and Java objects. That e.g. is what Another confusing thing might be this I hope this could help a bit to get a general overview. |
I made a little example of how I would implement those functions: If you want to work on it, maybe just fork and use the I also hope that this example is a little easier to understand than the messy relationship code. If you don't want to work on it or don't have time to get into my messy code, just tell me, so I will work on implementing the functions. |
Ok, I've implemented most lobby functions now (see https://github.com/JnCrMx/discord-game-sdk4j/tree/lobby-stub). |
Sorry for closing, it was a misclick. I will keep it open until I'm done with lobby and networking functions. |
Thank you for helping with this - I didn't really understand the conversion, but am incredibly grateful for your continued help in using this SDK. |
Update: I'm currently working on the Javadoc for Lobby functions, but I have finished implementation for Lobby as well as Network bindings. If you want to test/use the new functions right away, either checkout |
I'm done with the documentation for the Lobby functions now. It took me a lot longer than I expected though. |
Thank you for helping so much with this - it means a lot, and I hope I can somehow make it up to you in future! |
Hi,
Would it be possible to add lobby features or networking? I believe they're documented in the Game SDK documentation and would make life a lot easier. If this would take too much time, please could you point me in the direction of adding them - I have tried to compile the library on my own using the latest Game SDK, to no avail.
Thanks! :)
The text was updated successfully, but these errors were encountered: