Scratch Tile Scrolling Game | Tile Drops + Inventory Backend! (#7)

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 22. 07. 2024
  • In this Scratch tutorial, I show how to code tile drops into the Tile Scrolling Game. I will also show how to add the inventory backend!
    🎹 GET THE GAME'S ART: scratch.mit.edu/projects/6921...
    🔗 LINKS: All Videos In This Series: ‱ Scratch Tile Scrolling...
    Scratch Profile Page: scratch.mit.edu/users/ShiftCl...
    Night Ninja Scrolling Platformer: ‱ Scratch | Scrolling Pl...
    Cat Clicker tutorial: ‱ Scratch | Cat Clicker ...
    Tower Defense tutorial: ‱ Scratch | Making a Tow...
    How-to tutorials: ‱ Scratch | How-To Tutor...
    Get Scratch Addons: scratchaddons.com/
    đŸ§ŸCHAPTERS:
    00:00 - Intro
    00:27 - Project Setup
    01:04 - Tile Drop Setup
    01:58 - Tile Drop Movement
    05:52 - Tile Drop Collision
    07:46 - Tile Spawning
    12:39 - How To Create A New Tile Drop
    13:28 - Better Tile Drop Positioning
    14:00 - Inventory Backend
    22:44 - Outro
    ❗ DISCLAIMER:
    This video is family-friendly! Hostile and/or rude comments will not be tolerated!

Komentáƙe • 192

  • @ShiftClickLearn
    @ShiftClickLearn  Pƙed 2 lety +18

    Thanks for watching!!! :D
    Edit: At 8:30 I forgot to show me putting a set _y to item 2 of SpawnTileDrop. Make sure you do that, otherwise the TileDrop won't show up at he correct y position!

  • @CrystalKyryn
    @CrystalKyryn Pƙed 2 lety +5

    SCL you are my favourite youtuber because you make scratch tutorials which is cool, because i like scratch (even though im pretty average) but your also very active in the comments section, so viewers can interact and chat.

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety +1

      Wow, thanks- that means a lot to me, Ayle _enX! Thanks a ton for watching + commenting! :D

  • @Wallee580
    @Wallee580 Pƙed 2 lety +4

    14:57 He did it everyone! He said "run without screen refresh" :D

  • @penguinpenguin3156
    @penguinpenguin3156 Pƙed 2 lety +4

    WOOOOOOOOOOOOOOOOOOOOOOO NEW VIDEO

  • @camd0ge33
    @camd0ge33 Pƙed 2 lety +4

    I don't know if you'll take my ideas into consideration because my ideas aren't in the prototype game, but I have a couple ideas I would love in my own project and I'm sure others:
    1. Firstly, Day Night Cycle.
    2. Animals and Monsters.
    3. Weapons.
    4. Boss rooms to get money and/or things to craft exclusive tools.
    5. Deepslate like area below stone where bedrock currently is to expand world with cool ideas.
    6. Fossils.
    7. Structures and Villages at surface.
    8. Exclusive blocks you can buy from dealer to give things like doors and building materials.
    9. Leaf animations falling off trees.
    10. Seasons
    11. Lastly like Day and Night Cycle, Weather.
    (If you could only add one I would like the most) I would choose #4 which would kind of tie into #3.
    Even if you can't add any of my suggestions in, I still appreciate what you're doing rn.

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety +2

      Those are really cool features. Thanks for all the ideas! :D

    • @camd0ge33
      @camd0ge33 Pƙed 2 lety +1

      @@ShiftClickLearn yw! :)

    • @MrBreast-gc4zi
      @MrBreast-gc4zi Pƙed 7 měsĂ­ci

      @@ShiftClickLearn will u be doing them

  • @DHSBros
    @DHSBros Pƙed 2 lety +4

    Really cool

  • @Mistereee
    @Mistereee Pƙed 2 lety +10

    for the inventory, when an item is picked up it should be added to a "Picked Up" list and whenever that list has one or more items it should run the checks to add it to the inventory, hope this helped c:

    • @scratchwithv4467
      @scratchwithv4467 Pƙed 2 lety +2

      Smart

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety +5

      That's a really good idea! I need to test it out.

    • @I_Q534
      @I_Q534 Pƙed 2 lety +1

      Inf iq

    • @ducksrking7965
      @ducksrking7965 Pƙed 7 měsĂ­ci

      @@reglan_devit’s just a way of saying smart or clever 😁

    • @reglan_dev
      @reglan_dev Pƙed 7 měsĂ­ci

      @@ducksrking7965 i know, but past me was too stupid to just ignore that lol

  • @patjed648
    @patjed648 Pƙed rokem +2

    Thank u so much! I loved this tutorial, and the ones before it. Im going straight onto the next one. :)

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed rokem +1

      You are welcome! Thanks a ton, your comment is so nice!! :D

    • @patjed648
      @patjed648 Pƙed rokem

      @@ShiftClickLearn :D

  • @ryan_isacow21
    @ryan_isacow21 Pƙed 7 měsĂ­ci

    Thank you for the inventory decoding code it saved my inventory project😇

  • @lupus-griseo
    @lupus-griseo Pƙed 2 lety +5

    This is looking great!

  • @DakotaTheBat
    @DakotaTheBat Pƙed 2 lety +5

    Yes! A brand new video by ShiftClickLearn himself!

  • @simonunger1133
    @simonunger1133 Pƙed 2 lety +3

    yay new episode

  • @griffinbrooks6748
    @griffinbrooks6748 Pƙed 2 lety +3

    Wow all of my favorite youtubers are uploading today!

  • @moonsunlight-lr6kl
    @moonsunlight-lr6kl Pƙed 2 lety +3

    Thanks! This really helped me alot!

  • @AVeryRandomDude
    @AVeryRandomDude Pƙed 2 lety +3

    YOU ARE RELEASING VIDEOS SO FAST I CANNOT EVEN CATCH UP

  • @SUPY_
    @SUPY_ Pƙed 2 lety +4

    Cool video, I can see how much effort u put in those

  • @SIMUNYE
    @SIMUNYE Pƙed 2 lety +3

    I CANT WAIT TILL YOUR GAME IS FINISHED SO I CAN PLAY IT IT LOOKS FUN😄

  • @Aihistory-d4c
    @Aihistory-d4c Pƙed 2 lety +3

    I'm Subscribing your videos are great😄

  • @CrystalKyryn
    @CrystalKyryn Pƙed 2 lety +2

    2:02 everyones favourite part of the SCL videos, makin chunke blocks of m a t h, like my braincells couldnt keep up with that b i g. b l o c c. and nor could my dad, he had to spend a moment thinking about it. (he says he got mostly B+ to A in his exams so he is smort)

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety +1

      LOL I love this comment- have fun making your game with your dad!

  • @minhhaiang5178
    @minhhaiang5178 Pƙed 2 lety +2

    So good!

  • @omarkaric2224
    @omarkaric2224 Pƙed 2 lety +4

    Maybe and some enemies? Like slimes for example. Btw these tutorials are awesome

    • @rexcreates6684
      @rexcreates6684 Pƙed 2 lety +3

      ive suggested this but he said "maybe in an extra episode"

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety +3

      Yup! I don't have time rn, so maybe in an extra video! XD

  • @raphaelgamer4381
    @raphaelgamer4381 Pƙed rokem

    for whatever reason when i mine a block, its item drop doesn't appear and the 3rd slot in the item drop list either says "true" or "false". i went to the left edge of the terrain and for god knows what some item drops were there but they used the stone costume instead of the item to pick up variable's value, some was at the right while some was at the left. when i tried mining a block there, its item drop adds to the left pile of item drops.
    i checked to see if i did my code correctly, and nothing looked wrong with it. could there atleast be a fix to this?
    edit: redid that part and now the drops show correctly, but they're still at the edge of the terrain. and also for some reason they fall slower than intended

  • @GamerDrawTheCode1900
    @GamerDrawTheCode1900 Pƙed 2 lety +3

    WOOOO IM COMMENTING ON YOUR OWN VIDEOOOOO đŸ€ŁđŸ€Ł

  • @thebestgoldfishever
    @thebestgoldfishever Pƙed rokem

    Yeah my inventory does the same 2 tile at a time bug, even though I didn't follow this tutorial. I probably occurs because the clones don't delete in time.

  • @Hooded101.
    @Hooded101. Pƙed 2 lety +3

    this is great

  • @ericeddie8656
    @ericeddie8656 Pƙed 2 lety +3

    Noice!

  • @megagamingteen
    @megagamingteen Pƙed 11 měsĂ­ci

    i have some weird glitch because when i dont have the delete clone then the item stays there when im not near it but when i get close then it goes to me but when i add the delete clone then the tile drop pick up happens instantly

  • @samllea1
    @samllea1 Pƙed 2 lety +4

    Nice

  • @reglan_dev
    @reglan_dev Pƙed 2 lety +3

    Waiting for another scl community video

  • @Fudgecrumb
    @Fudgecrumb Pƙed 2 lety +3

    On your top down shooter tutorial, I was wondering if there was a way to add wall collision?

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety +1

      Yup! You'd need to replace the player movement with the movement with the collision! :D
      Here's the link to my wall collision video: czcams.com/video/OmRh6SXoI0Y/video.html

  • @levinteziryayo2576
    @levinteziryayo2576 Pƙed měsĂ­cem

    Hello! I have a bit of a problem; when i break a block, it makes the same effect as if i would put a "go to" block instead of a "point toward" block. I have checked that it is a "point towards" block but it still doesn't work! Can you help me?

  • @tiiibo
    @tiiibo Pƙed 2 lety +2

    WWOOOOOWWW I'M COMMENTING ON HIS OWN VIDEOOOO

  • @AirLiftingMonkeys
    @AirLiftingMonkeys Pƙed 2 lety +2

    Also I was going to do code in your get art project 😂

  • @ashtonatkinson
    @ashtonatkinson Pƙed rokem

    At 4:07 when i made the block the goto: x Y y didnt appear it just showed to define:

  • @Geezi24
    @Geezi24 Pƙed 2 lety +1

    Ill try to make a mining game by ur tutorial but ill make sure to give credit

  • @ashwanigupta8106
    @ashwanigupta8106 Pƙed 2 lety +1

    I need help. Whenever i mine a block, it doesn't drop down and show the animation instead, it goes to the inventory without appearing.

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety

      Did you do a go to block like I did? It should be a point towards block. (I fix the issue later in the video.)

    • @ashwanigupta8106
      @ashwanigupta8106 Pƙed 2 lety

      @@ShiftClickLearn I did that as well but it still wont work,What do i do?

    • @ashwanigupta8106
      @ashwanigupta8106 Pƙed 2 lety

      its works for a second or very rarely but it wont work.

  • @evantobias4557
    @evantobias4557 Pƙed 2 lety +2

    I think I know how to fix the bug . It’s very simple it’s actually not a bug its a feature Bug fixed. Any can’t wait for the next episode!

  • @misterdot6923
    @misterdot6923 Pƙed 2 lety +3

    yo sik!

  • @sahildas.
    @sahildas. Pƙed 2 lety +3

    not bad watched after 1 min and got 247 viws

  • @tepestudios2572
    @tepestudios2572 Pƙed rokem

    21:56 Help me SCL, my forever script isn't working at the when I start as a clone in the ItemDrop
    My script is
    |forever
    Item drop gravity
    point in direction (((250 + ((sin of ((timer * 100)) 5))
    set brightness effect to (abs of ((sin of (timer * 100)) * 5 ))
    if distance to player < 100 then
    can pickup item to pickup
    if distance to player < 75 and can pickup is true then
    point towards player
    change x by ((cos of (90 - direction)) * (distance to player * 0,1))
    change y by ((sin of (90 - direction)) * (distance to player * 0,1))
    if touching player and can pickup true then
    add item to inventory id item to pickup
    delete this clone

  • @aradhanagupta3428
    @aradhanagupta3428 Pƙed rokem +1

    When I mine the block item drop could not show why ?? I double check my script

  • @NuggetCraft
    @NuggetCraft Pƙed rokem +1

    The item picking up didnt work for me, it just went to me instantly. is there anyway to fix this?

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed rokem

      Did you do a go to player instead of point towards player like I did on accident??

    • @NuggetCraft
      @NuggetCraft Pƙed rokem

      @@ShiftClickLearn no i did point towards.

  • @Im_not_epic
    @Im_not_epic Pƙed 2 lety +1

    Hi. I have a bug. I am at 11:38 seconds, and the drops are not coming. I turned the spawn tile drop list on, and after I break a block, the third slot says "null". Can anyone help me?

    • @Im_not_epic
      @Im_not_epic Pƙed 2 lety +1

      I fixed the null part, but the drop still won't appear!

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety

      Are you sure you set the position correctly?

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety

      Wait hold up, at 8:30 I forgot to show setting _y to the item 2 of the SpawnTileDrop.

    • @Im_not_epic
      @Im_not_epic Pƙed 2 lety

      @@ShiftClickLearn Quite unfortunately, that's in my code to.

  • @souvikparua7785
    @souvikparua7785 Pƙed rokem +2

    bro when i set point toward player the item drop still does not drop

  • @Homyboby
    @Homyboby Pƙed 2 lety +1

    You should make some blocks fall like the grass if the block under it is destroyed

  • @noahcouturier6408
    @noahcouturier6408 Pƙed 2 lety +1

    Random question. What's the chance of you making a video about making entities?

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety +1

      Hmm, idk xD. Maybe someday, but right now I don't have time.

    • @noahcouturier6408
      @noahcouturier6408 Pƙed 2 lety

      @@ShiftClickLearn Could griffpatch tutorial work?

  • @mrsnappy2924
    @mrsnappy2924 Pƙed 2 lety +1

    Cool! My items still dont work tho even after i cahnged the go to block to a point towards...

    • @SamJasGaming
      @SamJasGaming Pƙed 2 lety

      Same!

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety

      Really? Are you sure you're close enough to the blocks?

    • @mrsnappy2924
      @mrsnappy2924 Pƙed 2 lety

      @@ShiftClickLearn Yh no matter how far from the blocks they automatically get added to the inventory list without any animation :(

    • @SamJasGaming
      @SamJasGaming Pƙed 2 lety

      @@mrsnappy2924 Yeah.. :(

  • @pupchamp137
    @pupchamp137 Pƙed rokem +1

    Scratch reset, so I have to this part all over again ;-;
    Edit: I was coding in the particles sprite not in the ItemDrop, so scratch did save it...

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed rokem

      Well I'm glad it didn't just delete all your code lol.

  • @GamerDrawTheCode1900
    @GamerDrawTheCode1900 Pƙed 2 lety +1

    Oh I realised when you break a block you keep breaking it even if it's not visible anymore and so you keep dropping items until you let go of the mouse button

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety

      Hmm, did you copy the block breaking code correctly? I don't think it should do that.

    • @GamerDrawTheCode1900
      @GamerDrawTheCode1900 Pƙed 2 lety

      @@ShiftClickLearn I'll check, thanks

  • @Balls609
    @Balls609 Pƙed 2 lety +2

    When is next video being uploaded

  • @crazytlingit79
    @crazytlingit79 Pƙed 2 lety +1

    The tile drop thingy only works when I’m falling for some reason
why?

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety

      Did you make the gravity variable for all sprites?

    • @crazytlingit79
      @crazytlingit79 Pƙed 2 lety

      @@ShiftClickLearn is the gravity variable “_yVel”? Other then that I can’t find it. I don’t even have a variable called gravity

    • @crazytlingit79
      @crazytlingit79 Pƙed 2 lety

      @@ShiftClickLearn i figured something else out, if im at the edge of the world, the tile drop feature works just fine. (NVM I FIXED IT)

  • @ayeeizzack9513
    @ayeeizzack9513 Pƙed 2 lety +3

    what will the next episode probably be?

  • @dilshadthedrummer
    @dilshadthedrummer Pƙed 2 lety +2

    will you share this project when its done?

  • @GreyBoiTheTrue
    @GreyBoiTheTrue Pƙed 2 lety +3

    Terraria 2 (Electric boogaloo)

  • @MessixRonaldo7and10
    @MessixRonaldo7and10 Pƙed rokem

    Ummm I tried adding all the items and for some reason it adds 2 not 1. Pls help me

  • @RonicTheEgg
    @RonicTheEgg Pƙed 2 lety +3

    *still waiting for the long grass breaking when the block under it is broken*

  • @xuanletan1191
    @xuanletan1191 Pƙed 2 lety +1

    add entity like zombie and skeleton

  • @anamoyeee
    @anamoyeee Pƙed 2 lety +2

    16:33 why not just add two lists: inventoryID and inventoryAmount

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety

      Yeah, you could do that. Both are valid options... I think that having two lists has the propensity to get messy, but I could be wrong.

    • @MrBreast-gc4zi
      @MrBreast-gc4zi Pƙed 7 měsĂ­ci

      @@ShiftClickLearn it could get messy for you but probably not for him

  • @Gilly1999
    @Gilly1999 Pƙed 2 lety +1

    Please make randomly generated enemies that spawn at random times

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety

      I don't know that I have time for that rn... thanks for the idea tho

  • @echoless3484
    @echoless3484 Pƙed 2 lety +1

    Hey! I keep having problems with lag but I need a huge map!

    • @echoless3484
      @echoless3484 Pƙed 2 lety +1

      its only when its above a certain amount for x/y generation, I need the map to be at least 500x2000

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety

      With the way my generation is made, it will lag the more tiles it needs to generate...

  • @AirLiftingMonkeys
    @AirLiftingMonkeys Pƙed 2 lety +2

    Me knowing that I will probably not here anything you say because the carpet is being replaced by wood tiles

  • @austencope
    @austencope Pƙed 2 lety +1

    you should make it so when grass is in the air it should break so it doesnt look so cursed lol.

  • @nathangamingytm7124
    @nathangamingytm7124 Pƙed 7 měsĂ­ci

    IT DOSENT WORK CAUSE IT WILL GO TO 7000 Y WICH IS OFFSCREEN ND IT KEEPS FLASHING

  • @sethplayzminecraft2671
    @sethplayzminecraft2671 Pƙed 2 lety +1

    i have a problem. What is suppose to happen: 21:57 What my project does: 21:46 I checked my project so many times and it's the same! Pls help

  • @DHSBros
    @DHSBros Pƙed 2 lety +4

    I am going to make a farming game in Scratch

  • @CrystalKyryn
    @CrystalKyryn Pƙed 2 lety +3

    hello i'm 6th like
    gg

  • @ThatCrownedKing
    @ThatCrownedKing Pƙed 2 lety +2

    😀😀😀😀😀😀

  • @WeepingAngel98ihbbh
    @WeepingAngel98ihbbh Pƙed rokem +1

    I think there needs to be a stacking limit.

  • @coolcoder4249
    @coolcoder4249 Pƙed 2 lety +2

    Include Me On Next Video PLSLSLSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS

  • @lukasgoshorn4621
    @lukasgoshorn4621 Pƙed 2 lety +3

    Hi

  • @jaecheokkim99
    @jaecheokkim99 Pƙed 2 lety +2

    "Inventory Invented."

  • @Soupcan.-demoman
    @Soupcan.-demoman Pƙed 2 lety +1

    ERROR! itemDrop is not showing up

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety +1

      At 8:30 I forgot to show setting _y to the item 2 of the SpawnTileDrop. Make sure you do that!

    • @Soupcan.-demoman
      @Soupcan.-demoman Pƙed 2 lety

      @@ShiftClickLearnthe x was the problem I ges

  • @atbguy
    @atbguy Pƙed 2 lety +1

    Hey do you have plans for the gmtk game jam? if not would you be interested in collaborating on a game?(me-art/you-code)

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety +1

      I don't have any plans for a game jam. Thanks for the offer tho! :D

  • @CrystalKyryn
    @CrystalKyryn Pƙed 2 lety +1

    when i mine a tile its dropping the wrong item. when i mine dirt, im getting coal, clay gives me the torch, wood gives me long grass, leaves give me coal, leaf logs give me topaz, flower gives me gold. the project id is 692581199. can you try to fix it?

    • @CrystalKyryn
      @CrystalKyryn Pƙed 2 lety

      the inventory is displaying the wrong stuff before the _, that may play into the issue. stone is giving me 18_1

    • @CrystalKyryn
      @CrystalKyryn Pƙed 2 lety +2

      nvm i fixed it, it was just that i needed to add item (id + 5) of tile meta to my break tile script.

    • @ShiftClickLearn
      @ShiftClickLearn  Pƙed 2 lety +1

      Awesome! Glad you fixed it!

  • @dracokinerek
    @dracokinerek Pƙed 2 lety +2

    Hi