Make a Top-Down Shooter in 11 Minutes in GameMaker Studio 2

Поділитися
Вставка
  • Опубліковано 19 гру 2024

КОМЕНТАРІ • 149

  • @chutney88
    @chutney88 3 роки тому +34

    I've done many tutorials in the last 6 months (both paid and free) and this was one of the absolute best. As a beginner I often find the code and logic hard to follow, but I understood this 100%. Not only that but it took hardly any lines of code to make a decent little top down shooter and I appreciate the little touches you added like placing the gun behind or in front depending on the direction it was facing. Cheers!

  • @drunkenduck5451
    @drunkenduck5451 3 роки тому +25

    everybody gangsta until some potata starts walking with SQZD

  • @mellon6036
    @mellon6036 3 роки тому +26

    Quick, easy, straight to the point, you earned a sub my guy.

    • @PyroFrozt
      @PyroFrozt 2 роки тому +1

      Exactly! Just show me how it's done. More coding videos should do this instead of explaining and droning on lol

  • @erglwrgl
    @erglwrgl 10 місяців тому +1

    I love how straightforward this is

  • @xablep8849
    @xablep8849 4 роки тому +26

    What a useful and well done tutorial, I am really going to use it, thanks dude. I wish you continue with this project, get luck

    • @blobfishdev
      @blobfishdev  4 роки тому +3

      Thanks glad to hear it's helpful!

    • @vipergamingyt4974
      @vipergamingyt4974 3 роки тому +1

      ​@@blobfishdev It Has this error in my code:
      Object: o_game Event: Step at line 4: malformed assignment
      This was what i wrote for the code at the step event:
      var enemies = instance_number(o_enemy);
      var allDead = true;
      for (var i = 0; i < enemies;i **) {
      if (!instance_find(o_enemy, i).dead) allDead = false;
      }
      if (allDead) game_restart();

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

      @@vipergamingyt4974 its suppose to be i++ not i**

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

      @@zitrix7848 Thanks

  • @EbagStudios
    @EbagStudios 8 місяців тому

    This is exactly what I needed! Just a basic start for me to build off of!

  • @ttttjjjj
    @ttttjjjj 11 місяців тому

    I made my first game because of you and I am gonna improve my game from here now, THANKS!!!

  • @Setanta93
    @Setanta93 4 роки тому +1

    As I said, rapidly becoming the best GMS:2 channel on YT.

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

    just found this game on steam and it's cool to see some behind the scenes of it

  • @joakazket
    @joakazket 4 роки тому +5

    T'es le Edmund McMillen français (ou autre pays francophone je ne sais pas) pour moi
    Franchement t'as un super style et tu mérites tellement de succès,
    ça fait plaisir de voir de l'originalité en France ! J'ai acheté ta collection et j'ai très hâte d'y jouer !
    J'ai aussi hâte de voir du nouveau contenu sur ta chaîne

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

    Wow! I was just browsing youtube for some tutorials, I found your channel. I love this bitesize tutorial and the way you explain makes it look so easy. Thank you for taking the time to share your knowledge.

  • @ZedsArcade
    @ZedsArcade 3 роки тому +1

    Hi Thomas, Just wanted to thank you for this great, very concise, informative and clear tutorial, thoroughly enjoyed it!

  • @BossAleks123
    @BossAleks123 3 роки тому +1

    damn i am shoked how good this was

  • @michaelfurimmer6620
    @michaelfurimmer6620 4 роки тому +1

    Thanks dude:) youre helping me a lot with this things, im finally going to finish my first project, so thanks

  • @EmmanO12345
    @EmmanO12345 3 роки тому +1

    Btw if u didn’t notice ( I my don’t notice at first ) you go to file explorer and that’s where u get all the asssets

  • @Omar-vp1cf
    @Omar-vp1cf 4 роки тому

    These are really great! Love the multiple short tutorials!

  • @aadiththegamer6311
    @aadiththegamer6311 3 роки тому +1

    You are a lifesaver dude!

  • @evil-guy-awesome
    @evil-guy-awesome 2 роки тому

    this is incredibly straight forward :)

  • @_Garm_
    @_Garm_ 8 місяців тому

    was a really greate tutorial! , hope you will have more tutorials :D

  • @zitrix7848
    @zitrix7848 2 роки тому +2

    how do i add health to the enemies?
    i've tried to create a variable health
    and then health--; each time the enemie get's shot and if the health reaches 0 than the enemie dies but then all the other enemies are 1 shot? Can someoney help please.

    • @thesamgameyt2846
      @thesamgameyt2846 11 місяців тому

      Hey, first of all I'll tell you that my English is not very good and I'm also just learning this programming thing, but I still see the changes I made and it might help you,
      We first go to the create event of the enemy object and there you add the variable health_ with the life you want to put
      You just add a line like this
      health_ = 3;
      Later on the same object but the collision event with the bullet, some lines were added so that the event window should be with these lines
      instance_destroy(other);
      health_ -=1;
      if health_ < 1 {
      dead = true;
      audio_play_sound(aDeath, 1, false);
      layer = layer_get_id("bodies");
      } else {
      dead = false; }
      And that's all, if something goes wrong or you have questions you can still send them here
      One last thing, if you want to try this, I recommend that you move the enemies away from the player in the room

  • @robbe73
    @robbe73 4 роки тому +2

    Thank you for this well made tutorial! I appreciate that you are quick and to the point, but still take time to explain what you are doing. I wish more tutorials used this style and tempo!
    I learned a few useful things that I will use in my own projects soon.
    If you make more videos like this, I will definately check them out. Keep up the good
    work!

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

    Great tutorial! clear and concise.

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

    This was a really nice introductory tutorial on game maker and it helped me understand the ui a bit more. Though I do think you need to make a video on gamemaker language for others to understand it a bit easier, I write in csharp so this was quite easy for me to understand. But really nice video overall!

  • @gucciice
    @gucciice 3 роки тому +1

    Can you make a tutorial of how to add collision to the walls

  • @erglwrgl
    @erglwrgl 10 місяців тому

    No wonder this reminds me of Brotato, you created the game!

  • @50-blessings92
    @50-blessings92 7 місяців тому

    i quit game maker but this gave me hope to move forward

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

    You deserve more subs man!

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

    best tutorial thanks now i understand it a bit

  • @imdavidanimations2018
    @imdavidanimations2018 3 роки тому +3

    thank you so much! I just started learning GMS2 and I can say it easier than I thought. Thank you. But question how do you add collisions on the walls?

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

      You'd usually place objects where the walls are and check for collision with those objects. This is what I've done in the platformer tutorial ua-cam.com/video/uKXCI1qC_LQ/v-deo.html and you can do the same thing here

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

    whats up with the sharp noise at 4:07

  • @frogboi1762
    @frogboi1762 3 роки тому +1

    you the best you helping me a lot thanks

  • @sleepysundaymorning5034
    @sleepysundaymorning5034 3 роки тому +2

    Your character will displace faster if you activate both axes, you need to normalize the x and y vector magnitudes by Pythagoras' theorem:
    if(xMove != 0 && yMove != 0) {
    x += xMove * sqrt(0.5) * player_speed;
    y += yMove * sqrt(0.5) * player_speed;
    }
    else {
    x += xMove * player_speed;
    y += yMove * player_speed;
    }

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

      Good point

    • @sleepysundaymorning5034
      @sleepysundaymorning5034 3 роки тому +1

      @@blobfishdev i figured a less messy way:
      var diagonal = 1;
      if((hSpeed * vSpeed) != 0) {
      diagonal = sqrt(2)/2;
      }
      x += hSpeed * walking_speed * diagonal;
      y += vSpeed * walking_speed * diagonal;

  • @TubularBard
    @TubularBard Рік тому +1

    how do you put the Ogame in the instances?

  • @vitorkash
    @vitorkash 11 місяців тому

    When I shoot the enemy, it makes the sound of death but the enemy does not disappear. How can I solve it or what would be the error? Thanks

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

    your a legend cheers mate, if I want to make the player object follow the camera/mouse instead of the gun object can I use the code from the gun in the player object instead,
    for example if I want the character to strafe based on the direction they are facing rather than going right on the screen when I press D the character goes to thier current right when I press D

  • @matteovai7323
    @matteovai7323 4 місяці тому

    how can i make the player collide with the room, so the player doesn't go out of the window?

    • @antmydude236
      @antmydude236 3 місяці тому

      If player touches object set acceleration to 0. Something like that.

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

    this is honesty the best tutorial ive seen the only thing thats not working for me is the gun angle it follows the mouse but quite poorly and sometimes just stops

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

      nevermind it works perfectly i just did the mouse_y wrong

  • @Water-Nelon
    @Water-Nelon Рік тому

    Your video was very helpful, but how do I aim with the a joy stick?

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

    When I add event and create it the o game events pop up doesn’t show the lines where I’m supposed to add the code

  • @Hozgen
    @Hozgen 8 місяців тому

    dude, i wanna ask you something if you don't mind. Can you tell me how did you balance the card system and stat system? :D is there any way to balance it mathly? ^^

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

    That's great! Are you going to make a serie out of this one ?

    • @blobfishdev
      @blobfishdev  4 роки тому +3

      I'm probably going to make more tutorials for other types of games in the same style (platformers, tower defense etc) but not on this specific game

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

    I wish you are back making few tutorials each month, you have great teaching skills. Cu you in 2024

  • @NoBothere538
    @NoBothere538 11 місяців тому

    This Is A LIfe Saver (I Had To Make a Game In Less Then 2 Days Thank You SO Much BRo)

  • @Wigglett_jr
    @Wigglett_jr 2 роки тому +1

    when i shoot it adds speed to me not the bullet

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

    How could you make the enemies gradually spawn on the edges?

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

      Code a simple timer (or use alarms) and everytime it goes off, spawn an enemy. To get the spawn position you could create an enum Direction { TOP, BOTTOM, RIGHT, LEFT } then choose randomly between those and then set the x and y depending on the direction:
      x = 0 and y = random_range(0, room_height) if it's Direction.LEFT
      x = room_width and y = random_range(0, room_height) if it's Direction.RIGHT
      x = random_range(0, room_width) and y = 0 if it's Direction.TOP
      x = random_range(0, room_width) and y = room_height if it's Direction.BOTTOM

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

      @@blobfishdev I ended up doing a simpler version of this where there's a floored random number 0-3 and if its 0 then x=0 y=random(room_height)

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

    how do i get more enemies?

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

    @Blovfish sorry where's teh code u mentioned in the description bc i wanna try~it and idk where's the code
    Btw great video

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

      thomasgvd.itch.io/top-down-shooter
      You can download the .yyz file here which contains the gamemaker project. Then the steps are:
      Extract the file from the zip archive (right-click => extract here)
      Open GameMaker Studio 2, click on File then Import Project and select the .yyz file
      Save the project wherever you want.

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

    nice tutorial, keep it up!

  • @akiravelicka8363
    @akiravelicka8363 3 роки тому +2

    i love this moment when i follow the tutorial word by word and the game doesn't fucking run for no reason. I've been writing and rewriting the same codes for five hours and the game simply refuses to run, I've lost count of how many times I've watched this tutorial and the game just won't run, i give up
    edit: btw, awesome tutorial, i am just way too dumb to do anything right

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

    Thanks for the tutorial but how do I add more levels

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

      Basically create more rooms and instead of restarting the game when all enemies die change room to the next level instead

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

    Hey! Very nice tutorial! I downloaded the asset pack and I notice you can go outside of the corners? How do you fix that? I just want it to be in the square when moving

    • @blobfishdev
      @blobfishdev  3 роки тому +2

      An easy way to do it would be to replace this code in the oPlayer step event:
      x += xMove * spd;
      y += yMove * spd;
      With this:
      x = clamp(x + xMove * spd, 32, room_width - 32);
      y = clamp(y + yMove * spd, 32, room_height - 32);
      This limits the min and max position of the player to the borders of the room. If you want to make more complex levels you'll need to create wall objects (or tiles) and check for collision with those when moving the player.

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

      @@blobfishdev Thank you!

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

      @@blobfishdev Was also wondering? How do you get out of the full screen when you run the game? Pressing escape, doesn’t seem to work

    • @blobfishdev
      @blobfishdev  3 роки тому +1

      @@angelbaby3342 Yeah GameMaker doesn't do it automatically, we need to code it.
      In your oGame Create event, remove the line:
      window_set_fullscreen(true)
      And in the oGame Step event add some code to check when the player presses the esc key to switch the full screen mode.
      if (keyboard_check_pressed(vk_escape)) {
      window_set_fullscreen(!window_get_fullscreen());
      }
      With this code if the game is in full screen, pressing escape will make it windowed and if it's windowed pressing escape will make it full screen.

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

    Player and enemies can escape through the wall layer. Shouldn't you collide with the wall layer?

    • @blobfishdev
      @blobfishdev  4 роки тому +2

      Yep I wanted to keep it short but you should add collisions if you want to expand on it

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

    so, for some reason, my character shoots with his belly

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

    can i use the assets for another game? like the egg

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

      Sure

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

      @@blobfishdev thx i was gonna make a game tysm i can make demos with the assets

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

    Thank you sir!

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

    4:21 Je ne comprend pas pour les controles, j'ai écrit exactement pareil
    var xMove = keyboard_check(ord("Q")) - keyboard_check(ord"D"));
    var yMove = keyboard_check(ord("S")) - keyboard_check(ord"Z"));
    et j'ai toujours un logo rouge a gauche et les messages d'erreur lorsque je lance le test

    • @blobfishdev
      @blobfishdev  3 роки тому +1

      Il y a écrit quoi dans le message lorsque tu passes ta souris sur l'icône rouge ou quand tu essaies de lancer le jeu ?

    • @Guigui1080p
      @Guigui1080p 3 роки тому +1

      @@blobfishdev sur la première ligne, la première icône rouge me dit "Obtenu 'D' (str) alors que ',' était attendu" et lorsque je lance le test, il y a marqué :
      Objet : Oplayer Événement : Étape à la ligne 1 : got 'D' expected ',' or ')'
      Objet : Oplayer Événement : Étape à la ligne 1 : got 'D' expected ')'
      Objet : Oplayer Événement : étape à la ligne 1 : malformed assignment statement.
      Désolé du dérangement ça se trouve c'est très simple et je passe pour un débile 😅😂 Mais merci d'avance !

    • @blobfishdev
      @blobfishdev  3 роки тому +1

      @@Guigui1080p Tu as oublié une parenthèse pour le deuxième élément de chaque ligne : keyboard_check(ord"D")) et keyboard_check(ord"Z")), juste avant le "D" et le "Z"
      Ca devrait être :
      var xMove = keyboard_check(ord("Q")) - keyboard_check(ord("D"));
      var yMove = keyboard_check(ord("S")) - keyboard_check(ord("Z"));
      (et d'ailleurs tu as aussi inversé le Q et le D par rapport à mon code ce qui va t'inverser le mouvement sur l'axe horizontal)

    • @Guigui1080p
      @Guigui1080p 3 роки тому +1

      @@blobfishdev Hoo okai merci !👌🏻

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

    Brill... love to see more, ta

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

    Salut
    Merci pour ton tuto j'ai quelqeu souci a crée le layer Bullets a :9.47
    Quand je tire j'ai cette erreur :
    ERROR in
    action number 1
    of Step Event0
    for object o_player:
    instance_create_layer :: specified layer "bullets" does not exist
    at gml_Object_o_player_Step_0 (line 20) - with (instance_create_layer(x, y, "bullets", o_556)) {
    ############################################################################################
    gml_Object_o_player_Step_0 (line 20)
    Je trouve pas ou est mon erreur.
    Merci

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

      Tu as du oublié de créer le layer appelé "bullets" dans la salle (ce que je fais à 9:53) ou alors les noms ne correspondent pas exactement

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

      @@blobfishdev merci j'avais pas vue ... j'ai chercher pendant 2h XD merci pour ton tuto exeptionnel !

  • @paris.v7137
    @paris.v7137 3 роки тому

    Thank you!!

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

    the ALT dragging is not working

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

    Thanks!

  • @tiengtrunghuylong1947
    @tiengtrunghuylong1947 2 місяці тому

    blobfish is the best

  • @TADPoLE21o6
    @TADPoLE21o6 2 роки тому +1

    5:42

  • @EmmanO12345
    @EmmanO12345 3 роки тому +1

    Good tutorial.. but I think it could be more useful if you explained why we do the stuff

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

    thanks vary useful and fast and easy.

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

    i dont have any of those options for maps

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

    @Thomas Gervraud It Has this error in my code:
    Object: o_game Event: Step at line 4: malformed assignment
    This was what i wrote for the code at the step event:
    var enemies = instance_number(o_enemy);
    var allDead = true;
    for (var i = 0; i < enemies;i **) {
    if (!instance_find(o_enemy, i).dead) allDead = false;
    }
    if (allDead) game_restart();

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

      In your for loop you wrote i** instead of i++

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

      @@blobfishdev Thanks!

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

      @@blobfishdev NOOB QUESTION How do you get out of full screen esc does not work

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

      @@vipergamingyt4974 You need to code it. In your o_game step event add some code to check when the player presses the esc key and set full screen mode to false. It'll look something like
      if (keyboard_check_pressed(vk_escape)) {
      window_set_fullscreen(false);
      }

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

      @@blobfishdev Oh thanks, you rock!

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

    you earned a sub!

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

    pls add how to make infinite levels or a wave mode

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

    can you make a tutorial about a platformer shooter?

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

    my game crash everytime i kill an enemy, can anyone help?

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

    can't find the code

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

    How to do this in unity ?

    • @blobfishdev
      @blobfishdev  3 роки тому +1

      I'll probably make the same tutorial for Unity later

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

    Hello i am Back after 1 year :) still enjoy you

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

    ram into a problem where the bullets make me fly away and the bullets don’t move at all lmao

  • @thenoiseshow-l4e
    @thenoiseshow-l4e 14 днів тому

    thank ya

  • @Peter.Griffith
    @Peter.Griffith 3 роки тому

    thank you

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

    Never seen someone use zqsd before

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

    WHEN I PRESS A IT BRINGS ME TO THE TOP LEFT CORNER AND WHEN I PRESS D IT BRINGS ME TO THE BOTTOM RIGHT CORNER HELP MEEEEEEEEEEEEEEEEEEEE

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

      make sure when you use the x = or y = command that you make it equal itself plus the movement speed. Example: x = x + Pspeed;

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

    is gml or dnd

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

    it said 11 mins but it took 4 hrs or more to finish this vid

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

    where is the code

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

      thomasgvd.itch.io/top-down-shooter
      Import the .yyz file into GameMaker Studio 2 and you'll have the code

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

    thx

  • @slob5041
    @slob5041 7 місяців тому

    brown blaster

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

    he can walk through the walls

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

      Yeah there's no collision code

  • @miko8148
    @miko8148 3 роки тому +3

    Are you french ?

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

    Weres The Code hmmm?

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

      The project file is on the itch.io page

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

    now how to spawn enemies hahahaha

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

    why the fck movement is QZSD

    • @blobfishdev
      @blobfishdev  2 роки тому +3

      In France our keyboards are AZERTY and not QWERTY so the layout is different

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

      french

  • @JaydenWong-p1q
    @JaydenWong-p1q 9 місяців тому

    WHY SPRIT COST MONEY

  • @MDevlog
    @MDevlog 4 роки тому +2

    great tutorial!
    but it will be better if it in 30min not 10min.

    • @blobfishdev
      @blobfishdev  4 роки тому +11

      Why take 30mn if it can be done in 11?

    • @MDevlog
      @MDevlog 4 роки тому +3

      @@blobfishdev make it better xD
      its good but I it still need a lot of things so maybe 30 is better (I mean make it longer and add more stuff)

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

    fait en en francais ;)

  • @JaydenWong-p1q
    @JaydenWong-p1q 9 місяців тому

    I NO

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

    Thank you!