In this tutorial I show how to implement mirrors with character reflection in Godot 4. Wishlist Dreamed Away on Steam: store.steampow... Join the Discord: / discord Follow us on Twitter: / dreamedawayrpg
Short, to the point, and easily understandable. You e got a new sub, I think Godot devs might be the only people online who know how to get straight to the point. People posting recipes online could learn something.
Today we're going to make scrambled eggs. Eggs are nutricious, affordable, a good source of protein, and so much more than just a breakfast staple. There are so many ways to prepare an egg, that no matter the occasion, you'll find there's an egg recipe that's totally suitable to the occasion. I can still remember the first time I tasted an egg as a 4 year old, when my grandmother made us breakfast on one of those seemingly endless summers, when me and my sister had a sleepover on her farm. They had chickens, so they had an abundance of fresh eggs, and one morning she took us out to the chicken coop to... And by that time I've already switched the channel. 😂
@@EvenTheDogAgrees if it’s a text site, you forgot a bunch of on-page ads breaks. But “change the channel” means it’s a video, so you forgot the unnecessary theme song and logo, “please like and subscribe for more recipes”, and finally “but first, a word from this video’s sponsor…”
Thanks for this. In my version, i added an area2d to the mirror that creates a sprite for the body that enters the mirror’s area2d. This way it should make a reflection for all players or npcs that enter the area.
Great video! I have some questions. Why did you use a light to make the clip mask? Did you notice any advantage in using a light instead of placing the "Reflection" as a child of the "Sprite" and using "Visibility->Clip Children->Clip only" on the "Sprite"? Thanks for the video.
Initially this was implemented in Godot 3, where's clipping children doesn't exist (AFAIK). But also, I don't want to clip using the entire mirror sprite.
Great tutorial, thanks. One detail as I guess that's the issue: the reflection is lagging just a bit, is it possible that in your code you calculate the reflection before calculating the new frame for the main character? If you watch the video at 0.25 speed it becomes noticeable enough. Thanks!
Good catch! You're totally right, that's exactly what's going on. You need to order the nodes so that the mirror's process function is called after the character.
I'm very new to Godot and game dev but I like to have notes on different ways to do things, so thank you for this video and how you did things. Would this be a good use case to learn how to use shaders? TIA.
Thank you dude! Didn't even realize what the project was or what the channel was until I realized. "Wait. This looks like Mother 3. Wait. The channel is called Dreamed Away. Wait. I've seen them in a Mother Direct." You've earned a Sub!
Love the tutorial! I have one question, does this means the "mirrored sprite" is always rendered?, or the mask avoids it from being rendered?. I would love to be able to use this trick for all character sprites and reflect them on different stuff, like water bodies, mirrors and even metalic surfaces, but I'm a bit worried about the rendering cost of this. I guess the mask is a post-processing thing, but maybe godot has optimizations to know if he has to render something or not 🤔 any opinions?
I need someone more skilled with coding than I am to integrate pixel editors into godot. Having to switch between aseprite or GameMaker to create sprites is so frustrating and pulls me out of productivity mode.
@@dreamedawayrpg maybe something about shadows, lighting, shaders or just any cool trick to simplify things. I think more basic stuff like "how to work with tilemap" already explained by other guys.
For a small room, okay but what if you have a huge map and hundreds of mirrors. That would mean you have hundreds of reflections and move them? And why fade out when walking away? No mirror does that in real life. I mean it’s okay for that small room but scaling it up will crash that game probably 🥹
I use a variation of this in Dreamed Away, not hundreds of mirrors but quite a few in some maps, and while it does run on the CPU it scales really well for my use-case. Regarding the fade out, as I said it's optional and obviously stylized, if you don't like it just don't do that :)
Short, to the point, and easily understandable. You e got a new sub,
I think Godot devs might be the only people online who know how to get straight to the point. People posting recipes online could learn something.
Today we're going to make scrambled eggs. Eggs are nutricious, affordable, a good source of protein, and so much more than just a breakfast staple. There are so many ways to prepare an egg, that no matter the occasion, you'll find there's an egg recipe that's totally suitable to the occasion.
I can still remember the first time I tasted an egg as a 4 year old, when my grandmother made us breakfast on one of those seemingly endless summers, when me and my sister had a sleepover on her farm. They had chickens, so they had an abundance of fresh eggs, and one morning she took us out to the chicken coop to...
And by that time I've already switched the channel. 😂
@@EvenTheDogAgrees if it’s a text site, you forgot a bunch of on-page ads breaks.
But “change the channel” means it’s a video, so you forgot the unnecessary theme song and logo, “please like and subscribe for more recipes”, and finally “but first, a word from this video’s sponsor…”
@@ShaolinDave Nah, I just didn't feel like being dragged before a tribunal for crimes against humanity. 😂
@@ShaolinDavesponsorblock ;)
Even though I don't use Godot, this tutorial looks pretty neat.
That looks awesome, Excellent job!
you can make a tutorial in Godot 3 too plz?
After everything, It's still you.....
Woahoahoahoahoah, oahoahoahoah, oahoahoah story of Undertale
I fell from the light
Talk or should I fight
Monster genocide
This my Undertale
Could you do a tutorial for your lighting shader?
That's genius! The effect looks amazing over the aquarium, too. Thank you
Thanks for this. In my version, i added an area2d to the mirror that creates a sprite for the body that enters the mirror’s area2d. This way it should make a reflection for all players or npcs that enter the area.
Did you use the same code for it?
Please can you make car mechanics in godot 4 like how to drive car and enter exit
In car😊.
Great video! I have some questions. Why did you use a light to make the clip mask? Did you notice any advantage in using a light instead of placing the "Reflection" as a child of the "Sprite" and using "Visibility->Clip Children->Clip only" on the "Sprite"? Thanks for the video.
Initially this was implemented in Godot 3, where's clipping children doesn't exist (AFAIK). But also, I don't want to clip using the entire mirror sprite.
@@dreamedawayrpg Portability, I get it. Thanks for answering.👍
@@dreamedawayrpg You can still use the sprite resource you used for the Light2D and clip the sprite within that sprite. Should work the same.
@@awfyboy Yes, you're right.
Wow... Amazing, Just loved the game, nos seeing this tutorial Just have to thank you for the result Dreamed Away achieved. Congrats.
+1 Sub.... love it... right to the point. Appreciate the knowledge sharing as well 👍
Brilliant, thank you. I'm thinking you could also reduce the reflection in size (by a small percentage) as it moves further away too.
Great tutorial, thanks. One detail as I guess that's the issue: the reflection is lagging just a bit, is it possible that in your code you calculate the reflection before calculating the new frame for the main character? If you watch the video at 0.25 speed it becomes noticeable enough. Thanks!
Good catch! You're totally right, that's exactly what's going on. You need to order the nodes so that the mirror's process function is called after the character.
I'm very new to Godot and game dev but I like to have notes on different ways to do things, so thank you for this video and how you did things. Would this be a good use case to learn how to use shaders? TIA.
great! can you do the same with water reflection on the ground? using tilemap, autotile water
Thank you dude! Didn't even realize what the project was or what the channel was until I realized. "Wait. This looks like Mother 3. Wait. The channel is called Dreamed Away. Wait. I've seen them in a Mother Direct." You've earned a Sub!
haha, awesome! Glad you found the channel!
Excellent video. Thank you. What is the name of the background music?
Interested in hearing more from the composer. The few songs of the OST that seem to be available are amazing.
@@johneicher6683 Thanks! I'm working mostly solo on the game and I've composed all tracks except for a few ones in the second chapter.
you deserve more subscribe bro
Amazing. How do you get the light halo particle effect around the player?
That might be the topic for my next tutorial! :D
wow. awesome music. good content. great execution. well done!
Awesome tutorial. Liked and subscribed. 😊
Awesome, thank you!
just WOW :)
looks so good
very nice
I tested the demo on the steam , I really liked it, and I was curious How did you make the girl follow the character?
make more of these! this is great!
thank you for teaching us
Thank you for sharing!
Love the tutorial!
I have one question, does this means the "mirrored sprite" is always rendered?, or the mask avoids it from being rendered?.
I would love to be able to use this trick for all character sprites and reflect them on different stuff, like water bodies, mirrors and even metalic surfaces, but I'm a bit worried about the rendering cost of this.
I guess the mask is a post-processing thing, but maybe godot has optimizations to know if he has to render something or not 🤔
any opinions?
Bravo
I need someone more skilled with coding than I am to integrate pixel editors into godot. Having to switch between aseprite or GameMaker to create sprites is so frustrating and pulls me out of productivity mode.
I dont like to comment much but your art style gave me inspiration to get into game dev one day which is pipe dream currently
how would i add a shader to the reflection aswell as the canvasitemmaterial needed to clip?
You're an excellent communicator. I hope you have time for more of these tutorials!
Absolutely beautiful, thank you!
You're welcome! Glad it's useful :)
... I've been wondering how to make masks in Godot. Just for that I'm already thankful! XD
I love your art style. Looks very earthbound-y.
Thanks!
wow, just amazing, beautiful and well explained. Instant subscribe!
Great tutorial!! Thanks for making it, it is really appreciated
Top Tutorial. I really liked to see how you make those ingame lights. They look very good!
I'll make another tutorial :)
Great tutorial. Short, to the point, and easy to follow. Just subbed. I hope you keep making videos like these!
👍 + Subs!
Very Nice Tutorial, Thank you!
Make more of this!!!
Smart solution, thank you!
You just got a new sub! Thank you so much for the tutorial, it's short, straight and easy to follow
Brilliant guide! Thank you for sharing, definitely going to use this idea :D
ayy lets go
Great tutorial! I just liked and subbed. Hope to see more amazing material like this. Thanks!
You make life easier, thank you!!!
At the point, no innecesary waste of time, easy to understand!!! OMG!!!
This is super interesting, thank you!
You're welcome, glad you liked it!
Thank you for the great instructions.😊
Very cool function, thanks for the tut.
Amazing tutorial! Short, easy to follow and cool effect! Subscribed!
Marvelous effect, thank you so much!
Simple maths,
paper lily mirrors, les go
Awesome tutorial!! Please keep making more like this!
I will! If there are topics you'd like me to cover, please let me know :)
@@dreamedawayrpg maybe something about shadows, lighting, shaders or just any cool trick to simplify things.
I think more basic stuff like "how to work with tilemap" already explained by other guys.
Thanks for the awesome tutorial! Can't wait for Dreamed Away to come out!
This is very easy to follow! Thank you very much!
Glad it was helpful!
PERFECTION.
YOOOO.
I feel like i just found a hidden gem tutorial page lol. cannot believe you dont have more views! Great job
you are the best!
awesome!
For a small room, okay but what if you have a huge map and hundreds of mirrors. That would mean you have hundreds of reflections and move them? And why fade out when walking away? No mirror does that in real life. I mean it’s okay for that small room but scaling it up will crash that game probably 🥹
I use a variation of this in Dreamed Away, not hundreds of mirrors but quite a few in some maps, and while it does run on the CPU it scales really well for my use-case.
Regarding the fade out, as I said it's optional and obviously stylized, if you don't like it just don't do that :)
This is such a negative and ridiculous comment.
@@kaizen9451Yeah, everything that asks limitations of Godot is considered negative in Godot cult.
Don't forget to donate to Juan!