Tesseract
Tesseract
  • 9
  • 176 897
20 Advanced Coding Tips For Big Unity Projects
End spaghetti code! Learn the tools you need to write scalable, well-structured, clean code. So many game developers are forced to scrap their ambitious Unity games because they don't know these tips. As a young, self taught game developer, I didn’t discover these tools and techniques for years. Hopefully this video will help you to skip the learning curve and expose you to some of the more advanced programming devices that don’t get enough attention from the plethora of beginner Unity tutorials.
//chapters
00:00 - Intro
01:12 - Variable Names
02:11 - Comments
02:58 - Encapsulate in Functions
03:36 - Plan Your Code
03:57 - C# Properties
04:38 - Serialize Field
05:02 - Component Architecture
06:00 - Enums
06:25 - Coroutines
07:32 - Invoke/Invoke Repeating
08:03 - Structs
08:50 - Singletons
10:38 - C# Events
12:34 - Unity Events
12:56 - Interfaces
14:34 - Inheritance
17:50 - Scriptable Objects
19:15 - Custom Editor Tools
20:25 - Use Version Control
21:00 - Refactor Often
21:38 - Outro
//socials
Instagram: tesseract.yt
TikTok: tesseractyt
//long description
So you finally decided to begin work on your “dream game”, a fantasy MMO RPG sandbox battle royale powered by a blockchain economy. What could possibly go wrong? Then, two months later, progress comes to a grinding halt. You have scripts that are a thousand lines long, you’ve forgotten what your old code does, adding new features means you have to rewrite three old ones, every script relies on every other one, and overall, your project becomes an unorganized, unmanageable, confusing, dumpster fire of spaghetti code. Tragically, you are forced to scrap the project and give up on your game dev dreams. Sound familiar?
There are hundreds of hours of Unity tutorials online, but very few are geared towards more advanced developers aiming to create large scale commercial games. That’s why I’ve compiled a list of some of the most valuable unity coding tips that I’ve learned over the years, along with examples of how I’ve actually used these techniques in my own game. Hopefully, by the end of the video, you’ll have the tools you need to write scalable, well structured, clean code that won’t come back to bite you down the road.
//music
Evan King - Nightmares and Violent Shapes
czcams.com/channels/T1Z.html...
contextsensitive.bandcamp.com/
Internet Historian: Sthlm Sunset - Ehrling, A.X - Ehrling, Night Out - LiQWYD
czcams.com/video/wS5R3LnXC2o/video.html
Music from Uppbeat (free for Creators!):
uppbeat.io/t/mountaineer/fly-away
License code: VVIYH4NIZH0ARSHF
uppbeat.io/t/hartzmann/joyful-lights
License code: AMYFJECHAZAJGCMI
uppbeat.io/t/swoop/lucidity
License code: Z6V3SJ5TMSRFUKKU
uppbeat.io/t/movediz/summer-vibes
License code: F9CFDRM8JFBQIVOD
//hashtags
#unity #unity3d #unitytutorial #gamedevelopment #coding #programming #indiegame #cleancode #codingtips
zhlédnutí: 159 218

Video

Making my Game a Real Game | Indie Game Devlog #4
zhlédnutí 3,5KPřed rokem
I'm making a top down shooter multiplayer mobile game! In this video, I work on the game's main menu and match loop. This includes a loadout screen, weapon select screen, lobby, match timer, match scores, match start and end sequence, and more. I also polish the game up to prepare for public playtesting with TestFlight on IOS. Play-Testing Discord: discord.gg/w5GQ8mHTp4 Flight Test Link (if you...
Designing the Ultimate PVP MAP for my Multiplayer Game | Indie Game Devlog #3
zhlédnutí 1,8KPřed rokem
This is devlog#3 for my multiplayer, top down shooter, indie mobile game Ultimate Battle Arena. In this video, I design and implement my game's first PvP map. My goal is to make Ultimate Battle Arena the first actually good mobile shooter. It will have simple controls, lots of satisfyingly weapons, a variety of characters with abilities, class creation, strategy, and exciting movement. //social...
Can I Make Elden Ring in 10 MINUTES? | Unity 3D
zhlédnutí 5KPřed 2 lety
Join me as I create Elden Ring in 10 minutes using the Unity Game Engine. Yes, the whole thing... Okay fine, only one "boss battle". I may have cut a few corners... It's really just souls-style combat. Keep in mind that this is not a tutorial, it is more of a challenge video with the goal of being educational for beginners and entertaining for all. If you are interested in game development, thi...
Adding SHOTGUNS to my Multiplayer Mobile Game | Indie Game Devlog #2
zhlédnutí 899Před 2 lety
This is the second devlog for my online multiplayer top down shooter mobile game called Ultimate Battle Arena. In this video, I add shotguns, submachine guns, weapon switching, UI, animations, dive rolling, and audio in an effort to purge the game from lameness (lame and shotguns don't really coexist). Watch till the end to see the most satisfying kill montage ever. The game is made with the Un...
Using Python to Unsubscribe From College Emails
zhlédnutí 621Před 2 lety
Fighting college spam with the power of Python and Selenium web scraping. Ever since I took the PSAT almost three years ago, my inbox has been cluttered with thousands of unopened emails from colleges that I have no interest in. I'm going to program a bot to log into my email account, detect college emails, and go through the unsubscribe process for each one. I guess you might learn some things...
Networking, Explosions, AI, Oh my... | Indie Game Devlog #1
zhlédnutí 1,5KPřed 2 lety
This is the second devlog for my indie game Ultimate Battle Arena. UBA is an online multiplayer, top down, twin stick shooter game meant for mobile. I'll talk about how networking works in multiplayer games, my struggles implementing networking, the glorious results after getting networking working, and then some stuff not related to networking. I added grenades and explosions with MaTh, and I ...
Can I Make Flappy Bird in 10 MINUTES? | Unity3D
zhlédnutí 3KPřed 2 lety
Let's make Flappy Bird together... or rather, a scuffed version of it, "Flappy Egg" using the Unity game engine. Oh yeah, and we're going to do it in under 10 minutes. This video is intended for people who are curious about how video games are made. It's a quick, uncut, and hopefully fun example demonstrating the general idea behind making a game and implementing key features such as responding...
I'm making a MOBILE GAME | Indie Game Devlog #0
zhlédnutí 1,4KPřed 2 lety
About 3 years ago, I started work on a mobile game called Ultimate Battle Arena using the Unity game engine. In this video, I introduce the game and discuss my journey from an empty game scene to a full fledged project and back to a nearly empty game scene. I’ll share my struggle with nearly every aspect of game development: programming, design, art, graphics, and more. Ultimate Battle Arena is...

Komentáře

  • @adamfrank5183
    @adamfrank5183 Před 14 hodinami

    Damn. Sage programming advice from a young programmer. This guy is going places.

  • @JakobNorell
    @JakobNorell Před 2 dny

    Really good video! One additional thing that I like to have as a standard when using strings for Invoking or Coroutines is to use the built-in "nameof()" function so the editor can identify the references.

  • @drewltinder9872
    @drewltinder9872 Před 3 dny

    These are great tips. I recently cleaned up a project significantly just by drawing a box for each script in my project on a piece of paper and drawing an arrow from each box to each box it referenced. I realized i had tons of messy and unnecessary references all over the place and was able to delete almost half of all the code I had written as well as delete an entire class that turned out to be unnecessary.

  • @Bat3p
    @Bat3p Před 8 dny

    On the Action class for your event, why did you not use the event keyword?

  • @3604marine
    @3604marine Před 13 dny

    I feel like you can generate a navMesh with colliders. Its somewhere in the navMesh settings

  • @GuitarGarry645
    @GuitarGarry645 Před 15 dny

    What's great about this video is many of these tips apply to almost all software. I wish some of my coworkers would watch this lmao

  • @TheHimmus
    @TheHimmus Před 16 dny

    For my project to come to a grinding halt first it needs to come to a grinding start.

  • @patnor7354
    @patnor7354 Před 17 dny

    Good stuff

  • @LemmonTea
    @LemmonTea Před 18 dny

    I’ve only made two unity games and I’m already writing smart code and organizing my scripts and game objects… it’s probably my second favorite part of making a game next to actually programming it 😊

  • @stadiagamer9689
    @stadiagamer9689 Před 23 dny

    you have no idea how helpful this is

  • @64imma
    @64imma Před 24 dny

    4:36 this is something I'm definitely planning to start implementing in future projects.

  • @Nytrock
    @Nytrock Před 26 dny

    This video makes me feel like a freaking senior developer at my 17

  • @Dylan-my8dt
    @Dylan-my8dt Před 27 dny

    this is just the video that i needed that you so much

  • @BritBox777
    @BritBox777 Před 28 dny

    This would be too advanced for a lot of beginners, but this is peak Intermediate advice. Heavily recommend following these tips.

  • @patnor7354
    @patnor7354 Před 28 dny

    Great advice

  • @Der_Yoloist
    @Der_Yoloist Před měsícem

    Man what happened to you.. I found the video and it is soo good. but you have only 5 videos.. years ago.. is everything fine?

  • @WaspFree
    @WaspFree Před měsícem

    Just one thing I want to add from my experience. As I like C# events more than those from Unity, there is a big advantage for the unity ones. When you're working in a team with designers, it's much more productive if they can change what happens on an event, than asking a programmer to change it. It's not always the case, of course, but it's something worth considering :)

  • @erfant1471
    @erfant1471 Před měsícem

    Very Nice

  • @FrancisThrasher1
    @FrancisThrasher1 Před měsícem

    Love the video

  • @tensofdu1700
    @tensofdu1700 Před měsícem

    12 seconds in and I feel personally attacked

  • @Angry-Lynx
    @Angry-Lynx Před měsícem

    As someone with decade of experience with unity: Dont use unity for big projects. Ull suffer terribly and it will be too late to change engine later. Its closed black box and ull hit wall after wall of unity limitations and very closed software approach it have

  • @BarcelonaMove
    @BarcelonaMove Před měsícem

    Please Keep this series going, This video is pure gold

  • @riery2762
    @riery2762 Před měsícem

    Its funnier that some guy is called "god dev", now is going to godot and did not have this impact full that you did. Thank you ❤

  • @superpepe826
    @superpepe826 Před měsícem

    Okay, you didn't have to call me out that hard at the beginning of the video...

  • @bobbob9821
    @bobbob9821 Před měsícem

    The only one I disagree with is the notion that you should completely isolate your scripts from one another. Setting that rule for yourself makes it hard if you need to coordinate different actions, like pushing the player back when you fire a weapon.

    • @bionic_batman
      @bionic_batman Před 5 dny

      I am not a game dev but can't you just achieve that by using singletons + events? Basically when weapon is fired your script receives an event and reacts to that accordingly

  • @LeviLeuthold
    @LeviLeuthold Před měsícem

    There is definitely a major lack of people talking about advanced coding practices in gamedev, especially when it often becomes the biggest barrier for people trying to make games as their projects inevitably devolve into an unworkable pile of spaghetti. Hope to see more similar content

  • @harry6270
    @harry6270 Před měsícem

    This is something I had to learn the hard way with my first game. It wasn’t huge or anything but I was still very new and oh boy was the backend the biggest piece of garbage 😂

  • @unitywithzaher1374
    @unitywithzaher1374 Před 2 měsíci

    Nice viedo but it's defenetly not ADVANCED!

  • @Johan-rm6ec
    @Johan-rm6ec Před 2 měsíci

    Any progress?

  • @dmansor2
    @dmansor2 Před 2 měsíci

    dislike just because you are using the youtube name "Tesseract". you are not worthy of that name.

  • @FlawLessPixel
    @FlawLessPixel Před 2 měsíci

    Will my experience from roblox studio help me

  • @PablofMorales
    @PablofMorales Před 2 měsíci

    Mostly good :D Couple of things Singleton is anti-patter that affect the SOLID principles mainly SRP and DIP for that reason you should never use singleton Inherence section, you can here check the liskov sustitution, and mostly of the things that you mention your guns class should have, can be added later as a external components like ammo, attachments, recoil, spawn properties, etc I'm learning C# and unity and I saw a lot of horrible code even in AAA games like Rust. I will say that stick to SOLID principle and the first chapters of your video will make a greater architecture that what I can see right now. I imagine this is happening because making a game requires so much knowledge about so many things that sometimes they cannot be great on everything. Keep up with the work!

  • @henribooysen3882
    @henribooysen3882 Před 2 měsíci

    Amazing video... Dahm I have to learn so much QQ I feel like a deer in headlights after looking at this lol

  • @fred1541
    @fred1541 Před 2 měsíci

    That's good~ thanks

  • @ericjeker
    @ericjeker Před 2 měsíci

    Perfect video! Thank you so much!

  • @code_craze7705
    @code_craze7705 Před 3 měsíci

    Can you speak in English bro?

  • @BornToTroll-it5ju
    @BornToTroll-it5ju Před 3 měsíci

    Advanced? Hmm 😂

  • @FWpapo
    @FWpapo Před 3 měsíci

    wont unity events break when u change scene? lose reference? *question*

  • @erlexfortin3413
    @erlexfortin3413 Před 3 měsíci

    Really great content, keep it up man 😊

  • @MightBeGiants
    @MightBeGiants Před 3 měsíci

    Extremely helpful video that introduced me to a few new concepts I had not encountered before. Great job!

  • @CJEXP
    @CJEXP Před 3 měsíci

    Working on my first game and yea its slowly starting to turn into spaghetti code Its very early though and thus fixable still but yea its tough 😅

  • @wieDASland
    @wieDASland Před 3 měsíci

    most of these are just basic c# tips that everyone should know considering working on a "big" unity project lol

  • @krasimirdimitrov4955
    @krasimirdimitrov4955 Před 3 měsíci

    That was the most useless video for "advanced" guidance...

    • @b5fan504
      @b5fan504 Před 19 dny

      I think it`s a rather good video but agree its something short of advanced. Basic+?

  • @0997udan
    @0997udan Před 3 měsíci

    This is sick! I am currently making a video similar to this one :)

  • @user-tm2vn5yj9r
    @user-tm2vn5yj9r Před 3 měsíci

    Beware the pitfall of Singletons. Overuse them and you have a giant bowl of spaghetti soon. Mostly only a manager should ever be a singleton. Think like this: - I am a component, I receive orders, I return results and notify my observers. I have one job function and I do not know about anything that is not directly related to doing my job. I do not use Singletons, I do not send messages to other parts of the system. Any subcomponents I require to do my job I am solely in control of, everything goes through me. - I am a controller, my job is to control flow of logic and information and order things to be done. I still only control things within my job function, but this could be a wider set of things that are related. I am a controller, I do not micromanage; I expect my components to do their job, I expect my fellow controllers to do their jobs. I can use singletons(managers), but I do it wisely. Orders travel down the hierarchy (never horizontal), notifications and results travel up. Some will say this is rigid to work with, and it is ... however, it WILL save the project from failing with spaghetti syndrome, it WILL prevent lazy programmers to do shortcuts that come back to bite you in the ass later, and it WILL make it possible for a new programmer on the project to have a chance to take over and change the code base without huge side effects (we can not have a project fall apart or get severely limited because a programmer left the project leaving incomprehensible spaghetti behind). ed. Communications with components should happen through interfaces as much as possible, to prevent lazy programmers from messing with internals of components. Yes it can feel like unnecessary bureaucracy, and in small projects it is, but already at 2 programmers or code reuse between projects it pays off instantly.

  • @uSMELLSOGOOD
    @uSMELLSOGOOD Před 3 měsíci

    You are officially the best

  • @thomascarson81
    @thomascarson81 Před 4 měsíci

    Watching this video has made me realise how terribly spaghettified my most recent Unity project is

  • @spacefood5716
    @spacefood5716 Před 4 měsíci

    Make more videos please

  • @Seshua87
    @Seshua87 Před 4 měsíci

    Suggestion for a sniper class perhaps when holding the shoot stick the cam can zoom in and the closer it gets to full zoom the more accurate the shot will be.

  • @Seshua87
    @Seshua87 Před 4 měsíci

    Here's my unofficial advice when you struggle with something like color palettes or other dev related things, just research what a successful game does and press ctrl c, ctrl v. Then just change it a bit.