An android client app that uses its accelerometer to control cars in NFS MW 2013 video game for PC.
Need For Speed Most Wanted 2013 Remote Controller
This repo consists of the python server that is needed to run on the PC and the android client that sends accelerometer data to the server that uses the data to control the cars.
Concepts used here
- Socket programming
- DirectInput/DirectX Input using Python
- Real time reading and sending of accelerometer data
How it works
- First a server is created using python start-server.py which creates a socket.
- Start the android app and enter the ip and port number of the server.
- Real time accelerometer data is sent to the server.
- The python program takes the input from the accelerometer and uses some defined logics to move the car or control the game using DirectInput scan codes.
- Python 3
Features included as of today
- Sensitivity factor that can be different for different users and cars can be easily set by user.
- Tilting the phone totally towards the front or back causes the car to use nitro or handbrakes respectively.
- Game menu can easily be accessed from the phone.
- Phone's screen brightness can be brought down to zero on one click.