Jump to content


Photo

CustomControls v9 (GM8+GMS) (Keyboard+Controllers)


  • Please log in to reply
12 replies to this topic

#1 KurtBlissZ

KurtBlissZ

    GMC noob

  • GMC Member
  • 725 posts
  • Version:GM:Studio

Posted 28 July 2012 - 07:49 PM

Here's my custom control engine. I decided to move it to Open Source and make the topic simpler to read. Was originally in tutorials and example looked very messy hope this looks better.

Anyway feel free to ask questions, give suggestions, or your own edits to the engine if you think it would help.

 

The gm8 and gms engines are little bit different but do all the same things for the most part, the gm8 one doesn't have as munch backwards compatibility as GMS.

 

Features

  • Backwards compatibility for GMS  (gamepad functions first then checks for joystick since there's some controller that dont work with gamepad functions and others with joystick functions)
  • Works on GM Lite and GMS Standard.
  • Take advantage of check_analog variable!
  • Able to move mouse cursor without mouse for those FPS games!
  • varibles to check if button is being held down, was pressed, was released, and it analog value (set to 1 if there is none)

 

Tips on use for Game Maker Studio (Fairly like the GM8 version)

  • Use the scr_controls_creation script to add in controls
  • Look at the obj_controls > begin step > give controls to figure out how to hand out controls

 

Download Link (includes GMS and GM8 version)

Custom Controls Engine v92.zip - 482 KB


Edited by KurtBlissZ, 18 January 2015 - 06:56 AM.

  • 3

Easy ways to make your game better.
1.Get YCC (its free now, update your license under help, update VC Express by running it a few times) 2.gamepad support (example script3.GameMaker Player. Thank you :).


#2 KurtBlissZ

KurtBlissZ

    GMC noob

  • GMC Member
  • 725 posts
  • Version:GM:Studio

Posted 29 September 2012 - 12:55 AM

Just updated all the scripts for version 5. Hope everyone likes them, and please give any feedback!

Edit: New Update v6, with custom saving and loading controls.
Kept v5 with download that has auto saving and loading, no multiple control saves. And that's the only difference.

Edited by KurtBlissZ, 20 October 2012 - 07:07 PM.

  • 0

Easy ways to make your game better.
1.Get YCC (its free now, update your license under help, update VC Express by running it a few times) 2.gamepad support (example script3.GameMaker Player. Thank you :).


#3 KurtBlissZ

KurtBlissZ

    GMC noob

  • GMC Member
  • 725 posts
  • Version:GM:Studio

Posted 01 May 2013 - 03:49 AM

Version 7-4 is now out, The example may be easier to use and understand now, though v5 and v6 is till included if you want to take a look.

 

Version 7-4 updates.

  • Example of taking advantage of analog controls
  • Checks if you can you analog and will take advantage of it in the example
  • Checks if a key is pressed or released unlike previous versions.

  • 0

Easy ways to make your game better.
1.Get YCC (its free now, update your license under help, update VC Express by running it a few times) 2.gamepad support (example script3.GameMaker Player. Thank you :).


#4 KurtBlissZ

KurtBlissZ

    GMC noob

  • GMC Member
  • 725 posts
  • Version:GM:Studio

Posted 02 June 2013 - 01:06 PM

Added a Game Maker Studio version :D.


  • 1

Easy ways to make your game better.
1.Get YCC (its free now, update your license under help, update VC Express by running it a few times) 2.gamepad support (example script3.GameMaker Player. Thank you :).


#5 beeproductions

beeproductions

    Helping gmc users

  • GMC Member
  • 1321 posts
  • Version:GM:Studio

Posted 15 January 2014 - 10:54 PM

Trying to open the GMS version:

gmsv.png


  • 1

col-img1.pngcol-img4.png

bannersig.png

 

 


#6 KurtBlissZ

KurtBlissZ

    GMC noob

  • GMC Member
  • 725 posts
  • Version:GM:Studio

Posted 25 March 2014 - 01:02 AM

Oh sorry here's a fix, I been busy and a little slow. A GMS update caused the older one not to work right.

https://drive.google...dit?usp=sharing

 

So I'll say this is an Intermediate/Advanced example. Here's a little tutorial how to use this.

  •  When you want to let the play change controls set the obj_controls visible 1(to show it) or 0(to not show it). 
  •  This works by the obj_controls objects giving values to other objects, see the step event, give controls to do this..

  • 0

Easy ways to make your game better.
1.Get YCC (its free now, update your license under help, update VC Express by running it a few times) 2.gamepad support (example script3.GameMaker Player. Thank you :).


#7 Centipede

Centipede

    GMC Member

  • GMC Member
  • 23 posts
  • Version:GM:Studio

Posted 15 July 2014 - 07:57 AM

Does this support all the controllers, including for android & ios?


  • 0

#8 KurtBlissZ

KurtBlissZ

    GMC noob

  • GMC Member
  • 725 posts
  • Version:GM:Studio

Posted 15 July 2014 - 01:11 PM

Does this support all the controllers, including for android & ios?

 

http://docs.yoyogame...nput/index.html

 

It should work reading the manual, since it use the gamepad commands, I can't test it though.


  • 0

Easy ways to make your game better.
1.Get YCC (its free now, update your license under help, update VC Express by running it a few times) 2.gamepad support (example script3.GameMaker Player. Thank you :).


#9 chance

chance

    GMC Member

  • Global Moderators
  • 7931 posts
  • Version:GM:Studio

Posted 04 August 2014 - 12:58 AM

I've moved this here to Open Source, as Kurt requested.

 

I hope it gets a bit more attention here.


  • 0

#10 KurtBlissZ

KurtBlissZ

    GMC noob

  • GMC Member
  • 725 posts
  • Version:GM:Studio

Posted 04 August 2014 - 01:26 AM

Thanks chance, and for those who used this engine in the past I fixed some bugs and made some changes.

  • Now in GMS you don't have to pick gamepad or joystick functions it uses both automatically
  • fixed bug in the GMS were sometimes the keyboard didn't give a analog value
  • fixed bug were the changing a control would be stuck in loop since joystick_exist always returns true in windows 8, so its caped at 25.
  • I have removed the saving and loading controls version,

 

Some things that I like to add in

  • Profiles (save and load)
  • Key mapping controls
  • Better GUI for changing custom controls.

Edited by KurtBlissZ, 04 August 2014 - 01:35 AM.

  • 0

Easy ways to make your game better.
1.Get YCC (its free now, update your license under help, update VC Express by running it a few times) 2.gamepad support (example script3.GameMaker Player. Thank you :).


#11 KurtBlissZ

KurtBlissZ

    GMC noob

  • GMC Member
  • 725 posts
  • Version:GM:Studio

Posted 18 January 2015 - 07:01 AM

Ok a small update for v9.2 it know checks the gamepad functions first instead of the joystick first.

 

This is a little sloppy, some day I like to clean it up but going through all the code is so boring. And confusing since I don't know what to do with the interface that isn't overly complicated yet.


Edited by KurtBlissZ, 18 January 2015 - 07:03 AM.

  • 0

Easy ways to make your game better.
1.Get YCC (its free now, update your license under help, update VC Express by running it a few times) 2.gamepad support (example script3.GameMaker Player. Thank you :).


#12 TurboAvenger

TurboAvenger

    GMC Member

  • GMC Member
  • 31 posts
  • Version:GM:Studio

Posted 18 January 2015 - 08:47 AM

Does this work for HTML5?

Specifically Gamepad plug-in/plug-out detection.


  • 0

#13 KurtBlissZ

KurtBlissZ

    GMC noob

  • GMC Member
  • 725 posts
  • Version:GM:Studio

Posted 18 January 2015 - 01:53 PM

For Firefox Version 32,

Is detected once any button or axis stick is moved, so gamepad_is_connected return true

If you discounted it still thinks it's connected.

 

For Chrome Version 39.0.2171.99 m,

Is detected once the button is pressed, not any of the axis or some other buttons.
 gamepad_is_connected will return true once detected.

Know when you unplug the controller gamepad_is_connected will return false.

 

For IE 11.0.9600.17501 Updated Versions 11.0.15 gamepads don't work at all. But the keyboard does at-least.

 

My engine doesn't do anything when the controller is discounted though, you would have to figure that out your self if you want to do anything more.

 

For the system event way of checking if a controller is connected or not doesn't work for me at all in html5.

 

Hope this makes sense :)


  • 0

Easy ways to make your game better.
1.Get YCC (its free now, update your license under help, update VC Express by running it a few times) 2.gamepad support (example script3.GameMaker Player. Thank you :).





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users