PigFiend's Forum Posts

  • 5 posts
  • Since the latest Construct 2 update, I've found gamePad button inputs to be very laggy. I'm running Firefox 32.0, and the controllers I'm using are Afterglow Xbox 360.

    I made the above capx for a bare-bones test. Both layouts use the same event sheet with just two events: playing some music on the start of the layout, and playing a sound effect whenever the A button of controller 0 is pressed. Try mashing the A button as fast as you can on both layouts.

    The first layout has nothing on it. On it, you can make a lot of noise if you press the A button as rapidly as you can.

    For the second layout, I threw a handful of black tiles with the solid behaviour as well as a couple of sprites with the platform behaviour and all its default settings. If you rapidly press A on this layout, distinct gaps will appear between the sound effects.

    My game - pretty much every game - is going to have a lot more complexity than this, and pressing a button a lot is probably desirable for many of those games. I seemed to not have this problem before the update. Has anyone else noticed this?

    Edit - Huh! I can't share a URL? Well... it's an easy enough capx to recreate, I guess. The most minimal steps were taken, exactly as noted here.

  • So... has anybody experienced this same thing? Is there perhaps another way to refer to a controller to ensure that everybody's controllers remain controlling their appropriate characters?

  • Hm. Well, good luck! That's my favourite style of classic video game.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • I'm going to be attempting something similar with my game. In yours are the character animations more or less going to be the same regardless of the weapon he's wielding?

    If that's the case, perhaps you should make all weapons (or at least a group) one sprite with all the animations for the all the weapons. You could have an array with an X/width that sorts types (sword, spear, etc) and a Y/height that lists specific animations ("swing1IronSword", "stab1IronSword", etc)

    Then you'd use that array to set the animation for the sword sprite the character is holding, like Set Animation Sword swordAnimations.At(weaponType,weaponNum)

  • I am making a local two-player game. The controls work fine except for a minor issue with reconnecting a disconnected controller in 2 player mode.

    Here's a screenshot of my test controls selection screen.

    Through a loop the text at the top is checking each Gamepad of loopindex value. If it detects a controller, it displays its ID. As you can see here, Gamepad 0 and 1 are connected X-Box 360 controllers. (The text is updated 'every tick'.)

    Player 1 is controlled by pad 0, and Player 2 is controlled by pad 1.

    If I unplug pad 1, of course Player 2 has no more pad controls, and as one would expect, reconnecting the pad sets it as pad 1 again and lets it control Player 2. Perfect.

    If I unplug pad 0, Player 1 has no more controls. What was pad 1 and controlled Player 2 becomes pad 0 but curiously does not control Player 1 (nor Player 2). If I replug Player 1's pad, it again becomes pad 0, but it does not control Player 1. Player 2's controller again becomes pad 1, and it does resume controlling Player 2.

    Unplugging and reconnecting all controllers mostly works. The first controller reconnected becomes pad 0 and controls Player 1, so you could end up switching controllers/characters depending on which controller you plug in first. It seems like a finnicky fix for users, however, for Player 1's controller getting accidentally unplugged.

    I suspect this is a bug but I thought I'd check here first.

  • 5 posts