GameMaker: Studio - Rotation Tutorial

Поделиться
HTML-код
  • Опубликовано: 23 дек 2024

Комментарии • 120

  • @matthewrenna5894
    @matthewrenna5894 11 лет назад +1

    I gotta say. This guy talks so much and his videos can be shortened by at least 5 minutes if he would just not ramble so often...But that is what makes these videos so DAMN GOOD. You hear every little detail about everything your doing at all times. your never left behind. You are an excellent teacher sir, and I thank you for your education.

  • @iiviigames
    @iiviigames Год назад

    Wayback Machine of GMToolkit brought me right here in 2023. You've been doing this a long time Shaun, and I really respect your creative output. Keep going!!!

  • @DanBraithwaite
    @DanBraithwaite 10 лет назад +15

    Shaun Spalding used to be the guy to avoid because he doesn't use Drag n Drop. Now I understand the awesome power of GML, Shaun Spalding is my go-to-guy, I dunno what I'd do without him. Fo reals.

    • @Cryptic_YTReal
      @Cryptic_YTReal 20 дней назад +1

      "he's" a girl now

    • @DanBraithwaite
      @DanBraithwaite 14 дней назад

      @@Cryptic_YTReal I'm aware, thank-you. However the 10-year-old comment was not.

  • @daytronsan5980
    @daytronsan5980 3 года назад +1

    Hello my friend, just a question, can you create please a tutorial about creating a seesaw?? I would really thank you

  • @SlippyFox1
    @SlippyFox1 11 лет назад

    These are way better than the offical Game Maker tutorials!!

  • @adamtlee
    @adamtlee 12 лет назад

    I have a feeling your videos will start to get a lot more views since the game maker went on sale on steam! Thank you very much for the reply I look forward to the next tutorial.

  • @drakrtar
    @drakrtar 12 лет назад

    Have to say this is by far the best resource for tutorial learning i've seen for GM:S please keep up the great work. I am looking forward to more tutorials explaining more complex things! (If you take requests) I am hoping to find a working and displayed timer in GM that counts up and lets you save/store that data securely in a file. (Think time trials then saved to show best times). If not then no worries figured it wouldn't hurt to ask ;)

  • @romemccoll1189
    @romemccoll1189 12 лет назад

    If you could expand on that, I'd be extremely interested. I'm very curious about the whole field and I'm honestly not quite sure what to think of it, in may different aspects.

  • @xJoeKing
    @xJoeKing 11 лет назад

    Could you do a tutorial on turrets, and how to make them aim at a target

  • @Jozo7O
    @Jozo7O 11 лет назад

    hey can you make a tutorial on how to interact with buttons,leavers stuff like that?
    sorry if im not describing it properly i mean like activating a button which triggers a ladder to appear or somthing

  • @adamtlee
    @adamtlee 12 лет назад

    I would like to thank you for your tutorials thus far. They have been informative and extremely well put together. I like that you put the code alongside the gui version of doing things. In your last tutorial you said that this would be useful if you had a pickup to change the bullet type. I was wondering if you could go more in depth about this process as well as making the pickup disappear and having a bullet count and weapon cease fire when out of ammo. Thanks again for the tutorials!

  • @BlasterTon
    @BlasterTon 10 лет назад

    Alternatively to rotating the image you can use 'image_angle = direction + 90;' and that will work correctly with an image facing up vertically. Any angle can be reverse engineered that way be adding the difference from a 0 degree right

  • @Nedswhatever
    @Nedswhatever 10 лет назад

    I am trying to find a way for a platform game for the rotation for the player to go up and down slopes and follow the path it needs to follow freely. Like for instance a mine cart that goes up a slope then it follows the ramp and moves back to right angel you know?

  • @Zero86Sk
    @Zero86Sk 9 лет назад

    question why not just make sure to check image direction at the start of its creation instead of every frame? is there a difference?

  • @evenglare
    @evenglare 11 лет назад

    I'm not sure why you said the bullets looked odd in the last video because they shot out at the angle you set them....they looked just fine to me...

  • @edgarszeikars54
    @edgarszeikars54 8 лет назад

    Or if the possition for the bullet for you is "upwards" or 90 degrees (egineering angle) just do a command image_angle = direction-90:

  • @PrivatePooter
    @PrivatePooter 11 лет назад

    So if i were to make an arrow shoot up and it has gravity it would change the anlge along its trajectory?

  • @ICvideos2011
    @ICvideos2011 12 лет назад

    awesome, is it everything you thought it would be?

  • @N79621
    @N79621 9 лет назад

    Does anyone know how to display the angle the player is facing above a sprite?

  • @ICANanimations
    @ICANanimations 11 лет назад

    can you tell me how to limit the rotation for a turret on a spaceship for example

  • @Blackcandypro
    @Blackcandypro 11 лет назад

    I rotated my player he turns around just fine but when I shoot it continues to go up any idea how to make the bullets go where ever the characters facing?

  • @VimeCrafter
    @VimeCrafter 9 лет назад +1

    How can i make a collision with rotating sprites???

  • @xJoeKing
    @xJoeKing 11 лет назад

    Bullet Object-> Create Event -> Blue arrow move action -> Direction: image angle of Player Object

  • @xedusk
    @xedusk 9 лет назад

    How can I make the object rotate? Not just the sprite.
    I'm trying to make a 2d platformer where you can turn off the gravity and then propel yourself through the air freely and I wanted to make it so that if you had an object snapped in front of you it would move and rotate to stay in the same relative position.
    I also wanted to do something where if there was a floating box you could rotate yourself so that it is now under you and then you could walk on the box.

    • @xedusk
      @xedusk 9 лет назад

      Instance and image are what I meant. And I still don't know how to rotate the instance, or if it's possible. What I wanted was to be able to rotate the instance so that I can check what is under the player and when he rotates what is considered under the player rotates with him. Rotating just the image means I'd have to do lots of coding to check if something is in a specific spot when his angle is a certain number. I'm prepared to do that, but if there is a simpler way than I'd rather do that.

    • @xedusk
      @xedusk 9 лет назад

      Thanks a lot. I'll try it out.

  • @SirBagman87
    @SirBagman87 10 лет назад

    What about if I have what you taught us in the first tutorial, where you jump to 0,3 relative location. I want my character to rotate, but it doesn't work if you use jump. Does anyone know some way to get it working?

  • @Mr.Joehar
    @Mr.Joehar 11 лет назад

    can someone tell me please how to change the sprite angle like the horizontal one he made thanks.

  • @jakebunch303
    @jakebunch303 11 лет назад

    I'm trying to make a platform game where you dodge missiles. How would i make it so that the missile's rotation has some sort of delay? Like so it doesn't just turn instantly towards you which makes the game extremely difficult.

    • @TrueDarkSurge
      @TrueDarkSurge 10 лет назад

      You could use the alarms and have the missile rotate after the alarm and maybe have different levels the alarm gets faster.

  • @JungleJoable
    @JungleJoable 11 лет назад

    What would you do in case you wanted to rotate the room (with the gravity aswell)?

  • @freeintrosnci9341
    @freeintrosnci9341 7 лет назад

    how do i rotate a static image to have 4 sides? like one for up, one for down, and the ones for left and right

  • @primevenus6474
    @primevenus6474 5 лет назад

    how to rotate the view according to the rotation of the object in game maker so that the object rotates but it seems as the view is rotating

  • @SkyHawkthebeast
    @SkyHawkthebeast 10 лет назад +1

    could you show a tutorial how to make enemy objects step around other objects? I am currently making an rpg game for a project but the enemies keep on running into a wall and not stepping around it.

  • @Palanor
    @Palanor 12 лет назад

    Thanks for these Tutorials! Was confused how the UI worked and such for GMS, but thanks to you I got started. I already have basic knowledge of C#, but I wouldn't have figured out where to put the code without your help. Managed to code in a simple upgrade for the triple shot, make enemies have 5 health each and make them shoot down every 10 seconds
    Just curious though, will you be talking about Enemy behaviour in a future video? So they shoot towards the players position and such? Keep it up!

  • @raphaelwelti6632
    @raphaelwelti6632 8 лет назад

    Hi! How can i rotate a object that is made by: draw_rectangle(); ?
    changing the var image_angle doesnt help... Please help!

    • @danskyrev3408
      @danskyrev3408 8 лет назад

      Where you able to solve it? I'm having the same issue

    • @raphaelwelti6632
      @raphaelwelti6632 8 лет назад +1

      DanskyRev I wasnt able to solve it. I havent found answers, if you find sth. that works, i would be very thankful if you give me a answer :)

  • @ZinoVGator
    @ZinoVGator 7 лет назад

    I have a questions, I changed the part where my bullet is coming from in the spirit image and set it to the right of the spirit. However the bullet from that location just moves straight up and not where my mouse is located from that angle on the sprite. Is there any way for me to change it so that the bullet is in that position but when I shoot it, it will go where my mouse is pointed.

  • @toheedlangah
    @toheedlangah 9 лет назад +1

    ***** how do i make my player flip to the direction im moving i cant seem to make it work

  • @SIRA063
    @SIRA063 10 лет назад +1

    Can someone link to me the tutorial that explains how to change the sprite to face the direction im pressing.(I am making a platform game, and I use the up arrow key to jump, but the jump sprite animation is set to the sprite imagine that looks like hes jumping to the right. If I jump to the left, my guy jumps perfectly fine but the object uses the same sprite for the right jumping action.)

    • @strider7587
      @strider7587 7 лет назад

      I know this is 3 years late but here you go. Maybe this'll help someone else.
      In your controls make sure moving left is set to negative like this:
      key_left = -keyboard_check(vk_left);
      key_right = keyboard_check(vk_right);
      In your player's create event make sure to set the hsp and movespeed:
      hsp = 0;
      movespeed = 4;

  • @GaamingPros
    @GaamingPros 10 лет назад

    How do u connect a gun to the player

  • @graywolfe42
    @graywolfe42 8 лет назад +1

    Is there a reason you're resetting the sprite rotation every step? Wouldn't it make more sense to just set it once, when you make it? Or does if go back to default if you don't do it every step? It seems like a waste of CPU to have them reset every frame.

    • @jankotlar8783
      @jankotlar8783 8 лет назад +1

      The object's image_angle will then face the right direction, even if direction changes during the game

  • @raj25358112
    @raj25358112 7 лет назад

    I want to spin a wheel on its axis, pls tell me how to do that.

  • @potatotofilms
    @potatotofilms 8 лет назад +2

    Is there any way to make a "room" infinite and procedurally generated?

    • @anodosarcade7355
      @anodosarcade7355 8 лет назад +2

      Just use the "Infinite Room" button!

    • @anodosarcade7355
      @anodosarcade7355 8 лет назад +2

      Just kidding.
      For starters, look up how to make things appear out of frame as you move. There was a tutorial on how to make an 1942-like airplane shooter, one of the very first tutorials.
      Start there.

  • @microtrapstudios7506
    @microtrapstudios7506 8 лет назад

    What do I do? Anyone?
    I am making a game where you can turn 360 degrees. The character is turning towards the mouse. How can I make a hitbox next to the player in the right direction?(The direction the mouse is)

  • @ICvideos2011
    @ICvideos2011 12 лет назад

    Your tutorials are great. Just curious do you have any experience in completing a game or selling a game or working in the industry too?

  • @numeritos2156
    @numeritos2156 8 лет назад

    how can i rotate a object towards accelerometer?

  • @mattytwo-time9943
    @mattytwo-time9943 8 лет назад

    I'm currently creating a 2D side scroller. My main character's weapon is a boomerang. How can I get the boomerang to spin while moving and then return to the player? Do I have to create an animation or can I just rotate it with some code/drag&drop?

  • @btrain3369
    @btrain3369 10 лет назад

    How would I make an object spin fast and stop on a random spot? Like a game show wheel

    • @treyaye7246
      @treyaye7246 10 лет назад

      something with timers and image_angle += 1 but idk how to make it random

    • @LinkFaroreHylian
      @LinkFaroreHylian 10 лет назад

      Use something like test chance in the drag and drop event to make it random

  • @sebbes333
    @sebbes333 9 лет назад

    Help? (please link to good & relevant tutorials, thanks!)
    I want to make a space ship game, and I want my ship to glide around without any friction, so if I accelerate in 1 direction and then turn 90 degree I will continue gliding in the first direction, but when I then accelerate I will start to glide more and more towards that new direction, but still keep the initial momentum from the first acceleration, I managed to do it with hspeed & vspeed but I couldn't turn, then I tried speed & angle but that made it so the ship behaved like a car.

  • @antech9986
    @antech9986 9 лет назад

    Does anybody know how i can make space ship enemies in an arcade style shooter have its image_angle face the player wherever it moves?

    • @xedusk
      @xedusk 9 лет назад

      +Scope Gaming jibransyed.wordpress.com/2013/09/05/game-maker-gradually-rotating-an-object-towards-a-target/ is this what you're looking for?

    • @antech9986
      @antech9986 9 лет назад

      Devin Huffman Yeah, its exactly what im looking for, thank a lot! :)

  • @g1n059
    @g1n059 9 лет назад

    Hi, can you make a sonic slope tutorial it would be very awsome if you do.

  • @jojob1934
    @jojob1934 7 лет назад

    im making a platformer game with a duck as my main character i've enetered this code into a step event but my game jus acts like it's not even there

  • @buddyroach
    @buddyroach 12 лет назад

    man i wish there was a way to make a background spin. it would be especially useful on title screens and menu screens. oh well. :(

  • @SillyMind69
    @SillyMind69 11 лет назад

    how i can make an object to rotate using keyoard???

  • @GooogleMahi
    @GooogleMahi 7 лет назад

    how to calculate RPM in gms, please help

  • @mailmallett
    @mailmallett 6 лет назад

    Please do a tutorial on rotating tiles as I can only perform one transformation at a time and not together. I'm taring my hairs out.

  • @bliffity2692
    @bliffity2692 8 лет назад

    Can someone please link me to the background image he's using?

    • @maucross106
      @maucross106 8 лет назад

      You can search on images on google i guess, but you can do it by yourself, It's not difficult

    • @bliffity2692
      @bliffity2692 8 лет назад

      Mauricio Arizaca
      I know, it's just that after looking for 15 minutes I hadn't found a good image. I found one after I left this comment, though.

  • @EverScrolls
    @EverScrolls 10 лет назад +1

    So, uh, gonna tell us how to do the scrolling background?

    • @EverScrolls
      @EverScrolls 10 лет назад +1

      Nevermind, I basically figured it out.

    •  10 лет назад

      SensibleGaming i wanna know if i can make a object move in X angle, if it come in contact with another object.

    • @EnigmaticGraphics
      @EnigmaticGraphics 10 лет назад +1

      its also in his first video in this playlist ;), the code would be x+= 2;

    • @HJHawley7677
      @HJHawley7677 10 лет назад +1

      SensibleGaming He did tell us how in like, the second video.

    • @EverScrolls
      @EverScrolls 10 лет назад

      Hayden Hawley I made that comment ages ago.

  • @FaDramaTotal101
    @FaDramaTotal101 10 лет назад

    How i make like a rotation character in a loop? (like sonic)

    • @FaDramaTotal101
      @FaDramaTotal101 9 лет назад

      no like an loop of sonic 1 (the rotation at loop)

    • @FaDramaTotal101
      @FaDramaTotal101 9 лет назад

      ok...

    • @waynobeast
      @waynobeast 9 лет назад

      I am assuming you mean when sonic runs up and around loop? You could set image_angle to 90degrees + direction of the floor. That would work running from left to right and you would want to modify that for running thru a loop right to left. Just an idea. Haven't done it myself

  • @apriljack3172
    @apriljack3172 9 лет назад

    How do you make a object face another?

  • @chemikalfluffy
    @chemikalfluffy 10 лет назад

    Dude I was making a side scrolling 8-bit adventure game and the first set of tutorials helped me but the newer ones like this one, i didn't learn ANYTHING from it.

  • @billodahill
    @billodahill 10 лет назад

    i have a ship that moves in all directions using rotation but i'm having trouble making my bullets track my ship's direction so that they always fire out of the front. Like, I'm having problems referencing the direction of one object so i can set another object relative to it. can you help?

    • @billodahill
      @billodahill 9 лет назад

      you make left and right instead of moving you in those directions, make them change your direction, also i have already solved my own problem that i listed above

    • @mandersen2084
      @mandersen2084 9 лет назад

      SuperScope004 How did you fix it?

    • @billodahill
      @billodahill 9 лет назад

      When i created the bullets i set them to a variable, and set that variable's direction to be the image angle of the ship. Though i came to another problem with that, where the bullets will spawn from the ship's origin instead of the ship, and the obvious answer would be to move them, but the ship rotates and moving them to a different fixed position wont help. I might have to use trig the get the bullets to come out of the guns instead of the center of the ship.

    • @caster-
      @caster- 9 лет назад

      SuperScope004 set your origin in the point where you want the bullets to fire, then. Sure it may mess some of your other settings, but it's probably the most simple way

  • @CueDaNinja
    @CueDaNinja 10 лет назад

    Not really what I was looking for, but this could help me with my Shoot Em Up.

  • @Tiporax
    @Tiporax 9 лет назад

    when I start the game, my sprites just stay facing the right and don't turn whatoever

  • @muhamedhelmy3065
    @muhamedhelmy3065 7 лет назад

    excuse me sir how can i get a book

  • @zoasgame4251
    @zoasgame4251 9 лет назад

    wheres the video for how to do the shooting stuff

  • @D0ct0rPain
    @D0ct0rPain 10 лет назад

    just so you know, the angles are based on the unit circle used in mathematics ;)

  • @Syke1337
    @Syke1337 11 лет назад

    For those who are too lazy to turn your sprite bullet image into a horizontal bar, all you have to do is simply put: image_angle = direction-90;

  • @Darwinator
    @Darwinator 9 лет назад +11

    do you even math?

  • @Chroncitrus
    @Chroncitrus 9 лет назад

    Thanks, man for your tutorials there really helpful, they helped me create my first game,

  • @PackSciences
    @PackSciences 11 лет назад

    That explains a lot.

  • @Palanor
    @Palanor 12 лет назад

    Awesome, looking forward to it!
    Oh believe me I am :) Just sucks that I'm such a poor pixel gfx artist hehe.

  • @BPolitikAdam
    @BPolitikAdam 7 лет назад

    Thank you so much for this video you are amazing

  • @drakrtar
    @drakrtar 12 лет назад

    Oh and it's displaying accurately minutes/seconds/milliseconds ;)

  • @Kaganath
    @Kaganath 8 лет назад

    I tried to do this before watching the video and I succeeded... But after watching the video I realized I did it the hard way by typing variable.image_angle+= whatever the angle is, on each of those bullets. Shyiiiiiiiiit!

  • @simocennetten5239
    @simocennetten5239 5 лет назад

    thanks

  • @XGazudin
    @XGazudin 11 лет назад

    or + 90, it depends.

  • @Yipper64
    @Yipper64 8 лет назад

    thankyou!

  • @XGazudin
    @XGazudin 11 лет назад

    you should already know that if you watched his previous videos.

  • @agentpdx
    @agentpdx 11 лет назад

    THANK YOU SO $%#&ING MUCH!!!!!!!!!!!

  • @FreeStuffGirl21
    @FreeStuffGirl21 11 лет назад

    nope

  • @FreeStuffGirl21
    @FreeStuffGirl21 11 лет назад

    I’m not a guy, I’m a girl!

  • @arxonbby
    @arxonbby 8 лет назад

    I am trying to make a car drift a little when it turns. How do I do that?