Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/sam-k0/gmrpc-legacy

Use Discord Rich Presence in your GameMaker games!
https://github.com/sam-k0/gmrpc-legacy

discord-rich-presence discord-rpc gamemaker gamemaker-studio gamemaker-studio-2 gamemaker-studio-2-3 gml

Last synced: 11 days ago
JSON representation

Use Discord Rich Presence in your GameMaker games!

Awesome Lists containing this project

README

        

# GMRPC-legacy
Make your GameMaker game stand out with Rich Presence!
*DOCUMENTATION HERE:* [click](https://github.com/sam-k0/GMRPC-legacy/wiki/GMRPC-functions)

*Make sure to check out the 'sigma' branch. New features are tested there.
Up-to-date builds can be found in bin/Debug*

# Features
- Show your game's name on the player's discord profile
- Set custom text and images to show
- Set timestamps
- Get the local discord user's (public) information
# Setup

## Get the Thing
Download the latest [release](https://github.com/sam-k0/GMRPC-legacy/releases/) here.

## Import the gmz in GameMaker
Extensions -> Import (Drag and Drop onto the GMS window *may* work too)
## Use it in code

- The first function you want to call is **gmrpc_init**(*AppID*).
- The AppID is obtained on the [discord developer](https://discord.com/developers/applications) page.
- I assume you already have your Game / App set up on Discord's side.
- After that, you can set the presence with gmrpc_setPresence(...)
- Snytax: **gmrpc_setPresence**(*state, details, largeImage, smallImage*)
Where:

|parameter| description |
|--|--|
| State|is the state text displayed on the user's profile |
|Details| are the details displayed on the user's profile|
|largeImage|is the large image displayed on the user's profile|
|smallImage|is the small image in the bottom right corner of the large image|

## Free the DLL
Make sure to exit Discord if you don't need it anymore.
- To do this, call gmrpc_exit()

This will unload the "discord-rpc.dll" from memory.