Git Product home page Git Product logo

audiosurf-rpc's Introduction

audiosurf-rpc

Discord Rich Presence for Audiosurf in the form of a DLL. No seperate program, DLL injector or any other stuff required.

Also has an integrated WebSocket server that other programs can use to get info from the game!

Installation

Download the latest version from the releases page. Open Audiosurf's engine folder and then enter the channels folder (on a normal install it's at C:\Program Files (x86)\Steam\steamapps\common\Audiosurf\engine\channels), copy all the things from the release's .zip into there and allow Windows to overwrite the existing files.

All that's left to do is launch the game! If a command line window opens while the game is loading, that means you installed audiosurf-rpc correctly! Have fun!

How does it work?

It uses a proxy DLL (that's the Crypt.dll) made with wrap_dll to load together with the game.
From that proxy DLL, it loads the real Crypt.dll from the game (real_Crypt.dll), discord_game_sdk.dll and audiosurf-rpc.dll, the mod itself.
Then audiosurf-rpc hooks a TagLib function (the game uses that to get the tags of the audio file) that fires everytime a song is selected and stores the title and the artist.
It also hooks Windows' SendMessage API to get outgoing messages from Audiosurf's WM_COPYDATA API and registers the game to itself as soon as possible with the quickstart register command (doing this because I don't have to/can't watch for incoming messages, just outcoming ones).
It changes the presence based on the messages it gets from the game with the difference that it doesn't use the tag data from the WM_COPYDATA messages, it uses the ones from TagLib because those support unicode, have proper capitalization and don't break randomly. The game sends messages everytime the player enters the character select screen, starts playing a song or when they finish a song. That's how the mod knows what the player is doing.

audiosurf-rpc's People

Contributors

rubberduckshobe avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

audiosurf-rpc's Issues

Audiosurf-RPC Activity stays on "Loading" on Discord

Hi, I'm running the latest release version of audiosurf-rpc but the rich presence on Discord fails to update when choosing a mode or while playing a song. The dll clearly is capturing the song names that Audiosurf sees. The Rich Presence simply fails to switch to a mode that allows it to display song info.

image

If it's of any use to debug this, the only way I could get audiosurf-rpc to work was by copying all the files in the release zip to the channels folder inside of the Audiosurf folder (or C:\Program Files (x86)\Steam\steamapps\common\Audiosurf\engine\channels) and then creating a second channels folder inside of there with the Crypt.dll included in the zip file.

image

Song/Artist information not shown in rich presence

Recent updates to Audiosurf might have broken something relating to how the artist name and song title are captured and reported for rich presence. They seem to be caught but not reflected in the status, though I did notice the song title being captured after it looks to be set with default variables.
Re-playing the song after does not seem to change anything. Clean reinstalled also via steam's file integrity check along with latest version of audiosurf-rpc and issue persists.
QuestViewer_2023-03-03_22-39-32
image

Does not work.

When doing an install of the RPC, doing it in the engine folder does not work.
I also tried installing the RPC in the channels folder. It brings up the Command Prompt, but then immediately shuts down.

Is there an issue with what I'm doing or is it the RPC?

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.