Space Shooter 2 - Enemy Collisions

Sdílet
Vložit
  • čas přidán 1. 06. 2024
  • How to build a fast paced space shooter based on the classic arcade game Asteroids, but with Lemons! In this second part of this Scratch tutorial we cover enemy Lemon spawning and movement, and delve into the slightly complex world of clone to clone collisions. We also look at making the lemons split into pieces when destroyed. That leaves us with the exciting explosion flashes, screen shake and more for part 3!
    Wondering why Lemons? Well, Lemons were the first fruit to have achieved interstellar capability and are thus attempting to take over the universe. To tackle such a scenario we obviously need to fight back with rapid fire lemon busting lasers!
    🚀 Boost Your Creativity with Griffpatch
    The Griffpatch Academy will take you from "Gamer to Game Creator"
    Learn more at 👉 griffpatch.academy 👈
    😺 Scratch was developed by the Lifelong Kindergarten Group at the MIT Media Lab. See scratch.mit.edu
    🐱 Scratch Starter Project Game Assets
    scratch.mit.edu/projects/5488...
    👀 Simple Space Shooter
    Part 1 - • Code a Fun Space Shoot...
    Part 2 - • Space Shooter 2 - Enem...
    Part 3 - • Space Shooter 3 - Came...
    Bonus - Scores - • Awesome Number Counter...
    Bonus - Health Bars - • AMAZING HEALTH BARS in...
    Part 4 - • Easy Scratch Space Sho...
    ❤️ Enhanced Scratch Developer Tools
    www.griffpatch.co.uk/
    📹 The Awesome Video Editing software I use (Camtasia)
    techsmith.z6rjha.net/5bajbo
    -------------Video Chapters-------------
    0:00 Intro
    00:43 Game Music & Sounds
    02:34 Drawing a Lemon
    03:57 Coding a Lemon
    08:47 Wrap around lemons
    11:20 Spinning Lemons
    14:29 Lemon Laser Laser Lemon
    16:55 Touching Race Conditions
    19:29 Splitting the Lemon
    22:18 Fix Collisions II
    23:49 Episode 3
    24:14 Members Projects
    25:23 Outro

Komentáře • 1,7K

  • @griffpatch
    @griffpatch  Před 2 lety +168

    Part 3 - czcams.com/video/RKdXM3x-jEo/video.html

  • @TamzidDd
    @TamzidDd Před 2 lety +18

    Regular scratches: do a create a clone of myself in a forever loop
    Griffpatch: Lets make a new custom block with an input value of...

  • @jumpshotz56
    @jumpshotz56 Před rokem +21

    I love how he doesn't just tell us what to do, he explains it to us so we can understand what he is doing.

    • @sammythecrafty6000
      @sammythecrafty6000 Před 9 měsíci

      true

    • @daniyalnaeem7080
      @daniyalnaeem7080 Před 6 měsíci

      But sometimes i dont understand like in last episode i didnt understand the make movement if u do know how it works do explain it to me thanks

  • @luvly.fatimah
    @luvly.fatimah Před měsícem +2

    griffpatch is the type of teacher we all wished we had

  • @lasercatto
    @lasercatto Před 2 lety +118

    One thing we learned from all this:
    griffpatch likes lemons.

    • @dabomd4568
      @dabomd4568 Před 2 lety +10

      its the same lemons from the non euclidan world

    • @walterbeckett9461
      @walterbeckett9461 Před 2 lety +2

      it wasn't lemon shooter without lemons.

    • @yohant1470
      @yohant1470 Před 2 lety

      @@walterbeckett9461 yup

    • @griffpatch
      @griffpatch  Před 2 lety +32

      They are strangely compelling in computer games right :)

    • @rafaeldominicpascual8933
      @rafaeldominicpascual8933 Před 2 lety

      lemon!
      *eats*
      AAAAAAAAAAAAAAAAAAAAAAAAAAAAAHHHHHHHHHHHHHHHHHHHHHHHHHHH

  • @trombone28
    @trombone28 Před 2 lety +33

    What I love about your tutorials is that they don't need to be used for one specific game. For example, I'm using some of the scripts in this video to help me make a Rougelike zombie game, and the code is very easy to transfer. Keep up the good work!

    • @suhairbasha
      @suhairbasha Před rokem

      you know my space shooter is in production and will be released in scratch tomorrow at 6:30 pm.
      Search Prime_Panda Lemoniod invasion

  • @anjanakumari6008
    @anjanakumari6008 Před 2 lety +12

    I liked when you said,"welcome to the world of mathematics of move block."

  • @zulianfr
    @zulianfr Před 2 lety +2

    I love watching your videos not because I actually follow your tutorial, but because of all the little tips & tricks that are actually so usefull
    Things like spinning moving object or detecting 2 sprites collisions are things I've always been struglling with and sometimes never find a viable solution
    And more generally it helps understanding how Scratch works
    Also your editing is feeling better, makes the video more smooth and pleasant to watch

  • @chronovortex6495
    @chronovortex6495 Před 2 lety +8

    Ngl, this channel is a treasure trove for beginner to intermediate scratchers. Not only do you give us ideas, you also point out hidden mechanics in scratch that makes coding easier, and also practical applications for those and workarounds to problems encountered. Definitely a well earned sub.

  • @nba-live-army8028
    @nba-live-army8028 Před 2 lety +57

    Everyone gets excited when a new griffpach tutorial, right?! I mean, who wouldn't? It's GRIFFPATCH!!!

  • @davidrowe4099
    @davidrowe4099 Před 2 lety +12

    “I can almost feel those lemons charging up their juice powered space drives!” -griffpatch

  • @rasmusvanwerkhoven1962
    @rasmusvanwerkhoven1962 Před 2 lety +5

    Hey, Griffpatch! Thank you so much for making this tutorial! I’m not making a shooter game, tho I’m utilizing your BIG costume technique and did the exact opposite! I realized that the costumes I created couldn’t get any bigger in size, so I made the smallest square I could make and set its size to 300%. After that I could easily change the costume to any other way larger costume!

  • @tuxuni2587
    @tuxuni2587 Před 2 lety

    Thank you very much for making informative content like this, I’ve been using scratch since 2016 and I’m still learning new ways to tackle problems now!

  • @yannismorris4772
    @yannismorris4772 Před 2 lety +8

    The info here is monumentally useful. I and my future projects thank you.
    The part where you recreated the "move (Value) steps" block reminded me of that time I accidentally recreated the "Glide towards" block. It gives you more control over the code

    • @Red_impostorYT
      @Red_impostorYT Před 2 lety

      how do you accidentally remake a block in scratch

    • @yannismorris4772
      @yannismorris4772 Před 2 lety

      @@Red_impostorYT Basically I ended up with a block that manually calculated distance and cut up that distance into even-sized increments.
      I was trying to make a different version of this algorithm that makes your sprite move slower/take smaller steps the closer it got to its target. Only I didn't want the steps to get smaller.
      So I made a block that made the sprite move in equal increments the whole way through and I realized that I just did the math (or something like the math) behind the Glide Towards block

    • @Red_impostorYT
      @Red_impostorYT Před 2 lety

      @@yannismorris4772 cool

  • @wonkuschunguscultmanagment3545

    Yet another amazing video! I love these tutorials, especially when I learn new things!
    Cant wait for part 3. I really wish I could become a member! But I just cant afford it currently.
    I hope you make a way to have all the lemons more optimized and such, as the lemons are making high clone count and the little ones are pretty hard to even shoot. But I believe you'll fix that, you're Griffpatch!
    Anyway, thank you for the great tutorial!

    • @eojdraw4481
      @eojdraw4481 Před 2 lety

      😙😙😙
      Please kindly subscribe and share!
      To subscribe:czcams.com/channels/EwrJbpY5sDzt6iN7834BcA.html

  • @lachaase
    @lachaase Před 2 lety +1

    Thank you for explaining the collisions effectively! I bet I would not have known soon if the bug occurs! Nice tutorials, looking forward to your further tutorials.

  • @blurrysquire6671
    @blurrysquire6671 Před 2 lety

    i was in a discord server and most people where saying how great you are griffpatch, now honestly i had never seen your content and now i'm hooked on it. Keep up the great work!

  • @tuckerbetz9585
    @tuckerbetz9585 Před 2 lety +9

    Thanks so much for the tutorial! I'm loving this series. I find it rather amusing to replace the lemon sprites with the faces of politicians...

  • @Mr_Gamer_123
    @Mr_Gamer_123 Před 2 lety +21

    Just saying: If I could sub to you 5 billion times, I would. Fantastic channel and easy-to-understand even for beginner programmers. Thanks for all the help! It means a lot 👍🏻

    • @potatoes_are_scrumptious
      @potatoes_are_scrumptious Před rokem +2

      Wait a minute, you can! You can just make 5 BILLION ACCOUNTS to do it! But it will take a very long time. I also think griffpatch is a cool dude.

    • @CursedXyster
      @CursedXyster Před rokem

      @@potatoes_are_scrumptious in fact, you would die before you even made all 5 billion accounts

  • @vaniganesan9881
    @vaniganesan9881 Před 2 lety

    I love the creative ways you tackle problems!

  • @GrimdarkTigy
    @GrimdarkTigy Před 2 lety +3

    The part at 12:24 might actually be really helpful for a zombie shooter project I was making! I was trying to add scrolling to the game, but I was unable to figure out how to keep the zombies moving toward the player while storing their position in an x and y variable.
    Edit: It works! I guess I'll have to finish making the scrolling then... lol

  • @Its_PacFan
    @Its_PacFan Před 2 lety +5

    This tutorial series has been proven to be very informative! I quite like it! I also never knew that you can use the ALT keys when making art on Scratch, lol. (Despite me being on the site for 3 Years)

    • @griffpatch
      @griffpatch  Před 2 lety +4

      I always how to include any little tips I can :)

  • @aviralbhattacharya6258
    @aviralbhattacharya6258 Před 2 lety +28

    Whooooooo AMAZING!!! YOU ARE REALLY THE BEST SCRATCHER…….

  • @kaebifan
    @kaebifan Před rokem

    I love your tutorials, they help me learn new stuff I never thought was possible!

  • @ScienceWorldz
    @ScienceWorldz Před 2 lety +2

    Griffpatch, in your Scratch Addons for chrome, add block switching also, it helps you a lot to replace blocks in the most similar blocks like 26:05 you can then right-click and select set y after this addon is added

  • @sbfshadoe9918
    @sbfshadoe9918 Před 2 lety +3

    24:34 and 24:59 congrats razkanaz and judpomme!! i'll get some inspiration!!

  • @Taelo
    @Taelo Před 2 lety +3

    It's a good day when griffpatch uploads

  • @paperplanemaster7055
    @paperplanemaster7055 Před 2 lety +2

    I love how you explain your ideas in an easily understandable way, even my 6 year old brother could understand. Loved the video!!!

    • @dante_ksk
      @dante_ksk Před 2 lety +1

      as an 8 year old kids also can understand

  • @puppyface7117
    @puppyface7117 Před 2 lety

    I loved this project it was a blast! Literally.

  • @ElectoSteths
    @ElectoSteths Před 2 lety +12

    1:53 griffpatch: i can almost feel those lemon charging up their juice powered space drives
    Me: so they are robot lemons now?

    • @griffpatch
      @griffpatch  Před 2 lety +3

      Nope, they are just very clever.

    • @tantalaytermvanich3292
      @tantalaytermvanich3292 Před 2 lety

      @@griffpatch I love your vids griffpatch! The music will definitely be intense!

    • @llIIIIllllIIllIIIlllIIIIlIllII
      @llIIIIllllIIllIIIlllIIIIlIllII Před 2 lety

      @@griffpatch clemon

    • @shw00by10
      @shw00by10 Před 2 lety

      @@griffpatch when a couple of lemons are more technologically advanced than the entire human race: *nervous sweating*

  • @Le_BluBird
    @Le_BluBird Před 2 lety +7

    "Lemon!"
    * eating noises, followed by a scream in dismay *

  • @ellielovestoast
    @ellielovestoast Před 7 měsíci

    such a great tutorial series!! keep it up!

  • @Fliippoi
    @Fliippoi Před 3 měsíci

    i just love how he makes mistakes in his code then fixes it later and explains how it made a problem to show us how to fix it later on in our coding journey.

  • @aimeechor
    @aimeechor Před 2 lety +9

    Try making the biggest lemons shoot mini-lemons! This will add a bit of a challenge, as it’s quite easy to shoot lemons. Also try adding a “points” counter that shows how many lemons you’ve shot. Try making it add ~10 per big lemon, ~5 per medium lemon, and 1 per small lemon. Also it would be nice to remove 1-3 points per lemon that get away. Either way, very cool video as always!

  • @csikosghost4302
    @csikosghost4302 Před 2 lety +74

    episode 3: how to make a combustable lemon that burns your house down.

    • @monnamonsta
      @monnamonsta Před 2 lety +6

      make it explode more lemons!

    • @AlienDeveloperYT
      @AlienDeveloperYT Před 2 lety +2

      XD 😂🤣

    • @BobTheWhatchamacallit
      @BobTheWhatchamacallit Před 2 lety

      That’s what I was thinking the whole time XD

    • @Czarlo
      @Czarlo Před 2 lety +3

      this whole game is after cave johnson invented combustible lemons and the whole earth exploded, and the lemons got into space and now are heading towards you and trying to kill you

    • @trombone28
      @trombone28 Před 2 lety

      oh she is a gem!

  • @christosdoesthings
    @christosdoesthings Před 2 lety

    thank you so much! These tutorials are really helping me

  • @jjsanimations
    @jjsanimations Před 2 lety

    I always watch the full video even though I've heard of his channel membership before. I just live your voice, griffpatch!

  • @rens2
    @rens2 Před 2 lety +8

    I love lemons

  • @joshuawhy9696
    @joshuawhy9696 Před 2 lety +4

    I have been waiting for this tutorial since the first episode came out! Griffpatch is the best coder on scratch I have ever seen. He really is great at this.

  • @daisybandha7015
    @daisybandha7015 Před 2 lety

    Thanks a lot! You explained everything very well. This was amazing!!!

  • @antonsebastien8922
    @antonsebastien8922 Před 6 měsíci

    BEST TUTORIAL EVER YOU ACTUALLY SHOW ME WHERE AND WHAT TO DO

  • @takitux3882
    @takitux3882 Před 2 lety +3

    Excellent tutorial! I showed this to my son and he is now coding it. For show and tell at school, he used you as his role model. Thank you for being an inspiration for my son.

  • @gabrijelcoh
    @gabrijelcoh Před 2 lety +3

    Hello Griffpatch! I know that this doesn't have anything related to this tutorial, but i have a bug in the tile scrolling game. When i exit the editor to playtest my level, a coin fountain sprays at my mouse pointer, making my coins go up rapidly. Do you know how to fix this?

    • @griffpatch
      @griffpatch  Před 2 lety

      Hmm... Ok, I don't get that but maybe there's something we can do.

    • @Fradz_Lifez
      @Fradz_Lifez Před 2 lety

      What part you on

  • @GooseOnoob
    @GooseOnoob Před 2 lety

    Im really excited to follow this tutorial when I get back from school :D

  • @lilianravenet5006
    @lilianravenet5006 Před 3 měsíci

    I tried the program and it sounds REALLY GOOD on "Never Be Alone". Good job

  • @chiroyce
    @chiroyce Před 2 lety +4

    WOAH! A 26 minute video! This is gold! ⭐️

  • @karliskazaks8422
    @karliskazaks8422 Před 2 lety +3

    25:49 This guy hates being rickrolled so he kills em AND RICKROLLS US

  • @johnnyin4564
    @johnnyin4564 Před 2 lety +1

    your games are always a 10/10 star rating amazing!!!

  • @FaiyazGonnaPlay
    @FaiyazGonnaPlay Před 3 měsíci

    Its Amazing How He Can Make Such Unbelievable games Using an Engine Like Scratch!!! Keep Up The Good work Griffpatch!

  • @thegreenhoodieguy
    @thegreenhoodieguy Před 2 lety +36

    cant wait for episode 3: *coding the entire universe*

  • @user-je5py4ub7s
    @user-je5py4ub7s Před 11 měsíci +3

    I made watermelons instead and made them become slices when shot

  • @isaaclvideos
    @isaaclvideos Před 2 lety

    nice! great as always!

  • @beandevv
    @beandevv Před 2 lety

    Thanks so much! It's gonna be the same thing, but with a twist..
    its like a fighter-jet shooter game where you are a fighter-jet and you shoot down your enemies,
    very classic.

  • @cocoaX3
    @cocoaX3 Před 2 lety +5

    As a wise man (griffpatch) once said:
    "L e m o n"

  • @gaming_broskies31
    @gaming_broskies31 Před 2 lety

    yey the part two is out i was waiting for this

  • @pokeballthegoat
    @pokeballthegoat Před 2 lety +1

    Looking forward to this!

  • @EpicNoobx
    @EpicNoobx Před 2 lety +2

    18:43 the powerful feeling when you solve the problem before griffpatch explains it

  • @3dcheesecake
    @3dcheesecake Před 2 lety

    Thanks so much @griffpatch i never knew custom blocks could have a function without an imput

  • @DragonAero
    @DragonAero Před 2 lety

    Hello, griffpatch!
    You're close to 50K subs, so I'm here to say congratulations!
    (Big fan of your works btw, also im subbed rn)

    • @pentaguin5s
      @pentaguin5s Před rokem

      not close he's 184K subs now

    • @DragonAero
      @DragonAero Před rokem

      @@pentaguin5s this comment was from a year ago, but i see where you might be coming from

  • @KomodoKraft
    @KomodoKraft Před 2 lety +2

    Nice Video! I love Your Vids!

  • @LogansThrillRideAdventures

    Awesome job dude!

  • @domathes
    @domathes Před 2 lety

    Eyyyyy!! The second part is here!

  • @yusronnaim
    @yusronnaim Před rokem

    dude thanks a lot for that race conditions, i had no idea why the enemies wouldnt just dissappear

  • @meggiw5035
    @meggiw5035 Před 5 měsíci

    i used this for a remake, Thanks For Posting This!

  • @The_Tim_Reaper
    @The_Tim_Reaper Před 2 lety

    love your videos its so easy to follow and you get a great result. :)

  • @abhishekmanjunath.seethnoo18

    making lemons are soo easy thank u griffpatch ! first I thought it is difficult and is in picture library.

  • @Ankit-wn3on
    @Ankit-wn3on Před rokem +1

    superb,....you are doing great job by helping lots of learners with the world of coding...keep it up

  • @GEOMETRICALL-DASH-PRO-21

    thank's This is so easy to understand!

  • @eshodhplayz1767
    @eshodhplayz1767 Před 2 lety +1

    Amazing!!

  • @dineshjayalath669
    @dineshjayalath669 Před rokem

    i really love your videos and er very easy to keep track of. keep on scratching!!!!!

  • @nguyenlamphuc4301
    @nguyenlamphuc4301 Před 2 lety

    This is the best tutorial I ever watched, other video is really amazing tô! Thank you for this tutorial, I wish I could make thí video the best video ever!

  • @elizabethzheng5303
    @elizabethzheng5303 Před 2 lety

    Wow! So awsome!

  • @kategacha11
    @kategacha11 Před 2 lety

    Now my project look more better than the last one, thank you so much!

  • @sharangmorye7753
    @sharangmorye7753 Před 2 lety

    Your videos are amazing
    I will surely try this in scratch

  • @mariofan1983
    @mariofan1983 Před 2 lety +2

    This reminds me of the "sonic eats a lemon and dies" meme... Great vid!

  • @nikithmonagari9279
    @nikithmonagari9279 Před rokem

    thank you my man I've been trying to make this and you helped me ty griffpatch

  • @alejandroalzatesanchez
    @alejandroalzatesanchez Před 2 lety +1

    Fun fact: like racing the beam on the Atari at 18:06 due of the limitations of the Console the programmers have to time everything to avoid garbage our bugs on screen.

  • @dxnnstqs
    @dxnnstqs Před rokem

    @griffpatch this is my first time coding, ive so far been loving it. The amount of work and effort you put into this, is just mindblowing! I also have a question, when I was working on the Lemons, it wasn't spawning even though I had done everything right, do you maybe have a solution to this problem if you do, let me know, thanks!

  • @AnnietoRN
    @AnnietoRN Před 2 lety

    Griffpatch is an amazing scratcher!!!

  • @EmmanuellaBalogun
    @EmmanuellaBalogun Před 4 měsíci

    I just love how you make these games it's like I always use your vids🤩

  • @ayaanantics
    @ayaanantics Před měsícem

    1:51 "I can almost feel those lemons charging up their juice power" -Griffpatch 2021

  • @randomperson2.056
    @randomperson2.056 Před 2 lety

    thanks so much for the video, I just came from the beach, good lemony summer! Well... ON TO CODE!

  • @aaritaithal1994
    @aaritaithal1994 Před 2 lety

    Griffpatch, this is AMAZING!!!!!!

  • @talontastic9815
    @talontastic9815 Před 2 lety

    so amazing nice job

  • @DaWulffy
    @DaWulffy Před 2 lety

    griffpatch, you're the best, keep it up, champ

  • @codinggoIndonesia
    @codinggoIndonesia Před rokem

    thank you.. it's works when i try this tutorial

  • @stiwarrodriguez3d892
    @stiwarrodriguez3d892 Před 8 měsíci

    Wow I love this project

  • @ZENAdz310
    @ZENAdz310 Před rokem

    I love the rick astly shooter!
    Never gonna give you up...!

  • @jjkidsfamily4679
    @jjkidsfamily4679 Před 2 lety

    Working on my own project thanks to you

  • @rebeldevelopment1052
    @rebeldevelopment1052 Před 2 lety

    Very nice tut

  • @kimberlysung745
    @kimberlysung745 Před 2 lety

    thank you Griffpatch your drawing is so cool I have already follow your studio .

  • @geethabalasundaram8122

    It was very useful to build my first ever game in scratch!
    so thanks a lot.

  • @I_StealFoodFromKids
    @I_StealFoodFromKids Před 2 lety

    13:10
    Griffpatch: Dont believe me?
    Me: Of course I believe you

  • @emptypandora
    @emptypandora Před 3 měsíci

    this is amazing

  • @randombrickfilmchannel6204

    50K Subs!!! Congrats!!!

  • @nickibrugmann8247
    @nickibrugmann8247 Před 2 lety

    congrats to 50k subscribers and nice video

  • @metal_pineapple7689
    @metal_pineapple7689 Před 2 lety +1

    Thanks for the tutorial! I really like this idea and the way you edit your videos. Keep it up!

  • @scottishclive7987
    @scottishclive7987 Před 2 lety +1

    I love this guys videos

  • @9e39shauryalalsahu7
    @9e39shauryalalsahu7 Před 2 lety

    Thanks griffpatch for inculding my project.I liked your project too much :)

  • @mathiasbartl9393
    @mathiasbartl9393 Před 11 měsíci +2

    So I found out that when setting the Lemon costume to big, I also have to set the size to 100%, otherwise the smallest Lemons don't wrap around and I excede the clone limit, because they are stuck off screen.