GameMaker: Studio

GameMaker: Studio

Controller Example v.2 (+ source)
7 条留言
dapi1 2016 年 5 月 15 日 上午 10:56 
i need this but i cant , why? ._.
SMSalisbury 2016 年 4 月 9 日 上午 8:51 
This is exactly what I need. Thank you for doing this. I was making it harder than it needed to be. Quick question. When you release the Left or Right thumbsticks the object repoints back to it's origin. How would you make the object stay in the direction it was going? I'm working on a geometry war type of game and it looks silly when my ship keeps pointing in the opposite direction of where it was going.
Lord Helmet 2013 年 8 月 7 日 上午 6:38 
Hey man, I've been meaning to ask for your help here.

I'm making a game with Mother 3 like controls, and I decided to impletement X360 controls, the problem is I'm relatively new to it on GMS, and the only time I used it was to make a 2D engine.

Anyways, I downloaded your source, and I adjusted it so there wouldn't be an inversion.

Things I'm missing are basically, controlling the speed of the movement, and how to set the character sprites.

For example, what if I want the speed to be 4at maximum, and the less I tilt the slower he walks.

And as for the sprites, I'm making him walk in 8 directions, how can I make him animate in a way where for example he's walking between 20 degrees and -340 degrees, he's animating to the right, and if it's between 21 degrees and 60 degrees, he's animating right and upwards?

Thanks for your time man, sorry for the questions, but I'm running our of ideas here!
M.S.T.O.P.  [作者] 2013 年 2 月 5 日 下午 2:24 
Well-made, of course. :)
Syrsly 2013 年 2 月 4 日 下午 9:36 
Ravioli that's well-made or just mushy, messy ravioli soup from Campbell's?
M.S.T.O.P.  [作者] 2013 年 2 月 4 日 下午 6:58 
This and the older example are mainly done to show how the gamepad/joystick functions are used and not to show the most efficient way to implement a control scheme in a game. Others are free to look at the code to get the basics down and then make improvments for their own games (like the input class you suggested).

I come from the OOP world too and for more complex projects I usually turn my code into ravioli. :)
Syrsly 2013 年 2 月 4 日 下午 5:44 
I do not see much difference between the two versions. Where is the input class? It seems to just use built-in GM functions on each object, which is a very bad design. You should be checking variables, like jumpButtonPressed, and using an input class to set those variables to true or false based on what buttons are pressed on the controller and keyboard and whatever other input devices you wish to support.