User Tag List

Results 1 to 8 of 8

Thread: Joystick 2 object and frame to frame

  1. #1
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Rebel's Avatar
    Join Date
    Apr 2014
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Joystick 2 object and frame to frame

    hi,

    I went multi-frames with my project, now I see it wasnt so good approach as it complicates some things. Anyway as major part is dont I dont plan to change it now.

    I am trying to implent joystick 2 object, it works fine until I change frame to another frame - while input(pad/stick) is pressed, it does not recognize input at start of the next frame unless you re-press the pad/stick, you basically stop the movement of an active object at start of next frame, and you dont move even when you hold the key as joystick 2 lost the input.

    I recreate joystick 2 at start of each frame, adding a quick sample of something I am having in main project. I guess this is how joystick 2 works (it does not take input when you hold the key before its created), so I think it can't be fixed. Any experience with this ? (*note when I press MODE on gamepad and led lights, then it works and i move at start of next frame too) but without led on gamepad it isn't working so I think it may not work correctly with other gamepads as well.

    I m using logitech dual action for this test,
    Attached files Attached files

  2. #2
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,310
    Mentioned
    97 Post(s)
    Tagged
    0 Thread(s)
    Almost any time anyone posts a question about gamepads, the first response seems to be me, suggesting VACCiNE. So please excuse in advance what probably looks like shameless self-promotion.

    I use VACCiNE (a bunch of Fusion code I made for my own use a while ago, and packaged for others to use too). It's based on the Joystick 2 object, but simplifies and unifies the various inputs. I don't remember explicitly targeting the problem that you're referring to, but VACCiNE seems to have solved it anyway. When I load up a level of my game Spryke, and hold the joystick left/right even before the frame loads, Spryke will still move left/right as soon as the level is loaded.

    I suspect that the reason this works is probably because VACCiNE inserts an extra layer of Alterable Values in between Joystick 2 and the game. So when you press left, a global Active Object in VACCiNE called VACinput has one of its alterable values changed: movementLeft("VACinput") = 1. So when the next frame is loaded, even though the 'signal' from the Joystick 2 object might have been interrupted beacuse Joystick 2 was recreated, movementLeft("VACinput") remains 1. And since my game's movement events are not looking directly at the Joystick 2 object but are looking at VACinput, my character moves successfully. So, the solution to your problem could be to either use VACCiNE, or to create your own Alterable Value 'middleman' system, similar to the one I've described.

    FYI, I also have that Logitech gamepad, and from what I've seen, it acts exactly the same as a Xbox 360 gamepad (as in: the Joystick 2 object actually thinks it is an Xbox 360 gamepad). So whatever you experience with your gamepad should be indicative of what a player with a wired xbox 360 gamepad will experience.

  3. #3
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Rebel's Avatar
    Join Date
    Apr 2014
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It works perfectly with that mode led enabled on gamepad, it just dont take input without it, which seems weird since you can move with pad/stick. Inbetween value works in your case as you don't need to hold key down to move and you still need to re-press pad/stick/button to stop/interact. I tried values too, but I need movement upon a press so value dont make a solution in my case (sample).

    I checked out vaccine, it's great sample for community. Yet it didn't solve my issue. It behave the same way, works properly only with LED control on. Maybe I should buy some another cheap pad and test it out if it will have similar issue. For xbox i go already with 360 extension and that works 100% for xbox controller. I am trying to setup joystick2 for other devices now.

  4. #4
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    954
    Mentioned
    48 Post(s)
    Tagged
    0 Thread(s)
    It's a known and very annoying bug in the joystick 2 object that has never been solved. I had the same issue with my game (Metroidvania, lots of small rooms) and solved it this way: The built-in standard joystick readout of player 1-4 does not show this bug. In my game I get the joystick input reading out player joysticks 1-4 and I get buttons and D-pad reading out joystick 2. The only downfall with this is you can't read out more than eight directions and four gamepads, but depending on your needs I doubt most players will have issues with this.

  5. #5
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Rebel's Avatar
    Join Date
    Apr 2014
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @Julian, Great, that will work. I didnt even think of in built-joystick function! You're life-saver.

    So you mentioned 1-4 joystick. I guess it's better to set input for all 1-4 input within Plaer1 Object + movement afterwards and run it at the same time, so all gamepads run. Instead of just input 1, which would disable joysticks in other ports.
    - OR
    I could get number of devices based on NrOfJoysticks( "Joystick 2 object" ) (?) if that works properly. I think this does.
    So I setup inputs (1,2...) based on devices connected.

    Thanks! I will be able to setup gamepad(s) the way i need now.

  6. #6
    Clicker Fusion 2.5
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Rebel's Avatar
    Join Date
    Apr 2014
    Posts
    179
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Smile sample

    So no matter what I tried ( loop based on nr of devices, etc ) input of player 1 to whatever , didnt work. Always just 1 controller. Then I thought you meant all 4 objects, not inputs. So I made it the easiest way and it works for all devices !
    Here's sample for anyone who needs this *note you dont have to run input setup (1st line) with always. :
    Attached files Attached files

  7. #7
    Clicker Fusion 2.5 DeveloperFusion 2.5+ DLCiOS Export ModuleInstall Creator Pro
    Julian82's Avatar
    Join Date
    May 2012
    Location
    outbuddies.com
    Posts
    954
    Mentioned
    48 Post(s)
    Tagged
    0 Thread(s)
    Yeah that's how I did it too! Glad it worked out for you One thing to consider when multiple gamepads are plugged in is that the assignment of built-in joysticks may differ from the assignment to joystick 2. For example a gamepad is recognized by CTs joystick as "1" but Joystick 2 labels it with "2". In single player games this does not really matter as long as you read out CT joysticks 1-4 and condensate all readouts to the same input value.

    However, in multiplayer setups it's a bit more tricky and you'll have to write a routine checking which inputs belong together. For example Fusion has to know that player A is controlled by the CT joystick "gamepad 1" (moving) + Joystick 2 "gamepad 2" (Buttons)

  8. #8
    Clicker Fusion 2.5 Developer
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)
    J3sseM's Avatar
    Join Date
    Feb 2013
    Location
    Finland
    Posts
    868
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I've the same problem. I've mapped multiple controllers using both sticks and dpad so changing the extension is out of the question.
    Any idea if CT has Joystick 2 source, or if z33z is still around? Really need a fix for this...!

Similar Threads

  1. Replies: 2
    Last Post: 27th July 2015, 10:48 AM
  2. Replies: 0
    Last Post: 22nd June 2015, 05:28 AM
  3. Joystick (Keyboard) Toggle Frame Problem
    By JoshuaC in forum Fusion 2.5
    Replies: 5
    Last Post: 1st March 2014, 06:47 AM
  4. Joystick 2 Object takes 10 seconds to load frame
    By Blue66 in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 29th April 2011, 01:49 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •