User Tag List

Results 1 to 4 of 4

Thread: Simple keymapping code design question.

  1. #1
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2016
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Simple keymapping code design question.

    Hello,

    I've been researching keymapping for the game I am creating, but need some initial direction. I know I don't want to use a simple "when x is pressed" architecture since I want the user to be able to use different input systems (primarily keyboard/controller) and be able to customize keys if they want to. I've already figured out how to code my input, so now I'm just trying to narrow down how I should go about building a new long-term input architecture in terms of objects/extensions for different input systems and key customization. There are a ton of joypad/input objects and control extensions and I simply don't know where to begin. I don't want to invest hours into learning one just to find out it can't do what I need it to do, if it can be avoided.

    So for anyone with experience who might have an answer immediately offhand, what objects/extensions would you use in the following scenario?

    A platforming game where the user has standard movement (left, right, up, down, jump, hold-jump, crouch) being controlled by a Platform Movement Object, but also has 4 attacks, 8 weapon switches, and a few additional buttons beyond those. I want the user to be able to switch directly to the different weapons when playing on keyboard, but that creates too many buttons for a standard controller so I would need next/previous weapon buttons as well, primarily for controller players. Basically I need a ton of buttons. I need to be able to at least set what the default buttons would be for the keyboard, and if possible also allow the user to customize the buttons (I assume the latter goes with the former anyway).

    Mainly I just don't want to end up having to redo my input architecture down the line so I want to make a good choice early on here. Essentially I'm just looking for a lead on what control objects I should start with given this scenario, and I will go research those on my own time. Even if I decide at some point I don't want customizable keys, having it fundamentally built-in already at no processing cost is definitely going to be a good thing if I change my mind again at some point.

    Thanks a bunch!

    -eido

  2. #2
    Clicker

    Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export ModuleUniversal Windows Platform Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    DaveC's Avatar
    Join Date
    Jun 2007
    Location
    Perth, Australia
    Posts
    2,132
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    There's some good info/examples here - http://community.clickteam.com/threads/91915-You-thoughts-on-Custom-Key-mapping?highlight=joypad

    I'd recommend Joy Stick 2, Control X and/or The "Key Object" (I think that's what it is called)

    I'm going to re-do my controller mapping soonish.. but the good news is, I only need to re-do the Inputting phase (where the user assigns keys) the actual custom input system during gameplay works flawlessly. I might post that up as a guide for others when I get back around to that task.

  3. #3
    Clicker Fusion 2.5 Developer

    Join Date
    Jan 2016
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for the reply! I got absorbed in working on animations instead but I'll bookmark the discussion for later, and look up those extensions.

    Thank you!

  4. #4
    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 find the best approach to create the character a few values, one being for example "p.movement". I check if this value is "2" and the player moves to right, "4" for left.
    Why this? It is much easier to add more moving options later on. I can add controller support by using only a few lines.

    I use Control X object for key mapping, works great!
    Though it is not unicode, not sure how it works in certain countries (though I believe it will use normal alphabets in foreign keyboards, so in theory it should work).

Similar Threads

  1. Quick joystick/gamepad keymapping question
    By Chaos in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 21st October 2015, 03:01 AM
  2. Very simple code won't work
    By D_Light in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 5th December 2014, 05:04 AM
  3. Very simple code won't work.
    By D_Light in forum Multimedia Fusion 2 - Technical Support
    Replies: 3
    Last Post: 25th June 2013, 11:44 PM
  4. Very simple code doesn't work for some reason
    By D_Light in forum Multimedia Fusion 2 - Technical Support
    Replies: 5
    Last Post: 16th February 2013, 09:43 PM

Posting Permissions

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