Everything About Playdate SDK Collisions in 7 Minutes

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

КОМЕНТАРІ • 43

  • @YoshimiGames
    @YoshimiGames 2 роки тому +9

    I believe it should be 'setCollideRect' rather than 'setCollisionRect' (0:35)
    ...and it seems you need to write 'isa' not 'isA' (4:01)
    I don't mean to be pedantic. I'm just following along and ran into these issues. Loving your videos and looking forward to more. Sprite animation would be great!

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

      Ah good catch! Thanks for pointing these out. Sprite animations are on my list :)

  • @dylansacco9033
    @dylansacco9033 2 роки тому +5

    i appreciate you doing these tutorials it makes the coding so much easier to understand from a learning perspective

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

      Thanks - really happy that my videos are helping

  • @kevinmakesgames
    @kevinmakesgames 2 роки тому +7

    Another great video! I've solved "tunneling" in a lot of platformer prototypes but never realized that was the term for it. Also I think an OOP primer for Lua/Playdate would be valuable for a lot of people if you ever feel like making it. 👍🏼

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

      Sounds good - I'll put it somewhere in the video pipeline

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

    Definitely do the OOP next! I am experienced in C# and very familiar with the concepts but would love a fresh Lua tutorial, can't wait to see more!

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

    Fascinating. I'm a total noob but one day want to program a game for the playdate. Your videos are both informative and inspirational. Keep em coming.

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

      Thanks! I'll keep trying to make Playdate development as accessible as possible.

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

    Your channel is going to blow up soon (in a good way) keep making quality videos I love seeing new developers UA-cam channel growing

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

      I won't be slowing down anytime soon - thanks!

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

      @@SquidGodDev yeah this is the best channel by far for anyone who got a playdate looking to learn game dev. I think it's a lot of people.

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

    Awesome. OOP in Lua / the Playdate SDK would be amazing!

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

    Of the different channel options for developing for Playdate, yours is significantly more helpful. Please, please, please keep going.

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

      Thanks! I have a lot of ideas for other tutorials to make. It'll be interspersed with devlog style content, but these types of videos will keep coming.

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

    Your videos are awesome. I have not done any code since HS(1998) and I really want to try and make a zelda like game on my playdate and hoping you do a lot more tutorials and guides. They are very clear and easy to understand for someone who hasn't coded in years!!!!!

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

      Thanks! I will be making a lot more tutorials, so no worries about that.

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

    That alpha collision thing seems really useful for getting better hitboxes! I'ma use that!

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

    once again, the visuals really help. keep 'em coming!

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

      Thanks - I find they're helpful for me on other people's videos so I'll do my best to keep incorporating stuff like that.

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

    DOOOOPPPPPEEEEEE YESSSS MAKE MORE PLAYDATE CONTENT

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

    Great video. Keep 'em up! Thanks!

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

    Congrats on 500
    This is Randomness. I forgor my login for my other channel 💀

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

    Thank you for the tutorials! I've watched them all, and they've been very helpful, but this one left me with more questions than answers. I'm trying to make a very simple box-bouncing-off-of-wall demo. I cannot get sprites to collide for the life of me.
    Where are you supposed to write "gfx.sprite:collisionResponse(other) return 'bounce' end"? In the initialize function? In the playdate.update function? At the bottom, after everything? I've tried them all. Didn't work. Isn't 'bounce' just an arbitrary string in the Lua file? How does it know that 'bounce' is a collision behavior? Does putting (other) work on its own, or does "other" need to be a local variable, named elsewhere in the script? I replaced "other" with the name of the sprite with which the sprite must collide. Didn't work.
    I used moveWithCollision to test if my sprites COULD collide, and it seems they did (they 'froze' touching each other upon initialization), but that doesn't help me do anything active.
    I've been poring over your code in the arrow example for the past three days, but it's far too complex (for a beginner like me) to be of any instructional value: it involves two Lua scripts, one of which imports into the other, it uses concepts and terminology that your tutorial doesn't explain (I couldn't even find curSpeed in the SDK Documentation, so "self.x + self.dir * self.curSpeed, self.y + self.yOffset" might as well be Chinese). Finally, I checked out some single file examples that come with the SDK, but I didn't find anything relevant to my question.
    All I need is a tutorial/example of a simple sprite collision. I can build and learn from there, but I need to know how to crawl before I can walk. Do you know of any such tutorial/example?
    Thanks!
    P.S.: I'm sorry if this message came across as whiny or self-entitled or critical. I really am very grateful for your tutorials, and they have helped. I've just been extremely frustrated by this one issue, and I haven't found any other guides to collisions besides your own. Checking the forums now!

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

      Hi! No worries - I can see why this would be confusing. My code example is using something called Object Oriented Programming, which is why it looks different and confusing. I made a video on it that might make it clear. If you aren't using OOP, you can do it like this. Let's say you have a sprite called mySprite. You can do mySprite.collisionResponse = function(other) return 'bounce' end. What's happening is that the sprite library calls this collisionResponse function that belongs to the sprite, which by default returns 'freeze', but, what you want to do is overwrite that function with your own. You're correct that these are arbitrary strings, but, the sprite library, when handling collisions, first calls that function on the sprites that are colliding and checks the strings that are returned to figure out what type of collision to do, and it's just set up to expect those specific arbitrary strings. If you have more questions, feel free to hop in my discord to ask. I think it's much easier to answer code related questions there.

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

    I just made a Group 1 for enemies and the collisionResponse method didnt recognize isa(Enemy), but i works when i remove the group

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

    Great tutorial! Can you tell us how the debugging pink rectangles are shown?

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

      Yeah for sure! All you have to do is go to the top of the Playdate simulator, click view, and check "Show Sprite Collisions".

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

      Oh I'm blind lol. Thanks for the tip!

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

    I'm trying to make a simple pinball game. This is extremely helpful!!!

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

    great video thank you !!!!

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

    Thank's a lot: really (really) helpfull.

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

    Yes pls make OOP next, and then how to implement tilesets ❤

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

      Hi! Next video (this coming Monday) will be on Sprites and how to use push context, and my next video after that (following Monday) will be on OOP. I have a video plan for tilesets but that might not be for a bit. Thanks!

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

    when dud you get 500 subs, will u make a full game that you COULD publish on steam

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

      HeckBoi! Welcome back - haven't seen you around for a while. Full steam game is probably a lot further down the line, and I would probably make a full Playdate game release first.

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

    If anybody has SDK 1.7.o on their computer, please reply if you can help me to obtain a copy.