-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gamepad not moving the player #2
Comments
Thanks. I'm happy to help. I really wish YoyoGames would have solved this for us, but someone had to step up. Since I needed this kind of a library, I made it. I am aware that on Linux there may be problems with the sticks/axis. On linux, for example, the axis center is 0.5, 0.5 whereas on the Windows side it is 0,0 .. I'm filing an issue about that right now. I need more information to help you. Please tell me what platform you are testing on, what controller/gamepad you are using, Also, test in Diagonostic Mode to see what your gamepad is actually registering. If you can record that and upload it as a video, or make a table of notes and provide those, that would be helpful. For an example, see the Controller Notes section of https://github.com/LAGameStudio/AtariVCSGML and if you can sync up that's probably a good way to determine if its me (an issue with InputCandy), user error (your bad), or something else. If you would like to sync on our Discord (invite is at Lostastronaut.com) we can talk through your issue over a video call. Look for user Retrofriends |
i dont see the recording, could you upload it to youtube? |
i'm so sorry. i change the line in 2036 to this: and the fire limit working. I hope that helps. |
I took your suggested fix for line 2036 of MatchSignal. I'm in the process of experimenting with InputCandy's directionals in my own game for the first time. The idea was to use MatchDirectional() but perhaps this was incomplete? I've had some trouble using MatchDirectional in my own game, but have not got a chance to delve too deeply yet. Also, I've noticed multiple Check* functions seem to be "incomplete" for example CheckAction and CheckActionReleased also aren't doing what they should, or I don't remember how to use them. It's possible they need to be removed or replaced. Case in point I wanted to force an action to trigger only when "Released" using CheckActionRelease but this did not do what was expected. I will file an Issue for this. I'll experiment and let you know, but here are some things to try and report back on:
if ( moving != false ) {
draw_text(x+16, y+32, json_stringify(moving));
} The above code allows you to view any signals. You mentioned you are using a PS4 Dual Shock controller. I know that PS3 controllers do not register like the XBOX one does. Gamemaker's input is perfect but only on the XBOX controller (though it has issues with the left trigger being an axis and not gp_shoulderrb or whatever), so a PS4 may be registering other controls. Try using the "Test on Simulator" option to further investigate. (See also suggested feature to allow for user-defined profiles in a JSON format to be ingested, but this is not currently being worked on: #4 ) For the reason that not all controllers work out of the box, things like IC_dpad aren't going to work without loading an SDL profile, or by letting the user configure the controls specifically for that controller. I will have to add support specifically for the PS4 in the future. I'll have to run upstairs and grab one, since I already detect the PS3 controller, N64-USB knockoff, XBOX/XInput controller. It's very hard to detect the VCS controllers except by hardwiring the axis. In truth, you really only need to support the top gamepads, or let the user remap on Steam using a third party app, and assume its XBOX style. The other reason InputCandy exists at all is to allow for PC games to permit key remapping. The way I'm fixing this so far in my own game is to support specific controllers outside of InputCandy, letting InputCandy be a fallback. For example, I directly support the XBOX and VCS controllers, allowing the user to switch to one of those profiles OR the user can switch to "Custom" which is InputCandy. I'm also using InputCandy's screen to let them remap players to devices, access the simulator, and configure custom controls. For example, from your video, I noted that the PS4 DS controller registered multiple signals for your dpad (as a hat and also as a dpad). |
The best way for you to provide a mapping to me is to create a table. Example: On Bladeblah GamepaD: |
As a follow up, I tested the "Modern VCS Controller" versus the "XBOX Series S or X controller" and, lo and behold, ran into the same issue as you with the PS4. Can't move the guy. See pic: Above: Red Arrow: VCS Controller, Other: Current gen XBOX controller So, this is actually expected behavior. InputCandy allows the user to customize controls, or load an SDL profile (not really recommended!) ... as it doesn't fix the problem for them automagically, because if it did, you would have to have written it or trained it using an interactive trainer, as there is no reliable way in GameMaker with SDL or not to detect the controller make and model reliably most of the time, especially with current generation controllers, because no one company correctly followed the standard. Where InputCandy helps most is in:
So far, when I have been using InputCandy, it's been about treating it as a way to configure the keyboard and mouse, and to provide it as a last resort. For example, In my game's menu, there is a control settings screen. My game supports couch coop 8 players.
In the above snippet, you are looking at part of an object I return through a function GetGameControls(player_number) This returns an object with methods on it. The method "Tertiary" looks for the "third degree fire button" (Like the "A" in XYAB), in this case you can see how it is mapped for each player-requested controller type. I default this controller type to "XBOX" on Steam and "VCS" on the VCS, but the user can pick between them. I support "VCS" (and can tell the difference between the two VCS official controllers due to the number of axis and buttons that it is the Classic VCS Joystick or the Modern VCS Controller) and I support "XBOX" meaning a contemporary XBOX Series S/X XInput controller, or "mouse, keyboard or a custom control scheme set up by InputCandy" .. I could add some new functionality here, like isPlayerUsingPS4Controller or isPlayerUsingThrustmaster6 or whatever, but it would be up to the player to navigate to the "controls" menu and then pick the profile for the controller they are using. If they have mixed and matched controllers, they have to look at the "Choose a Device" panel of ICUI to see which player is using which controller, then set the player's profile or make a custom one for each player-device combo. |
https://github.com/LAGameStudio/InputCandy/blob/trunk/README.md was updated to include important mention of how to use InputCandy based on this feedback |
In advanced mode, My gamepad can not move the player even though it's detected and recognized. But, if i set my keyboard to IC_none in script IC_Action_ext, my gamepad can move the player. If i set back to IC_wasd or IC_arrow, the player only moved by keyboard, not gamepad.
The strange is, jump and button action works fine with my gamepad and keyboard.
Is it a bug? Ist it intentional? or do i have to find a workaround in my script to get my keyboard and gamepad action movement both work at the same time.
I just recently learning coding so thank you very much for creating this library. I learn a lot on how you code this library thing.
Your guys are truly angel.
The text was updated successfully, but these errors were encountered: