Giter VIP home page Giter VIP logo

jampresence's Introduction

Jam Presence

Let the others know you're jamming right now!

Summary

JamPresence is a SDK to broadcast your O2Jamming activities into Discord via Rich Presence.
This can be useful for your custom game launcher of your private server and can be combined with offline server / emulator as long they use unpacked OTwo v1.8 client.

This project is my debut in Reverse Engineering, some basic RE techniques was involved during collecting necessary addresses to make this work done.

Usage

  1. Build the project
  2. include the include folder and add Presence.hpp into your code and link necessary file into your project.
  3. Instantiate Nx::Presence class and keep calling Update() while the game is running

Example Code:

#include <Presence.hpp>

int main()
{
    // Initialize presence client
    auto presence = Nx::Presence();

    // Best to do this in separate thread instead
    while (true)
    {
        // Update the presence to update game state from client
        presence.Update();

        // Additionally you can query game state from presence object
        auto state = presence.GetPlayerState();
	
	// Do something with state..
	// std::printf(state.Chart.Title.c_str()); // e.g Bach Alive
	
	// Let's not take the entire cpu
        Sleep(100);
    }

    // Clear the presence of jamming
    // Note that the presence will be cleared as well if the instance is destroyed
    presence.Clear();
    
    return 0;
}

Notes

By default, engine will make an attempt to look for window handle (hwnd) with O2-JAM winclass, which is default value of O2Jam title bar. Once the window handle acquired, it will look for OTwo.exe module in the corresponding process of window handle.

Therefore, the engine will failed to start if these parameters was altered in original game client. You can specify this winClass and moduleName upon initializing Nx::Presence class.

Game client that packed and / or compressed by compressor such as upx will not work against this presence engine.

License

This is an open-sourced library licensed under the MIT License

jampresence's People

Contributors

sirusdoma avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

kenzync

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.