Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon


29. April 2012

 

 

One of the most bizarre things missing from the PlayStation simulator was support for analog imagesticks, or gamepad support in general.  I had just assumed that you would be able to plug a gamepad into your PC to control the simulator, but I was wrong.  A keyboard only solution made owning an actual device pretty much an absolute requirement.  Fortunately a user on the PlayStation Suite Developer Forums YamatoKei released a code driven solution, which in his own words:

 

 

 

The simulator's input layout and limitations weren't to my taste, so I made myself a way around it:

Run a TCP server that reads PC's gamepad state and sends it back on a client request. And add a simple utility class/lib to connect to that server + decode data transparently from within the game. With a one-line change to revert-back to using the native input on real devices.

Uploaded here: http://dl.dropbox.com/u/1969613/openglForum/PadServer.7z

Code to use:

static ILXPAD pad1 = new ILXPAD_Net();
//static ILXPAD pad1 = new ILXPAD_Vita();
...
pad1.start();
...
pad1.update();
...
camera.roty -= pad1.RStick.X;
bool jump = pad1.Cur.CROSS;

Cheers. :Wink:

 

Just what the doctor ordered!

 

[Download Link]

 

Buyer beware, I haven’t actually tried this out, so if it doesn’t work, destroys your computer or causes a horde of angry cows to raze your house, I take no responsibility.

Programming ,

blog comments powered by Disqus

Month List

Popular Comments