Trying to Make Terraria in One Week | Unity Game Devlog

Поделиться
HTML-код
  • Опубликовано: 12 дек 2024

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

  • @ErenCode
    @ErenCode  2 года назад +52

    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

    • @kigamezero8636
      @kigamezero8636 2 года назад +7

      Oh...
      I thought that was the point of a coroutine : ^)

    • @ErenCode
      @ErenCode  2 года назад +9

      Same! :O Guess we've been bamboozled

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

      @@kigamezero8636 I thought the point of the courintine was the wait seconds function.

    • @asra-5180
      @asra-5180 Год назад +1

      I think you need to redo everything on a different engine now.

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

      @@asra-5180 haha, that might not be necessary. People will keep using Unity for now no doubt about it!

  • @Skeffles
    @Skeffles 2 года назад +31

    Brilliant recreation of the world! It's fascinating seeing what it takes to make a game like this.

  • @_buffer
    @_buffer 2 года назад +7

    Love the editing style! Keep up the good work :D

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

      Thanks my man! Appreciate the support! :D

  • @t4cet
    @t4cet Год назад +2

    I actually tried to implement this myself, but I quickly ran into performance problems. Your implementation is awesome !

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

      Please do more parts !!

  • @322ss
    @322ss 2 года назад +10

    Pretty neat. BTW - 4:07 coroutine itself has nothing to do with threading, it runs on main thread AFAIK.

    • @ErenCode
      @ErenCode  2 года назад +1

      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

    • @DunoBubble
      @DunoBubble 2 года назад +1

      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

  • @SebastianGraves
    @SebastianGraves 2 года назад +1

    This is very cool man. Well done.

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

      appreciate it! :D

  • @Hallak89
    @Hallak89 Год назад +4

    are you are Eren Yeager

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

    Can’t wait to play around with this when I get home :)

  • @MrCrompz
    @MrCrompz 2 года назад +1

    Ayyy I've been looking forward to this

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

    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

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

      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

  • @brettrogers4208
    @brettrogers4208 2 года назад +1

    Nice Eren !

  • @Tr0janH0rs3
    @Tr0janH0rs3 2 года назад +1

    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!!!

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

      That's so cool to hear!!! Would love for you to share the project on the Discord as well! :D Glad I could help!

  • @ye399
    @ye399 2 года назад +2

    Underated

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

      Appreciate it! :D

  • @EdgarRdzG09
    @EdgarRdzG09 2 года назад +2

    Quedó super cool, muy buen trabajo el que hiciste.

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

      ¡Gracias, lo aprecio! :D

  • @TheRealCantFind
    @TheRealCantFind 2 года назад +2

    Cool work ;)

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

    the minecraft-like liquids in a terraria world felt kinda cursed ngl

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

      I will be sure to change that in the next update! :O

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

    Keep up the good ol' work lad!

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

    Nice, we need more unity tutorials! It is amazing 🤩

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

      Appreciate it! :D Tutorials will be coming!

  • @JeikirYT
    @JeikirYT 2 года назад +1

    Very nice video!

    • @ErenCode
      @ErenCode  2 года назад +1

      Glad you enjoyed! :D

  • @airodene2704
    @airodene2704 Год назад +2

    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

    • @ErenCode
      @ErenCode  Год назад +2

      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

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

      @@ErenCode oh thank the lord

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

      @@ErenCode Is this still something you are planning?

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

    Nice piece of work

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

    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 ...

    • @ErenCode
      @ErenCode  Год назад +1

      Sure! I used a custom rule tile with custom rules in the case if a surrounding tile is dirt, stone, air

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

      @@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 ?

  • @caydencobb9973
    @caydencobb9973 2 года назад +1

    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!

    • @LOLWHATBRO
      @LOLWHATBRO 2 года назад +5

      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 🤞😃

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

      @@LOLWHATBRO Thank you mister :)

    • @ErenCode
      @ErenCode  2 года назад +1

      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

    • @ErenCode
      @ErenCode  2 года назад +2

      @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

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

      ​@@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

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

    Looks really good

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

    Pls make a tutorial for this! This is just amazing!!! Subscribed 💯

    • @ErenCode
      @ErenCode  2 года назад +1

      Appreciate it! :D updated tutorials will be coming in future! :D

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

      @@ErenCode can't wait!!!

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

    I can actually feel my brain getting bigger while watching this vid

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

      This might be the best comment I've ever seen xD

    • @Diynn
      @Diynn 2 года назад +1

      Are you sure it isn't a migraine

    • @Schrodingers_kid
      @Schrodingers_kid 2 года назад +1

      Sounds like migraine...Dude,are you alive?

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

    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

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

      It definitely wasn't easy! xD

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

    Impressive!

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

    I found your video truly inspiring 😁

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

      I appreciate that! Thank you! :D

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

    Awesome!

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

    Very nice my friend.

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

      Thank you very much! :D

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

    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...

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

      Yessir! Still available on patreon! :D

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

    Very impressive

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

    did you generate the world from chunks? If so, how did you manage to connect the tiles at the junction of the chunks?

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

      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

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

      okay thank you@@ErenCode

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

    Really interesting vid - most people would have drawn this vid out to 30mins :)

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

    Does someone konw where I can find all the animated liquid tiles ?

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

    terraria without the if statement spam be like:

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

    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?

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

      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!

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

      @@ErenCode yes, yes, i did understand a bit =) thank you! :-)

  • @seth-blank
    @seth-blank Год назад

    Man a tutorial on custom rule tiles would be really nice. I cant find any recourses for crap. Any ways it looks amazing :)

    • @ErenCode
      @ErenCode  Год назад +1

      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

    • @seth-blank
      @seth-blank Год назад

      @@ErenCode sweet can't wait for it!

  • @prod-AR7IX
    @prod-AR7IX 2 года назад

    Wow very cool

  • @Axiomity
    @Axiomity 2 года назад +1

    Why does it say devlog? Are you planning to make more videos on the series?

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

      potentially! Depends how I feel really xD

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

    Can you make a game for Ubuntu Touch. Like a minecraft clone or FPS?

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

    Me as a Terraria expert:
    Good recreation, missing some things... but what do you expect?

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

      One week though. The base is good, just need content

    • @pyxelgamer
      @pyxelgamer 2 года назад +1

      @@jarusca3933 Very true. Add some items and buffs and mining and stuff.

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

      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

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

      @@ErenCode Exploring enemies AI would be awesome!

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

    Hi! can u please share src of this project please? I don't understand how to properly generate terrain

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

      Will be available on my patreon in the coming days! :D

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

    Do you have any tutorial on how to make a game like this?

    • @ErenCode
      @ErenCode  8 месяцев назад

      I have a series of tutorials on this channel, but it doesn't cover all the features seen in this video

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

    Great vid, coroutines do not run on a separate thread, beware

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

    Coroutines don't run on a separate thread. They run on the main thread.

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

      yep! Had many others comment about this, admittedly I don't know everything and I''m always open to learning more! :D

  • @Teathling
    @Teathling 2 года назад +1

    tbh this just sounds like a more optimized version of terraria

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

      I assume Terraria does use a tonne of multithreading otherwise there's no way it could render the millions of tiles it has XD

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

      @@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.

    • @nourios6991
      @nourios6991 2 года назад +1

      delusional

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

      @@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.

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

    Can you make video about liquids like in terraria?

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

    Hmm.. very cool.

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

      appreciate it! :D

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

    Now do it in Unreal. :P

  • @user-bp1ti6gy9v
    @user-bp1ti6gy9v 2 года назад

    Доброго времени суток, можешь пожалуйста сделать туториал 2D Water в Unity, чтобы она реагировала на объекты и вела себя реалистично?

  • @JeikirYT
    @JeikirYT 2 года назад +1

    Hi

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

    How you make games. Coding is hard bru. Ur edit is cool tho

    • @ErenCode
      @ErenCode  2 года назад +1

      Appreciate it! I spent a lot of time learning before being able to make something like this! xD

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

    First person I've seen use "is" in c#

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

      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

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

    third

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

    @Samundie