Phate6660 / gzdoom-discordrpc

DiscordRPC for GZDoom, written in Rust.
Other
13 stars 2 forks source link
discordrpc gzdoom rust

gzdoom-discordrpc

license

A discordrpc client for ZDoom written in Rust.

WIP(?) cross-platform support. It works on Linux and Windows, still need to test on MacOS. Use at own risk and all that yada yada.

I'm making this because:

  1. I could not find a pre-existing DiscordRPC client for it
  2. This is something I would actively use, which would make developing it that much more fun
  3. I can actually visualize how I would go about it, unlike most other projects where I feel blind as a bat

How it works

  1. Program reads first argument
  2. Program connects to Discord via RPC
  3. It then looks for a doom process based on supplied argument, and parses it's window title ("level - game/mod")
  4. It is separated into an &str vector
  5. The icon will be the logo for the game/mod, the status will be the level, and the hover text will be the game/mod
  6. Program loops every 15 secs, looping every second would be overkill

Running

  1. First make sure that GZDoom or LZDoom is running, if using GZDoom make sure to be inside of a level.
  2. Download a prebuilt binary from the releases section.
  3. Open a terminal (on Windows, CMD or PowerShell should work just fine) then...

ENGINE = gzdoom or lzdoom

Linux: chmod +x gzdoom-discordrpc, then ./gzdoom-discordrpc ENGINE

Windows: .\gzdoom-discordrpc.exe ENGINE

From source:

  1. git clone https://github.com/Phate6660/gzdoom-discordrpc
  2. cd gzdoom-discordrpc
  3. cargo run -- ENGINE

Screenshots

DOOM:

DOOM

DOOM (with LZDoom):

DOOM

DOOM II:

DOOM II

Project Brutality:

Project Brutality

TODO

  1. Rename project to zdoom-discordrpc, that way it makes more sense.