Coder Social home page Coder Social logo

teamclouday / androidsteering Goto Github PK

View Code? Open in Web Editor NEW
25.0 4.0 7.0 3.54 MB

Use your Android phone as steering wheel for Windows games

License: MIT License

Java 38.39% C# 61.61%
vjoy android gamecontroller bluetooth windows wpf-application

androidsteering's Introduction

Android Steering Wheel

Use your Android phone as a steering wheel for Windows PC racing games
Also a potential Xbox controller emulator


Requirements

  • Android mobile phone with bluetooth (or Wifi)
  • Windows PC with bluetooth (or Wifi/LAN)
  • If bluetooth, phone and PC should be paired once
  • If Wifi, phone should be under same network as PC (e.g. connect to same router)
  • vJoy driver installed on PC

How to Use

vJoy Driver
  1. Make sure no physical controller is attached
  2. Download vJoySetup.exe from vJoy sourceforge and install (Recommended to check all 4 programs)
  3. Make sure no other program is capturing controller (e.g. Steam)
  4. Launch Configure vJoy and configure the device as following:
    vjoy configuration
Android App
  1. After installing apk on Android phone, tap upper left corner to see all options
  2. Connection modes:
    1. Bluetooth requires the phone to enable bluetooth and has already paired with target PC at least once
    2. Wifi/LAN requires the phone to connect to the the same local network as Windows PC
      To connect, enter the same IP address displayed on PC app
      If connection failed, check if Windows PC firewall is blocking the app
  3. Control options:
    1. Default: phone motion controls both acceleration and steering
      Two changing numbers [left indicates horizontal angle (Roll), right indicates vertical angle (Pitch)]
      See Android README for more information
    2. Alternative: phone motion only control steering
      Acceleration is controlled by pressing LT / RT
      Used if default mode is too hard to control
    3. GamePad: no steering is enabled, but has more buttons
      Used to control the rest of a game (such as menu, car view, etc.)
Windows App
  1. Install Windows application
  2. Minimizing the app will hide app to system tray (with a notification)
  3. Left textbox contains all essential program notifications
  4. Be sure to check information in textbox that vJoy controller is initialized correctly and valid device is found
  5. To connect to phone:
    1. Select correct connection mode
    2. Tap Connect button
    3. Server will start listening
    4. Tap Listening will stop server
    5. If connected, tap Connected will disconnect device and stop server
  6. Controller button leads to the xbox controller mapping page
    It is used to map buttons and stick axis in a game or steam when vJoy controller is not recognized or has wrong settings
  7. Configure button opens the motion angle configuration window "Steering Angles" control the left and right limit of the steering wheel angle (in degrees) "Acceleration Angles" control the forward and backward limit of the phone angle for acceleration "Acceleration Angles (Rest)" is also for acceleration, but defines the range of angles where phone is considered at rest (no acceleration)

Finally, the first run of Windows app after installation may be slow or not responding.
This is because the app will need to be initialized for the first time, a well-known issue of ClickOnce deployment.
In this case, close the app and open again.


For Games

By default, vJoy will use settings of xbox controller, for most modern games. Make sure to tweak in-game steering settings, because most games have been using stabilization algorithms to smooth out the steering axis input. Some may result in a lagging of steering, others may make steering extremely slow or fast.

See Game Steering Wheel Settings for more details.

Game Play Demos

Feature Plans

  • Motion angle restoration (stable and natural steering control)
  • Angle limits configuration
  • Steering angle range supports -180 to 180
  • Slider bar on phone for LT/RT controls
  • Memorized user settings
  • Connection under same network (does not have to be Wifi hotspot)
  • Fully implemented Xbox controller emulator
  • Force feedbacks

Releases

Pre-built installers can be found here


Screenshots

Android Side

phone1

phone2

phone3

phone4

phone6

Windows Side

pc1

pc2

pc3

androidsteering's People

Contributors

teamclouday avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar

androidsteering's Issues

AndroidSteering not working with vJoy / Forza Horizon 5

Hello, first of all thanks a lot for this project, it's nice that this exists.

I tried installing AndroidSteering to use my phone as a steering wheel for Forza Horizon 5:

  • I installed vJoy with your recommended settings
  • I installed the Windows app, with my computer connected with Wifi (ethernet didn't work and showed server ip 127.0.0.1), and started the app (listening)
  • I installed the Android app (Wifi to the same router) and connected to the server. The server correctly shows the client connecting, with the client's ip displayed.

So it looks like everything is properly connected, but I'm not sure how to use the buttons or the steering in-game.
I have tried the three modes, steering (default) / (alternative) / gamepad.
Nothing happens on my computer when I press the buttons in the Wheel app on Android.
I tried to customize the commands in Forza, but I don't see anything happening here either when I press the buttons on Wheel.
I also tried going into the game controller settings in Windows, where the vJoy device is correctly listed.
There is a tab to test the device, but again nothing happens when I press the buttons on Wheel.

By the way, what is the Configure button for in the Windows app? This opens a gamepad, but nothing happens when I press the buttons.

Thank you for your help!

Published release build issue

The app works fine in Debug/Release mode from Visual Studio, but the published & installed app shows a HUGE latency.
This is not the expected behavior and is blocking future releases.

The following steps need to be done:

  • Debug the installed app from Visual Studio
  • Analyze the build settings in publish mode
  • Read any thread-related code, especially the mutex and shared variables.

Use virtual gravity sensor instead of accelerometer

Hello,

the app itself works really well, but there is one thing that makes it hardly usable for me:
You are querying the accelerometer to determine the steering angle, which means that any lateral acceleration of the phone will cause a change in the steering angle.

An easy fix for this is to use a different sensor like Sensor.TYPE_GRAVITY, which is a fusion of the acceleration and gyroscope sensors (And possibly more sensors) and returns an estimated gravitational acceleration vector. It's only a two line change to apply this change, see my pull request for the BeamNG remote controll app, which had the same issue.

This fix should make steering feel much more "direct".

Improve UI and controls

Current UI is ugly, need to improve it.

The control in 4 directions is not accurate enough, need to redesign it.

I need help

I couldn't figure out how to open the phone app. Can you help me?

Feedback

Hi! I used 900sterringwheel to make a DYI steering wheel with throttles and shifter. The problem with that app is if I move the wheel to fast (eg.: in drifting games) it doesnt register a full rotation. if Im at +360 and I want to go fast at 0, when I reach 0 it still shows +360. the app will not see any update and I can`t find a source code so I searched for something similar. I found this app and it works great. I suggest you to add more degrees (a button to change the degrees in android or windows), custom sliders for any axis in vjoy and custom number of buttons. I would do it if I knew how to do it XD.
This is the video of the Steering wheel I made: https://youtu.be/1qAqadeEioU

Analog Sticks?

Nice little tool!

I am trying to use this with RPCS3 as a second controller, the left stick works as expect but the right is centered at the bottom left causing e.g. the camera to deadlock rotate:

rpcs3

furthermore where are the GamePad Analog Sticks?
Oddly LT/RT seem to control the X/Y axis of the right stick in that mode:

sticks

Cheers

Socket packet design

TCP protocol guarantees the delivery of each data packet, so there is no need to add a data pack separator like 10086.
Performance should be further improved if separator check is removed.

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.