Remaking the ON/OFF SWITCH in Unity - Mario Maker Deconstructed #1

Поделиться
HTML-код
  • Опубликовано: 1 июн 2024
  • Welcome to PocketMars (now PolyMars), a channel focused on game development in Unity!
    In this video, I recreate the ON/OFF switch and dotted-line blocks from Super Mario Maker 2. This is the first episode of Mario Maker Deconstructed, a series where I recreate various course elements from Mario Maker in Unity.
    Project repository:
    github.com/PolyMarsDev/Mario-...
    Follow me on Twitter for more frequent updates on my projects!
    / polymarsyt

Комментарии • 35

  • @Shony338
    @Shony338 4 года назад +34

    This is so good an educational for someone like me who's only starting! Looking forward to more!

  • @Pedro_Marangon
    @Pedro_Marangon 4 года назад +11

    I would really like if you continue this series, there's so much features from Mario Maker that you could look at! (Like seesaws, claw, pipes, etc.)

  • @Dasky14
    @Dasky14 4 года назад +83

    Good video, but I have a bit of feedback:
    Your mic is clipping, and it's really hard on my ears personally. Your voice is good for this, but I recommend either editing your audio afterwards or getting a better mic.
    I feel like this should've been done with delegates, to avoid every single block constantly updating their sprites. I would like to note, that even if you change a sprite to the same sprite as it already is, that still has a performance impact that can pile up very quickly if you have a level with tons of these blocks. I would've personally also made both blocks use the same script, but simply have an enum that states whether the block is red or blue.

    • @PolyMars
      @PolyMars  4 года назад +30

      Thanks for the feedback, I agree that the sound quality isn’t good and I’m planning on getting a new mic before my next video. Despite my efforts to make the audio somewhat presentable in Audacity, it’s still really hard on the ears.
      As for the code, thanks for the suggestions! I considered using delegates because I knew it wasn’t the best idea to have if statements running every frame, but I thought the performance impact would be minimal. I’ll add that change to the GitHub repository!
      I also considered using the same script for both colored blocks (using a public bool I would set in the inspector) but couldn’t come up with a good enough reason for it that I could explain in the video, haha.
      Thanks again for all of your feedback, it really helps!

    • @kris.yochev
      @kris.yochev 2 года назад +1

      Also the sprite controller should have been a scriptable object for better performance.

    • @kris.yochev
      @kris.yochev 2 года назад

      @@PolyMars A good reason for having a single script for red and blue blocks is writing a lot less code. Here you had to basically repeat a whole class, which if done in a large project would pile up quickly.

  • @ZeynoArts
    @ZeynoArts 3 года назад +2

    These are really cool, I especially that you break down what you are going to do before you dive into the coding which helps me a lot as a new developer, please keep doing more of these

  • @ilPrinni
    @ilPrinni 3 года назад +9

    Great video! A bit late on it, just found your channel and am binging it now haha.
    Something I wanted to say / mention for the code that is something like
    If (IsOn)
    Rend.sprite = onSprite
    Else
    Rend.sprite = offSprite
    (I know it wasn't exactly like this but writing a comment on mobile isn't super flexible ie cant rewind, and that's close enough)
    But a nice way to write it, or at least the way I like to write it is using the weird ? Expression
    So it would be
    Rend.Sprite = (IsOn) ? OnSprite : OffSprite;
    Great video! Fantastic work

  • @atheoran
    @atheoran 4 года назад +6

    Subbed to watch progress!

  • @HyperCat392
    @HyperCat392 2 года назад

    Make more of these please. I liked this series.

  • @haxenFilp
    @haxenFilp Год назад

    i miss these

  • @tyleranders9972
    @tyleranders9972 4 года назад +3

    What mechanics are you covering? I'm super intrigued. I am contemplating a platformer style video series in unity, cant wait to see what you come up with!

  • @iamgameing3840
    @iamgameing3840 3 года назад

    This is a great video! I actually learned something, however I am pretty late so binging your channel now haha... Keep up the great work!

  • @dominicballinger6536
    @dominicballinger6536 Год назад +3

    Why not continue this series? Only two vids lol

  • @saif0316
    @saif0316 2 года назад

    First youtuber I turned on the bell for ☺️

  • @MalkCurton
    @MalkCurton 2 года назад

    *very good* mic

  • @pandabloxplays2577
    @pandabloxplays2577 2 года назад

    I like yo cut G!

  • @lonelyPorterCH
    @lonelyPorterCH 3 года назад

    Now that we also started using unity in university, I even understand the code^^

  • @dr.unventor
    @dr.unventor 4 года назад

    semi transparent is pronounced translusent but I think u did a great job and keep it up

  • @zouzhexuan
    @zouzhexuan 2 года назад

    I am wondering how to make tiles just like the in/off block. It seems hard to make the tile have such function.

  • @hatoving
    @hatoving 4 года назад

    It works for me fine except when I add more than one switch. It will delete the child object (sprite) say this: MissingReferenceException: The object of type 'SpriteRenderer' has been destroyed but you are still trying to access it.
    Your script should either check if it is null or you should not destroy the object.
    Any fix plz?

  • @fastfurious0864
    @fastfurious0864 3 года назад +1

    The 2 dislikes are from the on switch and off switch

  • @I_love_vegetable_oil_2023
    @I_love_vegetable_oil_2023 2 года назад

    god code

  • @rachelguan6261
    @rachelguan6261 4 года назад

    bonk😳

  • @skyjoe55
    @skyjoe55 4 года назад

    Does anyone know of a good tutorial for the maker part of mario maker(menu to choose block, placing blocks, haveing the blocks do different functions). This may be very easy but i am very much a beginner.(I know code, just not unity)

  • @Awesomefusion
    @Awesomefusion 4 года назад +2

    Excellent! Do some mechanics from Celeste please.

    • @PolyMars
      @PolyMars  4 года назад +1

      Mix and Jam has an awesome video about recreating the movement of Celeste!
      ruclips.net/video/STyY26a_dPY/видео.html

  • @kriya2717
    @kriya2717 2 года назад

    It ben a long time

  • @Human-lx2hs
    @Human-lx2hs 3 года назад +1

    *MY EARS*

  • @b33bo93
    @b33bo93 3 года назад

    4:20
    If (bool) {}
    Else if (!bool) {}
    Just use an else statement

  • @fullystopduetooliveendless
    @fullystopduetooliveendless 2 года назад

    Hey Polymars,
    Would you wanna reboot Mario Maker Deconstruced but instead lists all the features of the first and second in it starting from intros all the way to everything?
    I do not know how to make a Mario Maker fangame in Unity and I am wondering.

  • @otesunki
    @otesunki 2 года назад

    if (cond) {
    } else if (!cond) {
    }
    also 666 likes

  • @johnnysun6495
    @johnnysun6495 3 года назад

    wtf only 21 comments

  • @Dorbellprod
    @Dorbellprod 2 года назад

    Dude I am the first comment

  • @Millymullfoxyblueagain
    @Millymullfoxyblueagain 9 месяцев назад

    His mic 💀💀💀