Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/game_sdk/SDK_Starter_Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,21 @@ Make sure you've got `core->RunCallbacks()` going every frame!

You're ready to go! Check out the rest of the documentation for more info on how to use the other pieces of the SDK. See an example of everything it can do in `examples/cpp/main.cpp` in the SDK zip file.

## Code Primer - Unreal Engine 5 (Cpp) Plugin

For a complete example of a reusable UE5 plugin that you can use for your UE5 project,
see this free, MIT licensed sample project:

[https://github.com/XistGG/DiscordGameSample]()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I disagree with the discord documentation relying on your repository to exist.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

third-party repositories should go in the Community Resources page

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you both for your comments.

My intent in creating the example repository was to help the community. I spent a few days doing so and making it a complete, functional example that compiles and runs, complete with a lot of documentation and code comments.

If you don't want to link to an external repository, perhaps consider forking the repository into Discord's GitHub such that you are not reliant on a third party. The entire repository is the usage documentation. The high level overview is contained in the README.md in the root.

The primary purpose of this PR is to inform the Discord devs of this new, complete, working example of how to use the Discord GameSDK in a UE5 project.

If Discord wishes to keep the current poor quality of documentation relating to integration of GameSDK into UE, then that is fine by me. If on the other hand they wish to reference some or all of the example project I created, then they are welcome to do so in whatever way makes the most sense to them.

I am not a Discord dev, I am not being paid by Discord and I have no interest in spending time writing docs for Discord. I am a UE5 educator building UE5 projects to teach others how to do so. I will keep the README updated if/when changes are needed in my own repository.

Please feel free to use it or not, reference it or not, however you think is best. Do know that your current documentation for UE4 is not at all good and not at all functional, so to think you have something worthwhile at the moment would be a mistake.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If Discord wishes to keep the current poor quality of documentation relating to integration of GameSDK into UE, then that is fine by me. If on the other hand they wish to reference some or all of the example project I created, then they are welcome to do so in whatever way makes the most sense to them

Your judging the quality of the documentation without improving it. On top of this, your project is far from perfect too, and I have many points to make about your project (sorry to say).

In my opinion, as someone who actively works with Unreal Engine on a daily basis, this plugin is far from well-made to be listed here. It's too hardcoded, you've put Discord's includes in the plugin's source folder rather than the ThirdParty folder (remember, you DO NOT own Discord's headers, you should have them in the ThirdParty folder), and you're distributing files in your project's repo that are useless.

Whilst i've never taken a look at the docs for the Discord GameSDK, i'd highly advise that if you're going to constantly state that it's "not at all good and not at all functional", you look at maybe changing that rather than giving a project that isn't to a good standard either.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the constructive criticism. It is true that the sample project isn't perfect and there are a number of ways to improve it.

It is also true that the current docs are at least an order of magnitude worse, and the sample is a massive improvement over it.

If your argument is that the current docs should be kept because the significantly-improved sample isn't perfect, then that does help to explain why the Discord SDK docs are so bad and seemingly unlikely to improve.

There is nothing hard coded in the sample project except the UCustomDiscordGameSubsystem, which if you had bothered to read the README you would know that it is intended to be completely discarded and replaced with your own custom subsystem that implements whatever behavior you actually want for your game. As the README very clearly states, the reusable and interesting parts are in the DiscordGame plugin, in which nothing is hardcoded and everything is fully documented.


The above repository shows the correct structure for storing the Discord GameSDK
in a reusable ThirdParty module, loading that module at runtime and actively managing
the connection to Discord while your game is running.

Architecturally it provides a `Discord Game Subsystem` that you can use as a base.
Build your own derived subsystem off of it to gain access to the entire
Discord GameSDK.

## Code Primer - No Engine (Cpp)

In your project folder, you'll want to make something like a "discord-files" folder, for organization. In that folder, copy all the `.h` and `.cpp` files from the zip.
Expand Down