User Tag List

Results 1 to 7 of 7

Thread: You thoughts on Custom Key mapping

  1. #1
    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,117
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)

    You thoughts on Custom Key mapping

    I would like players of my game to be able to customize their keyboard+joypad controls. Does anyone have suggestions on the best modern way to do this? I've done some thread searching and seen some techniques using old extensions etc. I'm not sure what is the best way to do this in 2.5. I'd like to have Xbox 360 controller support as well as custom keyboard mapping.

    I notice there is a "set key" action under player in the event editor.. is this new and could this be used to map keys? My brain is really not working right now, sorry my thread sucks >_<

  2. #2
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleiOS Export Module
    Fusion 2.5 (Steam)
    schrodinger's Avatar
    Join Date
    Nov 2014
    Posts
    3,155
    Mentioned
    27 Post(s)
    Tagged
    1 Thread(s)
    Actually, I don't think I've much to say on the subject
    but since you concluded in such a dramatic way, and I always find your examples so inspiring,
    I thought I would give it a try...

    Some randomic thoughts:
    the problem ...of the problem... may lie in the abundance and wide range of options,
    and its relationship with how complicated your movement system is.

    "set key" event seems to address only basic four-keys / four-ways setup...
    so nothing more than basic key readdressing, already in fusion from klik'n'play days

    so if you plan more,
    for the keyboard I would use keyboard object... but... maybe not suitable, it's windows only

    for the joystick/joypad... no clue! I can't remember using a joypad later than snes and playstation days

    That sounds really unuseful. Sorry for posting, my reply sucks... ()

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleiOS Export ModuleSWF Export ModuleInstall Creator ProPatch Maker

    Join Date
    Jun 2006
    Location
    Norway
    Posts
    528
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can do a pretty solid configuration tool for your users.
    I've attached something I made a while back but never finished, it's very rough, but you'll get the idea.

    It can configure joystick and keyboard, and It'll detect if you have a xbox 360 controller plugged in.

    ControlConfig.mfa

  4. #4
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    (Apologies if this is the same as willy - I don't have MMF on this machine)

    In the past I've used z33z's objects, Control-X and Joypad. I use global values to store the IDs of the keys that represent the controls (both directions and triggers), and use the "Key ID pressed/down" event to check for actions. You can then have a menu that allows the player to redefine keys by storing the ID of the last pressed key in the global value.

    I provided joystick support by simulating keypresses, but that probably isn't the best way.

  5. #5
    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,117
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    wow thanks everyone for the speedy replies! Willy that example is great - I'll definitely play around with it, maybe build on it / remake it. I actually don't own a joypad to test so.. that's a set back >_< I'm pretty happy to simulate key presses.. I think it's best to add this support at the start of the project rather than at the end.

    I didn't think I'd get so much help so quickly.. so I was playing around with an example posted by Snail - and I overhauled it somewhat (to learn how it works) - here it is if anyone is interested. It's not as simple as Willy's but it has support for things like blocking certain keys from being bound, blocking duplicate keys etc.

    I might even work in the joypad extension into this file and go from there.

    edit. LOL btw I didn't mean to be dramatic, I just had a headache all day and I didn't have it in me to phrase my question the way I wanted to.
    Attached files Attached files

  6. #6
    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,304
    Mentioned
    94 Post(s)
    Tagged
    0 Thread(s)
    You also need to decide how to handle it when a user wants to map a key that is already used. The main ways I can think of :

    1 new key map request is honoured; the old map becomes blank

    2 user isn't allowed to map the key until they manually unmap it from the previous setting

    3 new key map is honoured, and is swapped with old key map.

    These can be done in conjunction with:

    a. A popup informs user of conflict and requires user to close it

    b. A message is shown informing user of conflict but doesn't require action from user

    c. User is not informed of conflict (works with #1 and #3 but not #2)


    I personally hate #2, and I don't like #a. Both are an annoyance to the player. I prefer 1b or 3b.

    Another option exists that I think would be optimal actually, but I've never seen it used:

    New key map is honoured for the new action, and a popup informs user of conflict and asks user, there and then, to press a new key for the old action (or esc to cancel the overwrite)

    Also, how will you deal with keyboard and gamepad controls? A separate menu for each? Or a single menu that is split into two columns?

  7. #7
    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,117
    Mentioned
    13 Post(s)
    Tagged
    0 Thread(s)
    that's good feedback Volnaiskra - come to think of it I think I prefer the new map to be honoured and the previous mapped key to be set to blank. (the file I posted uses method 1). For gamepad vs keyboard.. I'd probably have two separate option screens, the game will be low res+retro so I think that will look better, I personally hate config screens that are cluttered.. I like a dedicated screen for Audio / Video / Control options / Control configs etc.

Similar Threads

  1. custom control key mapping
    By mobichan in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 5th July 2008, 05:13 AM
  2. Your Map Design Thoughts
    By Doc4 in forum Multimedia Fusion 2 - Technical Support
    Replies: 9
    Last Post: 2nd March 2007, 01:02 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
  •