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
This is so good an educational for someone like me who's only starting! Looking forward to more!
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.)
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.
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!
Also the sprite controller should have been a scriptable object for better performance.
@@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.
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
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
Subbed to watch progress!
Make more of these please. I liked this series.
i miss these
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!
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!
Why not continue this series? Only two vids lol
First youtuber I turned on the bell for ☺️
*very good* mic
I like yo cut G!
Now that we also started using unity in university, I even understand the code^^
semi transparent is pronounced translusent but I think u did a great job and keep it up
I am wondering how to make tiles just like the in/off block. It seems hard to make the tile have such function.
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?
The 2 dislikes are from the on switch and off switch
god code
bonk😳
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)
Excellent! Do some mechanics from Celeste please.
Mix and Jam has an awesome video about recreating the movement of Celeste!
ruclips.net/video/STyY26a_dPY/видео.html
It ben a long time
*MY EARS*
4:20
If (bool) {}
Else if (!bool) {}
Just use an else statement
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.
if (cond) {
} else if (!cond) {
}
also 666 likes
wtf only 21 comments
Dude I am the first comment
His mic 💀💀💀