Code Monkey home page Code Monkey logo

gzdoom-discordrpc's Introduction

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.

gzdoom-discordrpc's People

Contributors

phate6660 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gzdoom-discordrpc's Issues

Want a game or mod to be supported? Let me know here.

As the title says. Currently the program only supports games with DOOM in the title, and Project Brutality.

On top of that, there are only icons for DOOM, DOOM II, The Ultimate DOOM, and Project Brutality.

So if there's a game or mod missing that you really like, let me know! I'll keep this top comment updated with a list.

thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', src\main.rs:35:24

I have set the engine to GZDoom (since that's what I'm using), and every time I try to boot the RPC exe, it spits out this error and exits.
After some further testing, this only seems to happen with Snap the Sentinel (a GZDoom game). As for Doom and Doom II (my other two games), this only seems to happen in the title screen (which is bound to happen considering the instructions state to load into a level for the script to work).
I'm almost sure it's just the game not being supported by the script, but I wanted to post this issue anyways to see if there's any fix, or if you could possibly add support to said game.

can't tell the difference between gzdoom and firefox

Engine: GZDoom
Game: [3.3!] FINAL DOOMER +
Level: ZDoom โ—ฆ View Topic

(I haven't gotten it to work properly with GZDoom itself, so this caught me off-guard at how incorrectly it did the thing. Yay, scripting.)

Out-of-bounds issue?

I get this error whenever I use it with GZDoom:

> gzdoom-discordrpc.exe gzdoom
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', src\main.rs:35:24
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.