Jump to content

Using Joystick


morad
 Share

Recommended Posts

There's no inherent support for Joystick devices, you would need to add your own (somehow). I only use LUA for simple animation.

 

Joysticks and gaming devices tend to be tricky as they are harder to work cross-platform unless you use something like SDL (Simple Direct Media Layer) or Blitmax's own joystick functions and make those available via a shared LUA object.

 

It does seem to be an oversight but nobody has yet asked for it to be added to the LUA interface.

 

Regards

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

Just to confirm that the Lua Joystick Diedir has uploaded is for Xbox only controllers (should say really).

 

Rick was working on one but not sure if hes had any luck.

 

Andy

The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do.

 

Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d

Link to comment
Share on other sites

I think you can use XBOX controller on PC too, because I can use my PS3 controller on PC. I only installed a PS3 driver on my PC, and then it detects the PS3 controller like any ordinary joystick.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

I think you can use XBOX controller on PC too, because I can use my PS3 controller on PC. I only installed a PS3 driver on my PC, and then it detects the PS3 controller like any ordinary joystick.

 

In the case of the xbox (360?) Windows won't take "advantage" (if you can call it that) of the two rumble motors (it will control them both as if they were one), and it will have that irritating "LT and RT are the same axis" thing... Unless you use xinput that is - in which case, both of those are possible...

LE Version: 2.50 (Eventually)

Link to comment
Share on other sites

Actually it does, when you use the SDL Haptic library. It supports also PS3 force feedback.

Not sure if the driver supports it though, so maybe indeed some modification to the driver and/or haptic library is needed.

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Link to comment
Share on other sites

Well there you go, someone already wrote a third party package for LUA.

 

To confirm yes it uses XINPUT.DLL (XBOX controller DLL). Thanks Aggror for pointing that out.

(LUA Joystick Demo)

 

Perhaps you can take the concept of the demo and use an SDL LUA package to get at all the SDL_Joystick functions you need.

6600 2.4G / GTX 460 280.26 / 4GB Windows 7

Author: GROME Terrain Modeling for Unity, UDK, Ogre3D from PackT

Tricubic Studios Ltd. ~ Combat Helo

Link to comment
Share on other sites

Still though this isn't a joystick package? It is an Xbox only package and to only be able to distribute a windows game where the only input is a Xbox controller isn't the best option? I would love a lua generic joystick module, would try and do it myself if I was familiar with creating wrappers.

 

Andy

The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do.

 

Leadwerks Game-Ready 3D Models:https://sellfy.com/gib3d

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...