Update: Coroutines don't run on a separate thread! Thanks for all the comments! As I'm sure you understand, I'm still continuously learning as well! :D
Hey! I decided to look into it a bit more after seeing your comment, you are correct! They do run on the main thread (my bad, we're all still learning xD) Turns out they don't do parallelisation like threads, appreciate the comment! :D
If you want to do real multi threading, you should look into jobs and burst compiler. It might be impressive at first but actually quite doable for tasks like your lights calculation
Wow that's a really nice work! Btw can you also make a tutorial on how health regen in terraria works like it starts off slowly and then speeds up as time passes upto a certain limit and resets when player gets hit? That would be really cool :D
You just helped me make my game that im working on so much better plus i added the way you handle light! I was kinda thinking of stopping the project cuz i didnt know how to implement light but i found that video THANK YOU!!!
Could you perhaps do a tutorial on this? I know you've done a sandbox game tutorial series before, but it would be interesting to have it revisited, this time using a tilemap instead of individual gameobjects, and the game i'm working on is similar to terraria in terms of world styling
Gonna be making another full series on 2D sandbox generation with a ridiculously improved algorithm! (It can generate a 50000 x 800 tile world in less than a second) :D
Great video ! How did you manage to connect the dirt Rule Tile and the stone Rule Tile together avoiding awefull transitions ? I think you have separate Rule Tile for dirt, stone, grass, ore ...
Since guy just hearts every comment he sees without actually reading them,,, Some good places to start Harvard has a free introduction to computer science (called CS50) VERY GOOD for getting the basic knowledge and getting your head in the right space. They're essentially just RUclips videos you watch of lectures with optional little projects based on the lecture. Some RUclipsrs: Brackeys, BMo, Blackthorneprod, Dani, Dave Game Dev, Code Monkey. Different styles of teaching, different chances that you'll learn something. I also watch any amateur devlogs as I can, because watching someone get over a problem may help you get over your own in the future. I would highly recommend the cs50 to start, it seems daunting but even if you watch 1 hour a day, it's kicked out in no time, and you'll have a better understanding of what comes before languages. But either way, once you find that basic understanding of what the languages even really are, you wanna pick a language and just literally use Google & RUclips and any documentation that language may have (unity for example, has extensive documentation,though unity is not technically a language, its C# that they use, but they have enough of their own functions or automation of functions that i would count it.) learn the syntax of one language, and then when you feel somewhat confident, go to another language and see what syntax has changed and what syntax is comparable to what you already know. Once you understand how the most basic things interact with each other, it's basically ALL learning syntax(you don't necessarily have to memorize syntax, or rather, you don't have to know how to do something, you just have to know how to KNOW how to do something. aka You really only have to know how to figure it out. know where your resources are and use them Half or more of these game dev RUclipsrs learned that way, and are still learning that way. The other half went to college lmao. Good luck 🤞😃
Don't worry, I read every comment - Just don't always get a chance to reply to them as fast as I wish I could, especially since i'm in the category of game dev youtubers who are still studying at university xD
@asher ferrara sums it up pretty much exactly! I learnt most of what I know through my own research over the last few years, but don't underestimate what a solid university/college can teach you. The internet is a vast book of knowledge but what you learn through a computer science/IT degree will help you incredibly in becoming a better programmer. Programming especially for games, its super helpful to have a solid understanding of some computer science/programming theory. You'll find that most game dev youtubers / programming youtubers don't actually go into the theory at all - and that makes sense, theory is boring and so it doesn't make very good content xD , and their code isn't actually very expandable because its very 'straight to the point' to achieve that one task they're covering. And this sort of tutorials work great for beginners, but if you're looking for a career in programming or software development you need to know your programming theory! :D
my brain died trying to think on how ur computer didnt explode for this. i tried making lighting to my own sandbox test i have been making and my co puter fries XwX
Hey great devlog! Quick question, how did you get the rocks and dirt to seamlessly connect like you have in the video? I cant find any good resources :( Also does your patreon still have the project files for this project? I would like to know how you did all that cool stuff...
This version doesn't use chunks, it's just one large tilemap. The problem you mentioned of chunks connecting is exactly why I decided to use just a single tilemap after I spent days looking for a solution to connect multiple tilemaps haha
That was all to fast and briefly but that’s probably the whole point. I like to know how the light works…. How do you make the lightning? Do you tint the sprites? Draw over them? Shader? How does the lightning map work? And everytime you place and remove tile you calculate the whole lightning map new or just the neighbors? And then the neighbor neighbors? Hooooooow?
so each tile stores a value between 15 and 0. For each tile the lighting comes across which is a tile its subtracts one from that tile's light value. these light values are floating point numbers and they get stored in a 2D array. This 2D array is then turned into a texture of black pixels where the light value determines that pixels opacity. This texture is then sent to a shader which is rendered on top of the entire world. In its current state the entire lighting for the entire world is recalculated every time you break or plcae a block, or whenever the lighting needs to be updated (like when the lava flows) - this is because i didn't bother optimising it... because I didn't really need to! The system is able to do the entire calculation with almost zero impact on performance since the algorithm is so fast! - You could optimise this method so that it is recursive and updates only the neighbours which need updating, or change the system to use a wave function collapse algorithm variant, but my experience with recursive functions is that they produce alot of artifacts and don't always look as good. Another optimisation would be to rather than do the calculation on the cpu and then send the texture to the gpu, it'd be WAY faster to do the calculation and apply the texture all on the gpu, using a compute shader which would be able to calculate everything in parrallel which would mean that there is virtually entirely no impact at all on performance! Hope this long msg kinda helped haha, there will be tut on it in the future though, stay tuned!
Bet! Planning to make a tutorial or at least a video showcasing how it works, I've actually improved thr system even further but it's quite complicated now to the point I don't know if I can make a tutorial series on it xD
as someone who loves terraria, I agree! I'm hoping that in the future i'll come back and add the player along with the inventory, maybe some enemies & mining, who knows! (might even add rocket boots cause they're awesome) :O
@@ErenCode well just looking at the way the water worked already seemed better then terraria's, I'm not a programming wiz but terraria can run like aaaaaaaass for not much sometimes.
@@ErenCode Terraria just renders what is visible on the screen, to save resources. The same is for the lighting. If you teleport or run really fast you can actually see the system updating.
correct me if i'm wrong but 'is' is slightly faster from what I know when comparing constant values, or when comparing classes, or enums. but == also works :D
Update: Coroutines don't run on a separate thread! Thanks for all the comments! As I'm sure you understand, I'm still continuously learning as well! :D
Oh...
I thought that was the point of a coroutine : ^)
Same! :O Guess we've been bamboozled
@@kigamezero8636 I thought the point of the courintine was the wait seconds function.
I think you need to redo everything on a different engine now.
@@asra-5180 haha, that might not be necessary. People will keep using Unity for now no doubt about it!
Brilliant recreation of the world! It's fascinating seeing what it takes to make a game like this.
Thanks! :D
Love the editing style! Keep up the good work :D
Thanks my man! Appreciate the support! :D
I actually tried to implement this myself, but I quickly ran into performance problems. Your implementation is awesome !
Please do more parts !!
Pretty neat. BTW - 4:07 coroutine itself has nothing to do with threading, it runs on main thread AFAIK.
Hey! I decided to look into it a bit more after seeing your comment, you are correct! They do run on the main thread (my bad, we're all still learning xD) Turns out they don't do parallelisation like threads, appreciate the comment! :D
If you want to do real multi threading, you should look into jobs and burst compiler. It might be impressive at first but actually quite doable for tasks like your lights calculation
This is very cool man. Well done.
appreciate it! :D
are you are Eren Yeager
Can’t wait to play around with this when I get home :)
Ayyy I've been looking forward to this
Heck yeah! :D
Wow that's a really nice work! Btw can you also make a tutorial on how health regen in terraria works like it starts off slowly and then speeds up as time passes upto a certain limit and resets when player gets hit? That would be really cool :D
i guess you could add a float for regen speed 1.0 being 1hp/s, slowly lerping down and update it on events and multiply be effects
Nice Eren !
Thank you! :D
You just helped me make my game that im working on so much better plus i added the way you handle light! I was kinda thinking of stopping the project cuz i didnt know how to implement light but i found that video THANK YOU!!!
That's so cool to hear!!! Would love for you to share the project on the Discord as well! :D Glad I could help!
Underated
Appreciate it! :D
Quedó super cool, muy buen trabajo el que hiciste.
¡Gracias, lo aprecio! :D
Cool work ;)
Thank you!! :D
the minecraft-like liquids in a terraria world felt kinda cursed ngl
I will be sure to change that in the next update! :O
Keep up the good ol' work lad!
Thanks!! :D
Nice, we need more unity tutorials! It is amazing 🤩
Appreciate it! :D Tutorials will be coming!
Very nice video!
Glad you enjoyed! :D
Could you perhaps do a tutorial on this? I know you've done a sandbox game tutorial series before, but it would be interesting to have it revisited, this time using a tilemap instead of individual gameobjects, and the game i'm working on is similar to terraria in terms of world styling
Gonna be making another full series on 2D sandbox generation with a ridiculously improved algorithm! (It can generate a 50000 x 800 tile world in less than a second) :D
@@ErenCode oh thank the lord
@@ErenCode Is this still something you are planning?
Nice piece of work
thanks! :D
Great video !
How did you manage to connect the dirt Rule Tile and the stone Rule Tile together avoiding awefull transitions ? I think you have separate Rule Tile for dirt, stone, grass, ore ...
Sure! I used a custom rule tile with custom rules in the case if a surrounding tile is dirt, stone, air
@@ErenCode Thank you for the clear answer !
Where did you find the sprites for the liquids (water and lava) ? Can you send me the link please ?
Dude this is sick! Im trying to get into game dev and was wondering where you learned to code? Thanks for the awesome uploads man!
Since guy just hearts every comment he sees without actually reading them,,,
Some good places to start
Harvard has a free introduction to computer science (called CS50) VERY GOOD for getting the basic knowledge and getting your head in the right space.
They're essentially just RUclips videos you watch of lectures with optional little projects based on the lecture.
Some RUclipsrs: Brackeys, BMo, Blackthorneprod, Dani, Dave Game Dev, Code Monkey. Different styles of teaching, different chances that you'll learn something. I also watch any amateur devlogs as I can, because watching someone get over a problem may help you get over your own in the future.
I would highly recommend the cs50 to start, it seems daunting but even if you watch 1 hour a day, it's kicked out in no time, and you'll have a better understanding of what comes before languages.
But either way, once you find that basic understanding of what the languages even really are, you wanna pick a language and just literally use Google & RUclips and any documentation that language may have (unity for example, has extensive documentation,though unity is not technically a language, its C# that they use, but they have enough of their own functions or automation of functions that i would count it.) learn the syntax of one language, and then when you feel somewhat confident, go to another language and see what syntax has changed and what syntax is comparable to what you already know. Once you understand how the most basic things interact with each other, it's basically ALL learning syntax(you don't necessarily have to memorize syntax, or rather, you don't have to know how to do something, you just have to know how to KNOW how to do something. aka You really only have to know how to figure it out. know where your resources are and use them
Half or more of these game dev RUclipsrs learned that way, and are still learning that way. The other half went to college lmao.
Good luck 🤞😃
@@LOLWHATBRO Thank you mister :)
Don't worry, I read every comment - Just don't always get a chance to reply to them as fast as I wish I could, especially since i'm in the category of game dev youtubers who are still studying at university xD
@asher ferrara sums it up pretty much exactly! I learnt most of what I know through my own research over the last few years, but don't underestimate what a solid university/college can teach you. The internet is a vast book of knowledge but what you learn through a computer science/IT degree will help you incredibly in becoming a better programmer. Programming especially for games, its super helpful to have a solid understanding of some computer science/programming theory.
You'll find that most game dev youtubers / programming youtubers don't actually go into the theory at all - and that makes sense, theory is boring and so it doesn't make very good content xD , and their code isn't actually very expandable because its very 'straight to the point' to achieve that one task they're covering. And this sort of tutorials work great for beginners, but if you're looking for a career in programming or software development you need to know your programming theory! :D
@@LOLWHATBRO Good mentality! I have the same, but I do self learning and college at the same time. Everyday is learning for game devs :D
Looks really good
Thanks! :D
@@ErenCode your welcome
Pls make a tutorial for this! This is just amazing!!! Subscribed 💯
Appreciate it! :D updated tutorials will be coming in future! :D
@@ErenCode can't wait!!!
I can actually feel my brain getting bigger while watching this vid
This might be the best comment I've ever seen xD
Are you sure it isn't a migraine
Sounds like migraine...Dude,are you alive?
my brain died trying to think on how ur computer didnt explode for this. i tried making lighting to my own sandbox test i have been making and my co puter fries XwX
It definitely wasn't easy! xD
Impressive!
I found your video truly inspiring 😁
I appreciate that! Thank you! :D
Awesome!
Thanks! :D
Very nice my friend.
Thank you very much! :D
Hey great devlog! Quick question, how did you get the rocks and dirt to seamlessly connect like you have in the video? I cant find any good resources :(
Also does your patreon still have the project files for this project? I would like to know how you did all that cool stuff...
Yessir! Still available on patreon! :D
Very impressive
did you generate the world from chunks? If so, how did you manage to connect the tiles at the junction of the chunks?
This version doesn't use chunks, it's just one large tilemap. The problem you mentioned of chunks connecting is exactly why I decided to use just a single tilemap after I spent days looking for a solution to connect multiple tilemaps haha
okay thank you@@ErenCode
Really interesting vid - most people would have drawn this vid out to 30mins :)
Does someone konw where I can find all the animated liquid tiles ?
terraria without the if statement spam be like:
That was all to fast and briefly but that’s probably the whole point. I like to know how the light works…. How do you make the lightning? Do you tint the sprites? Draw over them? Shader? How does the lightning map work? And everytime you place and remove tile you calculate the whole lightning map new or just the neighbors? And then the neighbor neighbors? Hooooooow?
so each tile stores a value between 15 and 0. For each tile the lighting comes across which is a tile its subtracts one from that tile's light value. these light values are floating point numbers and they get stored in a 2D array. This 2D array is then turned into a texture of black pixels where the light value determines that pixels opacity. This texture is then sent to a shader which is rendered on top of the entire world. In its current state the entire lighting for the entire world is recalculated every time you break or plcae a block, or whenever the lighting needs to be updated (like when the lava flows) - this is because i didn't bother optimising it... because I didn't really need to! The system is able to do the entire calculation with almost zero impact on performance since the algorithm is so fast! - You could optimise this method so that it is recursive and updates only the neighbours which need updating, or change the system to use a wave function collapse algorithm variant, but my experience with recursive functions is that they produce alot of artifacts and don't always look as good. Another optimisation would be to rather than do the calculation on the cpu and then send the texture to the gpu, it'd be WAY faster to do the calculation and apply the texture all on the gpu, using a compute shader which would be able to calculate everything in parrallel which would mean that there is virtually entirely no impact at all on performance! Hope this long msg kinda helped haha, there will be tut on it in the future though, stay tuned!
@@ErenCode yes, yes, i did understand a bit =) thank you! :-)
Man a tutorial on custom rule tiles would be really nice. I cant find any recourses for crap. Any ways it looks amazing :)
Bet! Planning to make a tutorial or at least a video showcasing how it works, I've actually improved thr system even further but it's quite complicated now to the point I don't know if I can make a tutorial series on it xD
@@ErenCode sweet can't wait for it!
Wow very cool
Thanks! :D
Why does it say devlog? Are you planning to make more videos on the series?
potentially! Depends how I feel really xD
Can you make a game for Ubuntu Touch. Like a minecraft clone or FPS?
Me as a Terraria expert:
Good recreation, missing some things... but what do you expect?
One week though. The base is good, just need content
@@jarusca3933 Very true. Add some items and buffs and mining and stuff.
as someone who loves terraria, I agree! I'm hoping that in the future i'll come back and add the player along with the inventory, maybe some enemies & mining, who knows! (might even add rocket boots cause they're awesome) :O
@@ErenCode Exploring enemies AI would be awesome!
Hi! can u please share src of this project please? I don't understand how to properly generate terrain
Will be available on my patreon in the coming days! :D
Do you have any tutorial on how to make a game like this?
I have a series of tutorials on this channel, but it doesn't cover all the features seen in this video
Great vid, coroutines do not run on a separate thread, beware
Coroutines don't run on a separate thread. They run on the main thread.
yep! Had many others comment about this, admittedly I don't know everything and I''m always open to learning more! :D
tbh this just sounds like a more optimized version of terraria
I assume Terraria does use a tonne of multithreading otherwise there's no way it could render the millions of tiles it has XD
@@ErenCode well just looking at the way the water worked already seemed better then terraria's, I'm not a programming wiz but terraria can run like aaaaaaaass for not much sometimes.
delusional
@@ErenCode Terraria just renders what is visible on the screen, to save resources. The same is for the lighting. If you teleport or run really fast you can actually see the system updating.
Can you make video about liquids like in terraria?
sure can!
Hmm.. very cool.
appreciate it! :D
Now do it in Unreal. :P
Доброго времени суток, можешь пожалуйста сделать туториал 2D Water в Unity, чтобы она реагировала на объекты и вела себя реалистично?
Hi
HI :O
How you make games. Coding is hard bru. Ur edit is cool tho
Appreciate it! I spent a lot of time learning before being able to make something like this! xD
First person I've seen use "is" in c#
correct me if i'm wrong but 'is' is slightly faster from what I know when comparing constant values, or when comparing classes, or enums. but == also works :D
third
L
next time! :O
@@thecoweggs ratio
@Samundie