Game Maker Studio 2 Easy Grappling Hook Tutorial

Поділитися
Вставка
  • Опубліковано 27 сер 2017
  • Thank you for watching & have fun learning!
    Full source code and courses www.codingmadesimple.com/
    Follow me on twitter for updates / realtutsgml
    Let's create a very simple yet very fun and effective grappling hook system in your own video game. If you have any questions or errors in your project feel free to comment and let me know! I will try to answer everybodys questions.
    • Game Maker Studio 2 Ea...

КОМЕНТАРІ • 71

  • @RealTutsGML
    @RealTutsGML  6 років тому +24

    I apologize to my headphone users, I've had trouble with the audio in both ears. This issue will definitely be fixed next tutorial. Enjoy!

    • @sodakid1919
      @sodakid1919 6 років тому

      Oddly enough I can hear in both sides just fine when I lower the volume. My headphones are really weird and will usually do the opposite.

    • @publicmockeryofaliar4901
      @publicmockeryofaliar4901 6 років тому

      RealTutsGML info comes through loud and clear. Worry about speakers when you do a dynamic audio tutorial !🤣 excellent tut btw

    • @what-uu3zn
      @what-uu3zn 4 роки тому +3

      but my left ear really enjoyed this

  • @enclavecafe
    @enclavecafe 6 років тому +18

    Wondering if you could make a tutorial that covers a grappling hook that works like a pendulum.
    So you can swing from side to side to get momentum for when you release the mouse button, like a rope.
    It would also be neat if you could make a followup to this, that fixes some of the issues currently present.
    With the system as it forks for now, you can draw a line through objects, which for testing purposes is fine, but would be better, if you had a sort of "Line of sight" system.
    You can also draw lines a good 10 or so pixels away from the actual solid objects. This looks odd and is of course not intentional. But a fix for this would also be appreciated ;)
    You can also literally pull yourself through other objects and essentially be stuck inside...
    Thanks a lot for the tutorial though ;)

  • @wurdlWeb
    @wurdlWeb 6 років тому +15

    my left ear enjoyed the video =) thumbs up

  • @InSTaDev
    @InSTaDev 5 років тому +1

    i actually love you. one of the best tutorials for rope swinging

  • @NertheInsane
    @NertheInsane 6 років тому

    Good timing! I sketched up a character that will have a grappling hook mechanic just the other day and was going to be my next project. Thanks man!

  • @ArachnidYouth
    @ArachnidYouth 6 років тому +3

    Perfect for my spiderteen game! thank you!

  • @fma1455
    @fma1455 9 місяців тому

    THE PERFECT TUTORIAL !!! Thanks

  • @SansTheSamurai
    @SansTheSamurai 6 років тому +2

    Just played Silver Grapple and I wanted to make a game with a grappling hook, this video helps a lot.

    • @aggbak1
      @aggbak1 6 років тому

      Not really

    • @SansTheSamurai
      @SansTheSamurai 6 років тому +2

      Abu Gbak You can modify the code to be better

  • @Artholos
    @Artholos 6 років тому

    Very cool, my dude!

  • @lucaxtal
    @lucaxtal 6 років тому

    WOW!!! Really cool!!!

  • @brandenfc9601
    @brandenfc9601 6 років тому +2

    Great tutorial! I noticed a small little bug though. If you grapple to a block and keep holding down the left mouse button to remain grappled: If you descend and collide with a surface that cannot be grappled, the player will bounce back up. Not sure if that's what you intended but I figured I would point it out. :)
    I would love to see a great platformer tutorial from you!

    • @mediamonger6514
      @mediamonger6514 6 років тому

      Did you ever figure out how to fix this?

    • @SILVERDRAGONITE01
      @SILVERDRAGONITE01 5 років тому

      i think i figured out the issue.
      if(active){

      gravity = 0.1;
      x += (mx - x) * 0.1;
      y += (my - y) * 0.1;
      }
      For this part of the code the plus(+) and equal(=) signs became switched when i entered it. After switching it back around to y+= instead of y=+ it fixed itself.
      Maybe that was the issue you encountered?

  • @redwarriorktf
    @redwarriorktf 6 років тому +2

    Thanks for the tutorial. was Brilliant. Would you be able to do a tutorial for a grapple swing. For example My character is running, then jumps off edge, Grapple hook shoots out at 45 degrees and the character swings at the momentum he was running. But doesn't retract.
    Thanks again.

  • @ic3yfr0ggy51
    @ic3yfr0ggy51 2 роки тому

    4 years later and now this is OUR code.

  • @NJDaOne-bi9ly
    @NJDaOne-bi9ly 6 років тому +1

    It was an awesome tutorial but i used a different collision and it works fine but when after i grapple once the charter would glitch into the platforms and only my and then my controls would not work

  • @larryteslaspacexboringlawr739
    @larryteslaspacexboringlawr739 6 років тому

    thank you for gamemaker video

  • @H0gwashing
    @H0gwashing 6 років тому

    great video! but i want to use a sprite for the rope, so i can add an endcap sprite, if there is a tutorial out there, please can you tell me what to search for

  • @PureGamesInc
    @PureGamesInc 6 років тому +11

    Hear that ladies? I'm a stud. ;)

  • @benvictim
    @benvictim 6 років тому

    how would you translate this system into more of a hook shot type thing? The player fires an object and then once the object collides, the player is pulled to the object.

  • @hemanthgaddey24
    @hemanthgaddey24 5 років тому

    Superb Tutorial! it save me a weekend of time! Wondering if you could make make a tutorial for hookshot or claw shot like the one in legend of zelda in 2d. It would make an awesome platformer. reply please. :)

  • @radhakrishnann6394
    @radhakrishnann6394 6 років тому

    can you please make a video on moving platforms and by players should be able to select a platform and move so the character can move along that will be really great and if possible using this grapple can we shoot

  • @grapeshott
    @grapeshott 6 років тому

    Can't we draw a line which changes it's shape according to the position of player w.r.t (mx, my)?

  • @garnerloudermilk1710
    @garnerloudermilk1710 6 років тому

    I was wondering how to code a friction based platformer. Where your player is sliding to stop and making slanted platforms that he slides down even when he isn't moving?

  • @ArachnidYouth
    @ArachnidYouth 6 років тому

    Small problem, my character falls though the floor and cancels out the collisions for the platforms. how do i fix that?

  • @TheJunkDrawer69
    @TheJunkDrawer69 Рік тому

    So I came to this after I did the movement of shaun spaldings tutorial and kinda mixed the two, for some rease the grapple entirely ignorest my collisions, PLEASE HELP.

  • @ecksdee4773
    @ecksdee4773 6 років тому

    hmm... interesting time to come out LOL!

  • @bagelthebeagle11
    @bagelthebeagle11 Рік тому

    the fact this guy made a platformer engine in 7 minutes

  • @RC-go2kl
    @RC-go2kl 6 років тому +2

    I'm such a stud

  • @mailorderpotato5700
    @mailorderpotato5700 Рік тому

    Not sure if this will even be answered, but for some reason when I tried this, my character ignores collision with the world around it and the grappling hook is applied but the character falls.

  • @tscmco9814
    @tscmco9814 Рік тому

    i have the message
    "unexpected syntax error"
    at 11:18 at the end of the tutorial someone has an idea please ?

  • @Re-yl8ym
    @Re-yl8ym 5 років тому

    I've been trying to figure out how to make a similar mechanic for a while, but rather than having the player hang from a string, I intended to have the hook hit the wall and stop moving, at which point the main character starts heading towards the hook and the hook disappears when touched by the player, resulting in the player falling back down. To do this, I have the objects oGrapplinghook, oWall and oPlayer. This is the code I used for Ograpplinghook:
    IN THE CREATE EVENT:
    global.contact=0
    IN THE STEP EVENT:
    if global.contact=1 {
    oGrapplinghook.speed=0;
    }
    if place_meeting(x,y,oWall) {
    global.contact=1;
    }
    if place_meeting (x,y,oPlayer) and place_meeting(x,y,oWall) {
    global.contact=2;
    }
    if global.contact=2 {
    instance_destroy(oGrapplinghook);
    }
    ...and for Oplayer, I used this code:
    IN THE CREATE EVENT:
    global.contact=0;
    IN THE STEP EVENT:
    if global.contact=1 {
    oPlayer.speed=60;
    oPlayer.direction=point_direction(x,y,oGrapplinghook.x,oGrapplinghook.y);
    }
    if global.contact=2 {
    oPlayer.speed=0
    }
    However, for whatever reason, when oGrapplinghook hits a wall, it doesn't stop as soon as it gets there, but rather travels most of the way through the wall and then stops, at which point it's followed by oPlayer which does the same thing. Could anyone tell me why this is?

  • @christopherlillo2436
    @christopherlillo2436 5 років тому

    how would i make it as a pickup item?

  • @wormlink8184
    @wormlink8184 6 років тому

    Is this game maker and what programming language are you using? Awesome video

    • @RealTutsGML
      @RealTutsGML  6 років тому

      This is Game Maker Studio 2 using GML (Game Makers scripting language) Thank you!

  • @gc2k4studio65
    @gc2k4studio65 6 років тому

    Does it work in the old version of GameMaker like 1.4.

  • @dantenevercry666
    @dantenevercry666 4 роки тому

    dude can help me? i write the colition code, and when i try it the player falls and pass through the bloqs, and i check everyting of the tuto and i find no clue (X . X) what it can be? please help

  • @MrDynamiteRocks
    @MrDynamiteRocks 6 років тому

    I wish you could explain more... I have no idea what place_meeting is or the creation code for rooms are. Next tutorial please explain more for beginners please.

    • @RealTutsGML
      @RealTutsGML  6 років тому

      Great suggestion, I'll make sure to cover these topics better in my future tutorials

  • @ZeroHoursTV
    @ZeroHoursTV 2 роки тому

    my right ear has been left out of this experiance

  • @MrDynamiteRocks
    @MrDynamiteRocks 6 років тому

    somebody please explain 11:25 in depth. I don't understand it.

  • @al-farsigames538
    @al-farsigames538 6 років тому

    Ok, how about creating a grapple object and by pressing a certain button, it hooks to the nearest grapple object

    • @SamplingKid
      @SamplingKid 5 років тому +1

      you could have global variables like global.hookspot (where the hook attaches) and then just have the player move towards global.hookspot but this is just a theory

    • @al-farsigames538
      @al-farsigames538 5 років тому

      I already found a solution look at my project: ua-cam.com/video/6lKEoKx0UPc/v-deo.html

  • @Chickfilae
    @Chickfilae 3 роки тому

    how about a dashing mechanic?

  • @Jalecko
    @Jalecko 6 років тому

    I would really like to see how to make the player bunnyhop

    • @waskoop829
      @waskoop829 4 роки тому

      arent u that guy who participated in jonas' wowie game jam

  • @jazperruedas8114
    @jazperruedas8114 6 років тому

    Can you translate it in gamemaker 1.4 just for some reason please

    • @raspberry_picker395
      @raspberry_picker395 6 років тому +1

      Coding and gml basically didn't change. A few functions did, and a few were added, but it's mostly the same. Should work for 1.x.

  • @x8squish8x16
    @x8squish8x16 6 років тому

    link is broken

  • @loot6
    @loot6 6 років тому +1

    11:47 "fasten" lol...

  • @andrijaadamovic87
    @andrijaadamovic87 6 років тому

    Can you make that in java

  • @wormlink8184
    @wormlink8184 6 років тому

    Oops didn't see it there lol

  • @Believerscreeed
    @Believerscreeed 5 років тому

    This isn't working for gms 1...
    Plz help

  • @Leon_Engelhardt
    @Leon_Engelhardt 2 роки тому

    7;46

  • @leandra7258
    @leandra7258 5 місяців тому

    You are a gennius
    sorry, i´m portuguese

  • @MrStealYoGrill4Life
    @MrStealYoGrill4Life 6 років тому

    welp

  • @lincolndog6502
    @lincolndog6502 6 років тому

    im gonna make a game, Where you have a Grappling hook, But if you Hit it on a Red Block, It Bonces off, And Can Squish your player

  • @raspberry_picker395
    @raspberry_picker395 6 років тому +1

    Its cool, but not really a grappling hook. When i think of grappling hooks, i think of spider man. Looks cool though, might use it in the future with some tweaking. I like it, but its not really grappling hook imo.

  • @jamesraphaelibay6664
    @jamesraphaelibay6664 5 років тому

    attack on titan

    • @redrussian422
      @redrussian422 2 роки тому

      That is the exact reason I'm watching this

  • @Artholos
    @Artholos 6 років тому

    Very cool, my dude!