Trying to Make Terraria in One Week | Unity Game Devlog

Ойындар

Download my Complete 2D Gamekit here:
erensoftworks.itch.io/erens-c...
I got bored and tried to remake Terraria! Join me as I try to code one of my favourite games in one week.
✅ Join the Discord : / discord
🧡Support the channel: / erenmakesgames
00:00 - Introduction
00:06 - Day 1 - Terrain
01:10 - Day 2 - Trees & Ores
01:47 - Day 3 - Get Stuck
02:46 - Day 4 - Lighting
04:44 - Day 5 - Liquids
05:45 - Summary
06:10 - Download
Note: Sprites seen in the video aren't included in the Patreon package (cause copyright :D ) However, all info is within the project files as to how to setup the ruleTiles with your own sprites!
#devlog #unity #gamedev

Пікірлер: 133

  • @ErenCode
    @ErenCode Жыл бұрын

    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

    Жыл бұрын

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

  • @ErenCode

    @ErenCode

    Жыл бұрын

    Same! :O Guess we've been bamboozled

  • @waterisaneurotoxin7788

    @waterisaneurotoxin7788

    Жыл бұрын

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

  • @asra-5180

    @asra-5180

    8 ай бұрын

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

  • @ErenCode

    @ErenCode

    8 ай бұрын

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

  • @Skeffles
    @Skeffles Жыл бұрын

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

  • @ErenCode

    @ErenCode

    Жыл бұрын

    Thanks! :D

  • @_buffer
    @_buffer Жыл бұрын

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

  • @ErenCode

    @ErenCode

    Жыл бұрын

    Thanks my man! Appreciate the support! :D

  • @pixgamesstudio5884
    @pixgamesstudio5884 Жыл бұрын

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

  • @SebastianGraves
    @SebastianGraves Жыл бұрын

    This is very cool man. Well done.

  • @ErenCode

    @ErenCode

    Жыл бұрын

    appreciate it! :D

  • @EdgarRdzG09
    @EdgarRdzG09 Жыл бұрын

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

  • @ErenCode

    @ErenCode

    Жыл бұрын

    ¡Gracias, lo aprecio! :D

  • @t4cet
    @t4cet8 ай бұрын

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

  • @t4cet

    @t4cet

    8 ай бұрын

    Please do more parts !!

  • @AKGamerGT
    @AKGamerGT Жыл бұрын

    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

    9 ай бұрын

    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

  • @MrCrompz
    @MrCrompz Жыл бұрын

    Ayyy I've been looking forward to this

  • @ErenCode

    @ErenCode

    Жыл бұрын

    Heck yeah! :D

  • @322ss
    @322ss Жыл бұрын

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

  • @ErenCode

    @ErenCode

    Жыл бұрын

    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

    Жыл бұрын

    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

  • @JeikirYT
    @JeikirYT Жыл бұрын

    Very nice video!

  • @ErenCode

    @ErenCode

    Жыл бұрын

    Glad you enjoyed! :D

  • @adhyyankumar501
    @adhyyankumar501 Жыл бұрын

    Nice piece of work

  • @ErenCode

    @ErenCode

    Жыл бұрын

    thanks! :D

  • @TheRealCantFind
    @TheRealCantFind Жыл бұрын

    Cool work ;)

  • @ErenCode

    @ErenCode

    Жыл бұрын

    Thank you!! :D

  • @brettrogers4208
    @brettrogers4208 Жыл бұрын

    Nice Eren !

  • @ErenCode

    @ErenCode

    Жыл бұрын

    Thank you! :D

  • @ravikanttiwari4040
    @ravikanttiwari4040 Жыл бұрын

    Keep up the good ol' work lad!

  • @ErenCode

    @ErenCode

    Жыл бұрын

    Thanks!! :D

  • @Tr0janH0rs3
    @Tr0janH0rs3 Жыл бұрын

    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

    Жыл бұрын

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

  • @deniscooper09
    @deniscooper09 Жыл бұрын

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

  • @ErenCode

    @ErenCode

    Жыл бұрын

    Appreciate it! :D Tutorials will be coming!

  • @gamemaker2012
    @gamemaker2012 Жыл бұрын

    I found your video truly inspiring 😁

  • @ErenCode

    @ErenCode

    Жыл бұрын

    I appreciate that! Thank you! :D

  • @caydencobb9973
    @caydencobb9973 Жыл бұрын

    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

    Жыл бұрын

    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 KZread videos you watch of lectures with optional little projects based on the lecture. Some KZreadrs: 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 & KZread 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 KZreadrs learned that way, and are still learning that way. The other half went to college lmao. Good luck 🤞😃

  • @deiticphantom8449

    @deiticphantom8449

    Жыл бұрын

    @@LOLWHATBRO Thank you mister :)

  • @ErenCode

    @ErenCode

    Жыл бұрын

    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

    Жыл бұрын

    @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

    Жыл бұрын

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

  • @thestrayparade
    @thestrayparade Жыл бұрын

    Underated

  • @ErenCode

    @ErenCode

    Жыл бұрын

    Appreciate it! :D

  • @DemsW
    @DemsW Жыл бұрын

    Very impressive

  • @nickcantanimatethis
    @nickcantanimatethis Жыл бұрын

    Looks really good

  • @ErenCode

    @ErenCode

    Жыл бұрын

    Thanks! :D

  • @nickcantanimatethis

    @nickcantanimatethis

    Жыл бұрын

    @@ErenCode your welcome

  • @Hallaw345
    @Hallaw345 Жыл бұрын

    are you are Eren Yeager

  • @maxit0x
    @maxit0x Жыл бұрын

    Very nice my friend.

  • @ErenCode

    @ErenCode

    Жыл бұрын

    Thank you very much! :D

  • @nobodyepicz7538
    @nobodyepicz75388 ай бұрын

    Impressive!

  • @alexj5925
    @alexj5925 Жыл бұрын

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

  • @ErenCode

    @ErenCode

    Жыл бұрын

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

  • @alexj5925

    @alexj5925

    Жыл бұрын

    @@ErenCode can't wait!!!

  • @airodene2704
    @airodene2704 Жыл бұрын

    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

    Жыл бұрын

    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

  • @karlsonkeel37

    @karlsonkeel37

    10 ай бұрын

    @@ErenCode Is this still something you are planning?

  • @eltonwerkmeister5949
    @eltonwerkmeister5949 Жыл бұрын

    Awesome!

  • @ErenCode

    @ErenCode

    Жыл бұрын

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

  • @pyrogaming8272
    @pyrogaming82727 ай бұрын

    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

    7 ай бұрын

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

  • @pyrogaming8272

    @pyrogaming8272

    6 ай бұрын

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

  • @Kurt0v
    @Kurt0v Жыл бұрын

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

  • @MTT-gk9mi
    @MTT-gk9mi Жыл бұрын

    Wow very cool

  • @ErenCode

    @ErenCode

    Жыл бұрын

    Thanks! :D

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

    Жыл бұрын

    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!

  • @SawBSketch
    @SawBSketch Жыл бұрын

    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

    Жыл бұрын

    It definitely wasn't easy! xD

  • @homstrsh
    @homstrsh6 ай бұрын

    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

    6 ай бұрын

    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

    6 ай бұрын

    okay thank you@@ErenCode

  • @FortbloxNET
    @FortbloxNET Жыл бұрын

    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

    Жыл бұрын

    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

    Жыл бұрын

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

  • @pyrogaming8272
    @pyrogaming82726 ай бұрын

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

  • @YNGMint
    @YNGMint Жыл бұрын

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

  • @ErenCode

    @ErenCode

    Жыл бұрын

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

  • @Zen8844
    @Zen8844 Жыл бұрын

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

  • @rad9587
    @rad9587 Жыл бұрын

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

  • @ErenCode

    @ErenCode

    Жыл бұрын

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

  • @amberturd6829
    @amberturd6829 Жыл бұрын

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

  • @knight_h3172
    @knight_h3172 Жыл бұрын

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

  • @ErenCode

    @ErenCode

    Жыл бұрын

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

  • @Diynn

    @Diynn

    Жыл бұрын

    Are you sure it isn't a migraine

  • @user-ej4eq5im4r

    @user-ej4eq5im4r

    Жыл бұрын

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

  • @blockhead7168
    @blockhead7168 Жыл бұрын

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

  • @ErenCode

    @ErenCode

    Жыл бұрын

    potentially! Depends how I feel really xD

  • @rachithegonde3761
    @rachithegonde3761 Жыл бұрын

    Hmm.. very cool.

  • @ErenCode

    @ErenCode

    Жыл бұрын

    appreciate it! :D

  • @user-fd6qe5kj4p
    @user-fd6qe5kj4p2 ай бұрын

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

  • @ErenCode

    @ErenCode

    2 ай бұрын

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

  • @user-bp1ti6gy9v
    @user-bp1ti6gy9v Жыл бұрын

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

  • @Artyomann
    @Artyomann Жыл бұрын

    Can you make video about liquids like in terraria?

  • @ErenCode

    @ErenCode

    Жыл бұрын

    sure can!

  • @juice1884
    @juice1884 Жыл бұрын

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

  • @ErenCode

    @ErenCode

    Жыл бұрын

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

  • @pyxelgamer
    @pyxelgamer Жыл бұрын

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

  • @jarusca3933

    @jarusca3933

    Жыл бұрын

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

  • @pyxelgamer

    @pyxelgamer

    Жыл бұрын

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

  • @ErenCode

    @ErenCode

    Жыл бұрын

    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

    Жыл бұрын

    @@ErenCode Exploring enemies AI would be awesome!

  • @lever1616
    @lever1616 Жыл бұрын

    terraria without the if statement spam be like:

  • @GPaCrewify
    @GPaCrewify Жыл бұрын

    Now do it in Unreal. :P

  • @seeegs8755
    @seeegs8755 Жыл бұрын

    where the link app

  • @ErenCode

    @ErenCode

    Жыл бұрын

    link in description! :D

  • @Teathling
    @Teathling Жыл бұрын

    tbh this just sounds like a more optimized version of terraria

  • @ErenCode

    @ErenCode

    Жыл бұрын

    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

    Жыл бұрын

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

    Жыл бұрын

    delusional

  • @jarusca3933

    @jarusca3933

    Жыл бұрын

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

  • @alinoor0218
    @alinoor0218 Жыл бұрын

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

  • @ErenCode

    @ErenCode

    Жыл бұрын

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

  • @JeikirYT
    @JeikirYT Жыл бұрын

    Hi

  • @ErenCode

    @ErenCode

    Жыл бұрын

    HI :O

  • @HiImKyle
    @HiImKyle Жыл бұрын

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

  • @ErenCode

    @ErenCode

    Жыл бұрын

    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 Жыл бұрын

    third

  • @thecoweggs

    @thecoweggs

    Жыл бұрын

    L

  • @ErenCode

    @ErenCode

    Жыл бұрын

    next time! :O

  • @wtbudgie

    @wtbudgie

    Жыл бұрын

    @@thecoweggs ratio

  • @umgefallenesglas8213
    @umgefallenesglas8213 Жыл бұрын

    @Samundie

Келесі