Need Advice on Game Controls!!

0 favourites
  • 10 posts
From the Asset Store
Supports keyboard, mouse and gamepads. Supports several gamepads at once.
  • Hi guys,

    It's been a while since I posted but anyways I need some tips on my game controls. Right now, I made two control/joy sticks. One joystick moves the player in the 8 directions. The other joystick changes the players angles. So basically it's like the two joysticks on an xbox controller, one for direction and one for angle. I made two other buttons that allow the player to shoot and interact with it's environment but it's super inconvenient to click them because then the player either stops moving or doesn't change angles. Anyone have any suggestions on how to make this setup more convenient for the player? Thanks!

    Regards,

    HZGaming

  • For a dual-sick setup, typically the shoulder buttons are primarily used with the sticks. The face buttons would only be used in the instance of special functions that aren't always done.

  • C-7 I totally get what you're saying but I'm building my game for windows 10 and not using an actual controller so there are no shoulder sticks...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • You need to make a state machine, then you can just control the state machine from any controller you want.

    You can make an on-screen controller to mimic the shoulder buttons or whatever. Just need a state machine first.

  • jojoe pardon my noobness but what's a state machine?

  • Hi, HZGaming check this out for a general dscription:

    https://www.scirra.com/tutorials/1139/h ... e-machines

    The state machiene would just sit there and wait for a state variable like State="MoveUp"

    So when you wanted to move the player Up on a key board press you would do:

    On keypress "W" ------> Set State="MoveUp"

    Then later you can add on to it really easy, just replace the keyboard press with a Clicked/touched button for on screen controls.

    Left clicked object = moveUp.Sprite------------------->Set State="MoveUp"

    Touched object = moveUp.Sprite------------------->Set State="MoveUp"

    It also allows certain states to only be active at certain times. Like if you test if he is on the ground or not lets Move, and run, and Shoot and Jump work, but when he is Not on the ground he can only be Falling or Jumping, where there are no user control so run and walk, and shoot, and jumpStart do not work while they are flying in the air.

  • HZGaming

    Ah, sorry. I didn't see any mention of control type--had no way to know you were talking about touch. Most games I've seen that require constant dual-analog use automate the rest. Like the character automatically fires their weapon, you just have to aim. So make firing automatic. As far as environmental interaction, I don't think that's so awful to have the player stop momentarily for that, depending on how often you do it. Or you could make everything trigger automatically in some elegant way.

  • Oh crap, so it is On screen controls only? I was posting the information so it was easy for you to mimic and implement other controls into your game. I am very sorry about that.

  • jojoe it's perfectly fine haha. I was a bit confused at first

  • C-7 thanks! I like the idea of automatically shooting and already started implementing an automatic aiming and firing mechanism

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)