don't click here

Joypad support for Game Maker games

Discussion in 'Technical Discussion' started by Mercury, Aug 3, 2009.

  1. Mercury

    Mercury

    His Name Is Sonic Tech Member
    1,740
    21
    18
    Location Location
    AeStHete
    One of the things I'm constantly frustrated by is the lack of support (or useful support) for joypads in Sonic fangames. Sonic was born on a console, and is meant to played with a joypad, not a keyboard. A sizable portion of us now have PC joypads, or devices that allow us to use our console joypads with a PC. Thus it seems wise to have robust joypad support in your game, to make the experience more comfortable for players who have them.

    My project is being made in Game Maker, and I wrote a customisable keyboard and joypad input system for it. I thought I would share it in case anyone else is making anything in Game Maker and can benefit by it.

    The GML script file: link
    A GMK project file that demonstrates the system: link

    The entire tutorial for it can be found here.

    Credit is unnecessary, I just hope it can make a positive impact.

    I'll be making a follow-up that adds features for recording and playback of joypad "movies", which can be helpful for making demos, Mario Kart style "ghosts", or even debugging (you can replay over and over to find out where something went wrong).
     
  2. Ollie

    Ollie

    DIGGY DIGGY HOLE Member
    It's a nice little script, but you could just use a program like Xpadder, I guess.
     
  3. Metal Knuckles

    Metal Knuckles

    HAVE SOME FUN WITH MIKU Member
    4,942
    0
    0
    New Hampshire, USA
    Shadow Alpha, an awesome hack of Sonic 1
    Yeah, but it's nice to have gamepad/joystick support for Game Maker without having to resort to third party programs, not that I've ever used Game Maker outside of a Game Production final project. Good jorb!
     
  4. Sik

    Sik

    Sik is pronounced as "seek", not as "sick". Tech Member
    6,718
    1
    0
    being an asshole =P
    Doesn't GM have built-in support for joypads? I'd say it's more of a lazyness issue than anything else. Most MMF-based fangames can be played with the joypad only because MMF provides the control customization settings itself, otherwise I bet those fangames also wouldn't support a joypad.
     
  5. Mercury

    Mercury

    His Name Is Sonic Tech Member
    1,740
    21
    18
    Location Location
    AeStHete
    Yes, GM has some basic support, but it's very limited. There are no functions for detecting presses and releases of the buttons, or letting the analog sticks duplicate the d-pad. Also, my system makes it a breeze to switch between joypad and keyboard modes, or just let both work automatically.
     
  6. Mercury

    Mercury

    His Name Is Sonic Tech Member
    1,740
    21
    18
    Location Location
    AeStHete
    Sorry about the double post and the slight bump, but I think I should mention that the promised update that adds joypad movie support is up. You can download the example here, and view the tutorial here.