GithubHelp home page GithubHelp logo

dongo-s / netinput Goto Github PK

View Code? Open in Web Editor NEW

This project forked from usertoroot/netinput

0.0 0.0 1.0 38 KB

NetInput is an easy way to send (stream) gamepad input over the network with low latency.

License: BSD 3-Clause "New" or "Revised" License

C++ 51.76% C 48.24%

netinput's Introduction

NetInput

NetInput is an easy way to send gamepad input over the network with low latency. It supports up to 4 gamepads at a time. The program assumes a single source and a single receiver. Ideal in a setup where you have a display out but no way to access USB to plug in a gamepad.

The Capture program will ask for your target computer when starting up, if you do not want to be prompted every time please create a file called "target.txt" with the target computer ip and the port number as its contents.

For example:

192.168.1.31
4313

For the Player, to select a custom port is neccesary to create a file called "port.txt" with the port number. For example:

4313

Local Setup Guide

  1. Install the requirements
  2. Run the Player on the computer you would like to send the gamepad input to, if you want a custom Port number, create the "port.txt" and define the port.
  3. Figure out the IP address of the computer running the player (open up terminal and type ipconfig)
  4. Create a file called target.txt in the same folder as the Capture program on the computer you would like to capture the gamepad input from and insert add the IP of the computer running the Player in that file and the Port number
  5. Run the Capture program on the computer you would like to game the gamepad input from
  6. Enjoy!

Over The Internet Setup Guide

  1. Install the requirements
  2. Run the Player on the computer you would like to send the gamepad input to, if you want a custom Port number, create the "port.txt" and define the port.
  3. Figure out the remote IP address of the computer running the player (https://www.whatismyip.com/) and forward the required port (UDP default:4313) on your router
  4. Create a file called target.txt in the same folder as the Capture program on the computer you would like to capture the gamepad input from and insert add the IP of the computer running the Player in that file and the Port number
  5. Run the Capture program on the computer you would like to game the gamepad input from
  6. Enjoy!

How It Works

The Capture program iterates all gamepad states using XInput every 1ms (to reduce CPU load) and if the gamepad state has changed it sends the raw gamepad state to the Player over UDP along with the gamepad index.

The Player will see if a gamepad with that index is connected. If not, a new virtual gamepad is created. Once the virtual gamepad is available the gamepad state is updated to mirror the gamepad state of the Capture side.

Requirements

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.