💬 Are you looking forward to Tears of the Kingdom? I'm hoping I can find the time to play it! ✅ Get the Project files and Utilities at unitycodemonkey.com/video.php?v=Foztn0kDM7I 🎮 Wishlist my Steam game! cmonkey.co/dinkyguardians ❤ Watch my FREE Complete Course ua-cam.com/video/AmGSEH7QcDg/v-deo.html 🌍 Get my Complete Courses! ✅ unitycodemonkey.com/courses 👍 Learn to make awesome games step-by-step from start to finish. 🎮 Get my Steam Games unitycodemonkey.com/gamebundle POLYGON Fantasy Kingdoms Pack cmonkey.co/synty_fantasykingdom_trackpath 🔴 RELATED VIDEOS 🔴 Kickstart your game with First and Third Person Controllers! (FREE Unity Starter Assets) ua-cam.com/video/jXz5b_9z0Bc/v-deo.html Make Awesome Effects with RenderTextures! (Minimap, In-game TV, Camera to Texture) ua-cam.com/video/Ah2862Gz3_s/v-deo.html How to DRAW inside Unity! (Paint, Design, Strategize, Mod) ua-cam.com/video/XozHdfHrb1U/v-deo.html Simple Saving and Loading with JSON to a File (Unity Save System Tutorial for Beginners) ua-cam.com/video/6uMFEM-napE/v-deo.html
I'm convinced CodeMonkey lives in a universe where there are 36 hours in ONE day, because of all the quality content your produce. Thanks for all the help, you're awesome ! :)
His universe has to have at least 5x the amount of hours as this one haha: tutorials, courses, Livestreams where he answers questions, and two steam games at once!
Both kitchen classes are amazing I'm almost done with multiplayer! I highly recommend the paid version just because it does such a good job of breaking it up in a nice way and you support a great unity teacher!
This is incredible! I’d love to see you stream your research also about how Nintendo made their new building system in TOTK. It’s so layered that the building system alone would probably be a series, its insane how it uses no grid but all the pieces fit and don’t break the physics etc. It’s amazing how it all works and you don’t clip through terrain or when recalling, it doesn’t make any collision or clipping issues. I’m sure it’d be extensive, but I think the internet is definitely stumped how they made that system and it seems to be bug free lol
Yeah definitely a very impressive system, my first thought is some attach points kind of like my Weapon Attachment system but it seems to have fixed points combined with some freeform points unitycodemonkey.com/video.php?v=b6XYqtTYnc4 The physics part should actually not be too difficult, it's mostly just playing with making all the objects a child of the same transform and applying physics on a certain position on the parent. It's definitely something I'd love to research in more detail, just need to find the time!
@@CodeMonkeyUnity np! Just wondering if it was even on your list! Also sidenote, I’ve done a lot of engine hopping recently. I was learning a ton of Godot but my real life friend got really good at unity so I’m back on the Unity grind 😊 Of course using your videos for basics and refreshers!
I think that if you run long enough completePathPositionList will overflow string capacity in PlayerPrefs. PlayerPrefs' string is not the same string type as just regular string, I believe it is 2048 symbols max and it is relatively small number (regular string is up to 2GB).
Yeah I only used PlayerPrefs for this super quick demo, for save game data you would store it in a regular file like I covered in the Saving and Loading video.
Really minor suggestion, but you can now initialize fields directly, so you don't need to do it in awake anymore - which makes code a bit cleaner I find. I.e. in your case: private List positionList = new();
Yup I know but personally I prefer initializing objects on Awake, usually I only use the constructor initializer for ints/floats. But yup it's just personal preference, if you like doing it like that then yup go ahead.
Coroutine with a delay, instead of update check? Pros / cons? I am just contemplating if I should use coroutines more... for example for periodic or delayed action ticks
Yup that works, personally I dislike coroutines because of the pattern they force you to use, so I prefer simple float timers but coroutines work just as well.
There is a much better way to render the path line. By using the renderer feature in urp or custom pass in hdrp can completely hide the path on the player's camera and render on top of everything in the map camera.
Thanks for another great tutorial. One thing that occurred to me while viewing was that the some interesting choices in the update guard logic maybe could have been discussed a bit more. If I was reviewing this code I'd be asking: what's the advantage of having both a min time delta (trackTimerMax) and a min distance delta (minPathDistance). What advantage does this have over just minPathDistance, apart from a removing a few vector ops per frame? E.g., with just distance delta you don't need to worry (so much) about unexpectedly high movement speed.
Yeah that's the only advantage, it doesn't waste doing 60 distance checks per second but that's unlikely to be much of an advantage, so you could remove the timer if you wanted. Personally if I were building this in my own game I would keep it simply because even though a distance check isn't expensive, if there's no reason to do it then I might as well save a few nanoseconds.
A bit different topic: how would you approach making an object in the world to be highlighted? What I mean is... for example in WoW when you mouse over a usable world object - it becomes brighter. Do I really have to swap texture/shader or is there some better way?
Depending on the Shader you can just change a property, that's what I'm doing in my game Dinky Guardians, as the player approaches an object it simply tells the shader to change the outline color
Would it not be better to save the new position with the offset instead of cycling through it every time and adding it? For example, if you have a save with 1000h and you have been running all the time around, so that you saved every 0.2 seconds a new position, then you would cycle through 18 million points every time when you load the visuals.
Yeah you could definitely improve the performance there if you needed to. The big question is do you need both the regular list and the offset list or not
Dear CodeMonkey Teacher, hello. I am wondering how much you know about the Unreal Engine 5. I am a beginner who has only been exposed to game engines for about three months. I would like to ask for your opinion on the future prospects of Unity and Unreal Engine 5. Which one do you think will have a better development in the future? I am very confused right now and don't know which one to learn.
I don't know anything about Unreal, never used it. Both engines are excellent, just pick one and start learning. Personally I love Unity but Unreal is also excellent.
Hey Brother i loved the Indepth Tutorial on this But i Once had to implement the same kind Of function in my proj so what i did that i used line renderer and Change the layer To an specific layer and i extruded the Line layer From my main camera and Set it true in my Minimap camera it worked perfectly fine but i had 1 issue that my textures were not rendering as expected so i had to change line rendere rotaion a lil bit but Yeah Thats how i did it Let me know What you think about it
Yup that would be the right way to do it, that way it only renders on the minimap camera and not the main camera. For the rotation, it should work as long as you set it to "View"
Except that it is visible above player and the Y offset is redundant. Rather you should had made a camera that would render only that LineRenderer and put LineRenderer on separeted layer. Then you could easily set CameraLayer so it would be always above and not visible to Player camera.
The offset was more to make it show up on top of overhangs (like when moving under the castle entrance) rather than to just make it invisible to the player camera. For that yup you would use a layer to make sure it is only rendered on the minimap.
Hey CodeMonkey, this has nothing much to do with this tutorial, but I was wondering if there is a way to show particle effects within the UI with the built-in renderpipeline? As in for example, if you press a Button from the UI, the button disappears and triggers a particle effect in the same position :)
I know the particle system has some issues/limitations with the UI but I can't remember exactly what they are. I think the issue is it doesn't work on a regular canvas so I think you would need to make a second camera just for those UI particles and stack it on top of the main camera. The tricky part is doing the math converting the mouse position from Screen Space to world space and making sure the UI camera is Orthographic and is sized correctly.
I do want to do a lot more research on Multiplayer and exploring MMOs is certainly something I'd love to try out since I've never done it, but no idea when so probably not soon. You can look at the videos I did using Azure for persistent storage, that's basically how you do it unitycodemonkey.com/video.php?v=EEQfSmK1nXA
how about, killcam / play of the game system with FishNet .. i think its you send all inputs to the server authoritative and it saves all the inputs and server is authority so it is always just taking inputs and playing the game in the server, and it saves all the inputs in a file and timestamp.. ... however which way it is best to save that info .. json or something idk .. and then it replays the game at any time cause it has the inputs at all times .. something like this
Honestly, I think that was left in from some debug mode for BOTW. I’m pretty sure it was Nintendo’s first open world game so they did a lot of play testing tracking player movements.
@@CodeMonkeyUnity I mean if performance is a req than using time.time instead of ticking a timer is better. Waste of an instruction by adding every frame.
The best way is to simply make it 3D and use a Orthographic camera. If you really want just 2D then I think you would essentially make extremely thin "slices" of the road and dynamically stack then on top of one another, then move the slices left/right to make the curves.
@@CodeMonkeyUnity You zip through the code without clarifying each phase. I just don't think it's all that helpful for people to simply copy ad nauseum without understanding it.
💬 Are you looking forward to Tears of the Kingdom? I'm hoping I can find the time to play it!
✅ Get the Project files and Utilities at unitycodemonkey.com/video.php?v=Foztn0kDM7I
🎮 Wishlist my Steam game! cmonkey.co/dinkyguardians
❤ Watch my FREE Complete Course ua-cam.com/video/AmGSEH7QcDg/v-deo.html
🌍 Get my Complete Courses! ✅ unitycodemonkey.com/courses
👍 Learn to make awesome games step-by-step from start to finish.
🎮 Get my Steam Games unitycodemonkey.com/gamebundle
POLYGON Fantasy Kingdoms Pack cmonkey.co/synty_fantasykingdom_trackpath
🔴 RELATED VIDEOS 🔴
Kickstart your game with First and Third Person Controllers! (FREE Unity Starter Assets) ua-cam.com/video/jXz5b_9z0Bc/v-deo.html
Make Awesome Effects with RenderTextures! (Minimap, In-game TV, Camera to Texture) ua-cam.com/video/Ah2862Gz3_s/v-deo.html
How to DRAW inside Unity! (Paint, Design, Strategize, Mod) ua-cam.com/video/XozHdfHrb1U/v-deo.html
Simple Saving and Loading with JSON to a File (Unity Save System Tutorial for Beginners) ua-cam.com/video/6uMFEM-napE/v-deo.html
I'm convinced CodeMonkey lives in a universe where there are 36 hours in ONE day, because of all the quality content your produce.
Thanks for all the help, you're awesome ! :)
so true 😂, and he makes courses and games and hits gym often
His universe has to have at least 5x the amount of hours as this one haha: tutorials, courses, Livestreams where he answers questions, and two steam games at once!
🤣👍True, i agree.
i agree
Heh I wish I had 36 hours! No matter how much I work I can never do everything that I would like to do!
Hey, great tutorial. One small hint, you can write "^1" instead of "pathPositionList.Count - 1" to access last element of an list.
Heh yup that's a nice recent C# addition, I still haven't gotten in the habit of using it
Both kitchen classes are amazing I'm almost done with multiplayer! I highly recommend the paid version just because it does such a good job of breaking it up in a nice way and you support a great unity teacher!
That's awesome, I hope you've learned a ton! Thanks for your support!
This is probably gonna be very helpful for my new game, thank you code money for making such high quality videos
With CodeMonkey Tutorials I will be Reach My Dream Job soon One of the Best tutor I Ever Seen ❤
This is incredible!
I’d love to see you stream your research also about how Nintendo made their new building system in TOTK.
It’s so layered that the building system alone would probably be a series, its insane how it uses no grid but all the pieces fit and don’t break the physics etc.
It’s amazing how it all works and you don’t clip through terrain or when recalling, it doesn’t make any collision or clipping issues.
I’m sure it’d be extensive, but I think the internet is definitely stumped how they made that system and it seems to be bug free lol
Yeah definitely a very impressive system, my first thought is some attach points kind of like my Weapon Attachment system but it seems to have fixed points combined with some freeform points unitycodemonkey.com/video.php?v=b6XYqtTYnc4
The physics part should actually not be too difficult, it's mostly just playing with making all the objects a child of the same transform and applying physics on a certain position on the parent.
It's definitely something I'd love to research in more detail, just need to find the time!
@@CodeMonkeyUnity np! Just wondering if it was even on your list!
Also sidenote, I’ve done a lot of engine hopping recently. I was learning a ton of Godot but my real life friend got really good at unity so I’m back on the Unity grind 😊
Of course using your videos for basics and refreshers!
Your experience is incredible . You re amazing❤
Thank You, 💥💯👍🏻this is very useful.
I will try it out, as this is a very popular mechanic (and a cool one)
I'll be adding that to my games. Thanks!
I think that if you run long enough completePathPositionList will overflow string capacity in PlayerPrefs. PlayerPrefs' string is not the same string type as just regular string, I believe it is 2048 symbols max and it is relatively small number (regular string is up to 2GB).
Yeah I only used PlayerPrefs for this super quick demo, for save game data you would store it in a regular file like I covered in the Saving and Loading video.
You always upload the tutorials I need when I need them. So weird 😅
Nice tutorial, this is a great idea for a new feature which i can bring later into my game:)
Really minor suggestion, but you can now initialize fields directly, so you don't need to do it in awake anymore - which makes code a bit cleaner I find. I.e. in your case: private List positionList = new();
Yup I know but personally I prefer initializing objects on Awake, usually I only use the constructor initializer for ints/floats.
But yup it's just personal preference, if you like doing it like that then yup go ahead.
Coroutine with a delay, instead of update check? Pros / cons? I am just contemplating if I should use coroutines more... for example for periodic or delayed action ticks
Yup that works, personally I dislike coroutines because of the pattern they force you to use, so I prefer simple float timers but coroutines work just as well.
There is a much better way to render the path line. By using the renderer feature in urp or custom pass in hdrp can completely hide the path on the player's camera and render on top of everything in the map camera.
Yup that works, another simpler approach is just put the LineRenderer on a Minimap layer that only the map camera an see
Thanks for another great tutorial.
One thing that occurred to me while viewing was that the some interesting choices in the update guard logic maybe could have been discussed a bit more. If I was reviewing this code I'd be asking: what's the advantage of having both a min time delta (trackTimerMax) and a min distance delta (minPathDistance). What advantage does this have over just minPathDistance, apart from a removing a few vector ops per frame? E.g., with just distance delta you don't need to worry (so much) about unexpectedly high movement speed.
Yeah that's the only advantage, it doesn't waste doing 60 distance checks per second but that's unlikely to be much of an advantage, so you could remove the timer if you wanted.
Personally if I were building this in my own game I would keep it simply because even though a distance check isn't expensive, if there's no reason to do it then I might as well save a few nanoseconds.
Nice, classic and always needed/at least helpfull functionality. 😀👍
A bit different topic: how would you approach making an object in the world to be highlighted? What I mean is... for example in WoW when you mouse over a usable world object - it becomes brighter. Do I really have to swap texture/shader or is there some better way?
Depending on the Shader you can just change a property, that's what I'm doing in my game Dinky Guardians, as the player approaches an object it simply tells the shader to change the outline color
Wonderful!
Thank you
Would it not be better to save the new position with the offset instead of cycling through it every time and adding it? For example, if you have a save with 1000h and you have been running all the time around, so that you saved every 0.2 seconds a new position, then you would cycle through 18 million points every time when you load the visuals.
Yeah you could definitely improve the performance there if you needed to. The big question is do you need both the regular list and the offset list or not
Great tutorial, as always, thanks.
Is there a way to prevent the player from seeing the path floating in the sky?
Yup, put the LineRenderer in its own layer and make sure the main camera doesn't see that layer but the map camera does
Neat, thank you!
Nice tutorial, but a point on performance, should be using Queue and Stack instead of lists, especially since the index access is linear.
Sure that's technically right but the difference is on the order of nanoseconds
Dear CodeMonkey Teacher, hello. I am wondering how much you know about the Unreal Engine 5. I am a beginner who has only been exposed to game engines for about three months. I would like to ask for your opinion on the future prospects of Unity and Unreal Engine 5. Which one do you think will have a better development in the future? I am very confused right now and don't know which one to learn.
I don't know anything about Unreal, never used it.
Both engines are excellent, just pick one and start learning. Personally I love Unity but Unreal is also excellent.
Hey Brother i loved the Indepth Tutorial on this But i Once had to implement the same kind Of function in my proj so what i did that i used line renderer and Change the layer To an specific layer and i extruded the Line layer From my main camera and Set it true in my Minimap camera it worked perfectly fine but i had 1 issue that my textures were not rendering as expected so i had to change line rendere rotaion a lil bit but Yeah Thats how i did it Let me know What you think about it
Yup that would be the right way to do it, that way it only renders on the minimap camera and not the main camera.
For the rotation, it should work as long as you set it to "View"
@@CodeMonkeyUnity Thanks,
Can you make a tutorial like this but for something like a Heatmap? Useful to tell where players have and haven't been for the developer.
Video upload timed impeccably. That’ll do pig. 🎉
Can you do a video on how to create the ultrahand feature from Tears of the kingdom where you can assemble your own machines freely?
Yeah that's definitely something I want to research, if it's easy I might do a video on it
Except that it is visible above player and the Y offset is redundant. Rather you should had made a camera that would render only that LineRenderer and put LineRenderer on separeted layer. Then you could easily set CameraLayer so it would be always above and not visible to Player camera.
The offset was more to make it show up on top of overhangs (like when moving under the castle entrance) rather than to just make it invisible to the player camera. For that yup you would use a layer to make sure it is only rendered on the minimap.
Hey CodeMonkey, this has nothing much to do with this tutorial, but I was wondering if there is a way to show particle effects within the UI with the built-in renderpipeline?
As in for example, if you press a Button from the UI, the button disappears and triggers a particle effect in the same position :)
I know the particle system has some issues/limitations with the UI but I can't remember exactly what they are.
I think the issue is it doesn't work on a regular canvas so I think you would need to make a second camera just for those UI particles and stack it on top of the main camera. The tricky part is doing the math converting the mouse position from Screen Space to world space and making sure the UI camera is Orthographic and is sized correctly.
@@CodeMonkeyUnity Thank you for the quick answer :)
Hi Code Monkey, I really hope you could do a course on building a simple MMO game with a database. Will that be happening anytime soon?
I do want to do a lot more research on Multiplayer and exploring MMOs is certainly something I'd love to try out since I've never done it, but no idea when so probably not soon.
You can look at the videos I did using Azure for persistent storage, that's basically how you do it unitycodemonkey.com/video.php?v=EEQfSmK1nXA
how about, killcam / play of the game system with FishNet .. i think its you send all inputs to the server authoritative and it saves all the inputs and server is authority so it is always just taking inputs and playing the game in the server, and it saves all the inputs in a file and timestamp.. ... however which way it is best to save that info .. json or something idk .. and then it replays the game at any time cause it has the inputs at all times .. something like this
OMG at least expected to store data in linked list...
A great example of 'Russian Painter' for scaling like real Zelda.
What is your opinion on the unitys junior programmer create with code course do you think i could use it to learn unity
I haven't gone through it myself but I have heard great things about it, so yup I would say go through that then go through my Kitchen Chaos course
Honestly, I think that was left in from some debug mode for BOTW. I’m pretty sure it was Nintendo’s first open world game so they did a lot of play testing tracking player movements.
Yeah I remember this feature wasn't visible at launch, they enabled it after some months and apparently it was tracking the whole time
do you have any discounts or specials for your online classes?
If you follow the links from the website they should have some coupon attached
@@CodeMonkeyUnity Code Monkey Bundle $997.00 what is in this bundle?
What bundle are you looking at? Are you talking about the JasonWeimann courses?
@@CodeMonkeyUnity yes, with your courses included.
The Jason Weimann bundle only includes several of Jason's courses, not my own
Why use a timer if you know you're only going to add a position after some distance anyway?
Sure you could do that, it would waste a bit of performance doing a distance check on every single frame but sure that's a valid option.
@@CodeMonkeyUnity I mean if performance is a req than using time.time instead of ticking a timer is better. Waste of an instruction by adding every frame.
nice. thanks all!
I wish you'd do a video on pseudo 3D road in 2D like pole position and Outrun games from the 80s. I'm can't find anyone who knows how to do it. 😢
The best way is to simply make it 3D and use a Orthographic camera.
If you really want just 2D then I think you would essentially make extremely thin "slices" of the road and dynamically stack then on top of one another, then move the slices left/right to make the curves.
@@CodeMonkeyUnity ok thanks ill try that
Why is zelda by nintendo so popular?
Supurb
Another option is use linerenderer
Yup that's what I used here
Boop
6:55
whyyyyyyyyyyyyyyyyyyy, why do you use light mode how dare you. my eyes burn xD
Sorry but dark mode burns my eyes
Light gang rise up
Coding elitists are so annoying. Let him do whatever he wants lol
@@iggyboyo why you getting triggered lol it was a joke.
@@AlexRak2 just asking you to let him be, that's all
Ha i'm the first :) :)))))))) (i know it is bad but i'm proud of myself)
Damn! you beat me to it
I hope you like the video!
@@CodeMonkeyUnity oh it's fantastic. I'm a big fan of your work. Learned alot from you. So thank you for all the hard work.
@@EnemyOTS :)))))
You realise it isn't a tutorial if you just talk at the camera while doing everything not explaining it, right?
What part couldn't you follow? The script was literally created from scratch on screen
@@CodeMonkeyUnity You zip through the code without clarifying each phase. I just don't think it's all that helpful for people to simply copy ad nauseum without understanding it.
If you specific exactly what you didn't understand I'm happy to provide extra clarification, but without specifics I can't do much more to help
Neat, thanks for this