Yandere Simulator Complete Source Code Analysis - Code Review

Sdílet
Vložit
  • čas přidán 8. 06. 2024
  • Deranged, insane, mouth-breathing gremlin reviews Yandere Simulator's code for 57 whole minutes.
    The purpose of this video is to let everyone learn from one man's mistakes, from a mostly objective point of view, focusing ONLY on the code and resolving any and all misconceptions and myths. I've learned a great deal about the internals of this game, Unity, and C#. Hopefully, you'll walk away knowing something you didn't know before.
    00:00 Introduction
    01:22 Exploratory Benchmarks
    03:48 Profiling
    20:46 Actual Performance Concerns
    21:40 Current Architecture
    24:34 Hypothetical Architecture
    28:52 Implementation Details
    49:33 The Little Things
    53:08 Style
    54:26 Conclusion
    55:48 Outro
    Outro music by Nick Seeth: / user-604826460-609762924
    I made all the other music: / yandere-sim-code-review
    Edited by Clock Man: / @az3epic
    ----------------------------------
    Watch me live on twitch: / rollthedyc3
    Follow me on twitter: / rollthedyc3
    Check out my projects: github.com/dyc3
    Watch this video with your friends: opentogethertube.com/quickroo...
  • Věda a technologie

Komentáře • 4,4K

  • @rollthedyc3
    @rollthedyc3  Před 3 lety +7378

    CORRECTION: The sqrt instruction does not take 1 clock cycle. More like 20-60. It's still pretty fast though, and we don't have to check for distances often enough that this matters.
    CORRECTION: Combining meshes does not necessarily reduce draw calls. I think Unity does it to improve load times.
    SO WHY IS THE GAME SLOW? See: czcams.com/users/postUgwqYKf598HtLsnKV314AaABCQ
    I'm sorry for all the mic popping. :( Tried to fix it in post as much as possible, but we couldn't get all of it.
    About drawcalls: Unfortunately, Unity's frame debugger does not work on linux. -However, pointing the camera at all the students causes the game to render about 2 million triangles, and looking away makes the game render about 200k triangles. Don't need the frame debugger to deduce the problem here.- Apparently there is a lot I don't know about graphics engineering. Sounds like a good topic for another video....
    UPDATE:
    I took a very brief look at the frame debugger on windows, and it pretty clearly explains why looking at students decreases the framerate so much. Here's a summary of what I found:
    - Students are drawn twice, using 2 different shaders, one without the toon outline, and one with the toon outline.
    - The student's irises have their own draw calls. Some irises have little shines in them, which are on another iris mesh, with their own draw call.
    - Each modular part of each student has it's own draw call.
    I've been working with Yandere Dev to optimize the game and bring the framerate up.

    • @ScottE-2
      @ScottE-2 Před 3 lety +108

      At least it went well from the early and midway portions. Though as it reached after that, it started to become more noticeable.

    • @jeromevv4165
      @jeromevv4165 Před 3 lety +44

      you are a god.

    • @gamingbud926
      @gamingbud926 Před 3 lety +22

      Didn't even notice :)

    • @CirkusBolgen
      @CirkusBolgen Před 3 lety +143

      Put the mic on your chin. Leads to constant distance from your mouth. Leads to constant volume. If popping too much: Plosive filter. Can be DIY-ed. Also: Don't swallow the ends of your sentences. And put more effort into annunciation
      -
      Structure of video: Put more time into it
      -
      Transitions: Use consistent ones, with backgrounds that are less distracting
      -
      Text: You put up much more of it than is needed, leading viewers to have to pause often, and search for the difference. Simplify.
      -
      Thank you for making this video

    • @sashaenglebert5932
      @sashaenglebert5932 Před 3 lety +83

      @MJ you mean the 31 year old coder who linked this video on his wordpress and thanked this dude's help?

  • @billvolk4236
    @billvolk4236 Před 3 lety +24583

    I find it hilarious that the biggest file in the game is a model of a toothbrush that he just bought from an asset store and never noticed that it has polygons for every individual bristle.

    • @kittycat344
      @kittycat344 Před 3 lety +1569

      where/when does a toothbrush even appear in the game ????

    • @TeknoJackal
      @TeknoJackal Před 3 lety +3837

      @Bill Volk When I was in art school (like three years ago exactly), I had a part of a 3D animated shot where I had to build a bathroom scene. I couldn’t be damned to figure out how to make a toothbrush (because I was trying to model it hair by hair along the brush) so I went the easy and efficient route of getting a toothbrush asset.
      I watch this video and when he shows the toothbrush, it was the EXACT one I tried using in my project. The model shown was one of the results that showed it had tons of downloads by other users, which told me that tons of people found this model reliable, in specs, it said it was game-ready/animation file type, on top of that it was FREE, so I thought of course I would use it.
      When I loaded the model in, it was bigger than the character model (which are big models when loaded into scene/work environment) which I found strange, so I tried shrinking it.
      It slowed the program frame rate to a freeze for 3 seconds, for a model that has no animation rig, that said to me this is a REALLY hefty model polygons wise. My teacher saw what I was kerfuffling with and told me to delete the model from the project and we made one with less polygons and it took five minutes, she then told me that models like this are used for commercials, with CGI rendering and good for shots where you have a close up toothbrush and stuff for B-roll; shots where a camera encircles like a helicopter over a giant fucking toothbrush all cool and shit. She told me if I used this model it would take 10-15 minutes to quick compile (basically make a .mov file without rendering textures and stuff, which usually takes 2-3 minutes for a 10 second shot at the LONGEST).

    • @TeknoJackal
      @TeknoJackal Před 3 lety +1040

      @Bill Volk I just wanted to talk about a fun story coincidentally involving the same toothbrush model shown, but for TL;DR
      -The toothbrush shown is one I used myself and it was free, but meant for cgi commercials, meaning the problem of accidentally putting this in your project is more likely than you may think, from my personal experience

    • @Roboshi2007
      @Roboshi2007 Před 3 lety +233

      @@kittycat344 protags bedroom I believe.

    • @fluffybun713
      @fluffybun713 Před 3 lety +608

      @@kittycat344 it appears when you enter ayanos room its in senpais "shrine" which consist of shit she stole from him or things he threw away

  • @loft1543
    @loft1543 Před 3 lety +11934

    My man be lookin like coraline's dad.

  • @MoeMoeStudio
    @MoeMoeStudio Před 3 lety +13530

    Yandere's code can turn out to have educational value. His code should be on exams or homeworks and ask students to identify the problems

  • @RandomPianoMan
    @RandomPianoMan Před 3 lety +3735

    "Inconsistent use of tabs and spaces"
    "F-ing pick one"
    I felt that

    • @TimeTravelingFetus
      @TimeTravelingFetus Před 2 lety +202

      I'm inclined to believe that's because he just copypasted code from different people, but if he did that the code would probably be good so I don't even know

    • @intelchip_x86
      @intelchip_x86 Před 2 lety

      what the fuck is wrong with him?

    • @rayhimmel7167
      @rayhimmel7167 Před rokem +115

      @@TimeTravelingFetus maybe he was copying the code from stack overflow but, you know, from the questions

    • @mariocamspam72
      @mariocamspam72 Před 11 měsíci +32

      ​@@rayhimmel7167Mainstream C# IDEs run silent formatting passes when pasting code, so it's even more perplexing how he managed that.

    • @Mabra51
      @Mabra51 Před 8 měsíci

      fucking*

  • @DarthOmix
    @DarthOmix Před 3 lety +14551

    "If he spent another hour on [this], it would have potentially saved him a couple years of grief."
    That's it, that's the game in a nutshell.

    • @ccbf1091
      @ccbf1091 Před 3 lety +662

      That reminds me of the situation with tinybuild, since he stopped working with them simply because he wouldn't have been able to update the game for a few months, even though it would've surely helped him a lot

    • @vraolet
      @vraolet Před 3 lety +643

      @@ccbf1091 I'm pretty sure that's his excuse and the real reason is that he would have had to learn to code in order to work with a proper developer and he didn't like that.
      Also, TinyBuild was pretty clear about removing the lewd mechanics because they didn't want that on their brand.

    • @hitwoman5650
      @hitwoman5650 Před 3 lety +461

      @@vraolet i mean it's understandable. _Young_ _girls_ with lewdity is not something I'd want with my company. and yeah, I agree with that first part

    • @lewdowo8067
      @lewdowo8067 Před 2 lety +162

      He actively sabotaged the games progress in every way he could. Just imagine him not getting his patreon money which was purely for finishing the game. Even today he still gets 1.6 k monthly

    • @demonking86420
      @demonking86420 Před 2 lety +66

      @@vraolet also he didnt like the other dev/s "changing his code"

  • @owl1095
    @owl1095 Před 3 lety +8053

    Me who doesn't know anything about coding: "Yeah, you're perfectly right."

    • @ona512
      @ona512 Před 3 lety +383

      Me who knows only a very minimal amount of coding, and only with java and nothing for Unity: "I guess you have a point, huh?"

    • @ferociousmaliciousghost
      @ferociousmaliciousghost Před 3 lety +230

      Me who learned how to code python and a little bit of java in an online class in grade school but completely forgot everything: "I see, that is indeed correct!"

    • @jake_dev1046
      @jake_dev1046 Před 3 lety +102

      print (“Yandere Sim will never be finished.”)
      else
      end
      end
      end)

    • @jake_dev1046
      @jake_dev1046 Před 3 lety +11

      @envy lua language has end

    • @jake_dev1046
      @jake_dev1046 Před 3 lety +7

      @envy i mostly code in lua

  • @HydratedBeans
    @HydratedBeans Před 3 lety +7782

    I’m a senior software engineer, so I feel qualified to say this video is very, very good. It really scratches the itch I have for technical deep dives that are actually entertaining. This video has the quality of video essayists with millions of subs and the code review quality is better than anything I’ve seen in a professional environment. I’ll be sticking around even if I have to wait months between videos.

    • @HydratedBeans
      @HydratedBeans Před 3 lety +49

      @Saitama Baldy thankfully no. Never really had acne except for at age 13.

    • @brtomassampaio
      @brtomassampaio Před 3 lety +4

      @@HydratedBeans soooooo, do you know animes and the concept of Yandere?

    • @HydratedBeans
      @HydratedBeans Před 3 lety +31

      @@brtomassampaio yeah, but just the basics.

    • @eschcal1619
      @eschcal1619 Před 3 lety +8

      I only use tools like UAE/UABE/DnSPY to create my own mods or have some fun editing values and seeing what the games do, but I never really got into the actual dev tools to create, just to edit. Even I was able to understand a large portion of this fellas breakdown, which I consider amazing, and I even learned a thing or two.

    • @sandraswan9008
      @sandraswan9008 Před 3 lety +1

      @Saitama Baldy uhhhhh

  • @soranuareane
    @soranuareane Před rokem +1405

    "The compiler is smarter than you." As an experienced software architect with decades of experience in this, you are 100% correct. I've only met a small number of people who could confidently claim to be smarter than a modern compiler (the compiler design professor at University, for one), but even he touts that modern compilers are so advanced that these minute optimizations are unnecessary.
    Make it work. Make it fast. In that order.

    • @oliver_twistor
      @oliver_twistor Před 6 měsíci +31

      Sometimes people's attempts to outsmart the compiler can trip up the compiler so the code runs even _slower_ than "unoptimised" code would do.

    • @turbochargedfilms
      @turbochargedfilms Před 6 měsíci +16

      "Trust the compiler" is to software what "never trust the autorouter" is to hardware

    • @originalcomment4818
      @originalcomment4818 Před 6 měsíci +10

      Make it understandable, but also make it efficient. At some point, a compiler can't turn shitty code into good code.

    • @thewhitefalcon8539
      @thewhitefalcon8539 Před 5 měsíci +7

      "The compiler is smarter than you." means you don't need to always try to outsmart the compiler every moment of your programming. People used to write

    • @KayOScode
      @KayOScode Před 5 měsíci +3

      Sometimes I can write code in assembly that executes faster than the equivalent optimized c code. But I don’t do it often because it takes too long. Also I can almost always massage the underlying c or c++ to help the compiler make it more than fast enough

  • @skywolfie8573
    @skywolfie8573 Před 3 lety +5022

    'sort of implied that he didn't want me to do it'
    'so I did it anyway'
    You mad lad

  • @saniancreations
    @saniancreations Před 3 lety +9528

    I can not stop laughing over the irony that one of the reasons people complain about framerate..... is that yanderedev implemented the framerate display so poorly that it displays lower frames than it actually has. (48:50)

    • @etam8099
      @etam8099 Před 3 lety +598

      LMAO is that fr?!!?

    • @imbadatusernames3304
      @imbadatusernames3304 Před 3 lety +840

      @@etam8099 ig he was trying to predict how slow it would be, thats funny

    • @420eater
      @420eater Před 3 lety +79

      LMFAO

    • @keychain3554
      @keychain3554 Před 3 lety +189

      Ok let’s get to the bottom of this I’m going to run msi afterburner

    • @ThatDude-qw1sg
      @ThatDude-qw1sg Před 3 lety +76

      He gonna cook this dudes code

  • @skedlkej
    @skedlkej Před 3 lety +298

    “don’t decompile my code”
    “Ok, I’ll do it while you don’t watch

  • @rorysparshott4223
    @rorysparshott4223 Před 7 měsíci +125

    This guy turned up, made a single million view video, then left. Absolute fucking hero.

  • @valumtimes
    @valumtimes Před 3 lety +5788

    I don't understand 80% of what you're saying, but I deeply appreciate the polished visuals and editing, your natural charisma and calming voice, and how comprehensive I have to assume all of this is. I didn't even realize I had watched the entire thing until it was nearly done.

    • @computer_toucher
      @computer_toucher Před 3 lety +118

      Same on the polished visuals; the presentation is top notch. Fun thing for me is it made realize I understand more about the hardcore concepts and details about programming than I thought. Like I thought it was a given that people knew about compilers optimizing conditional statements...
      Apparently I can humblebrag to myself that I am on the right side of Dunning-Kruger...

    • @Strawberrypersonoffixial
      @Strawberrypersonoffixial Před 3 lety +3

      Me

    • @Dystopie173
      @Dystopie173 Před 3 lety +6

      @@computer_toucher l actually had the exact same thought after this video.

    • @hrhcrab
      @hrhcrab Před 3 lety +12

      I don't know how much of it I understand (I'm a novice programmer), and I have no interest whatsoever in Yandere (whatever the fuck that is), C#, the unity engine or game development, but I found this to be an excellent and compelling technical presentation.

    • @TheHadMatters
      @TheHadMatters Před 3 lety +2

      He's like a polished male version of Caroline Konstnar with a skill.

  • @Rycluse
    @Rycluse Před 3 lety +3764

    Is this... good faith criticism? Coming from knowledge and experience instead of guesswork? That exists?

    • @MelonDev04
      @MelonDev04 Před 3 lety +38

      Rycluse Yes it does exist

    • @nonamezgamez4041
      @nonamezgamez4041 Před 3 lety +9

      Boi i think it is what you say it is.

    • @ootdega
      @ootdega Před 3 lety +122

      That's what happens when you're an actual professional, not a manchild joining in a circlejerk.

    • @HydratedBeans
      @HydratedBeans Před 3 lety +196

      Yeah people pay tens of thousands of dollars for deep dive reviews like this. Hopefully the dev will take the constructive criticism because he just got a free gold mine.

    • @thesammurairat700
      @thesammurairat700 Před 3 lety +15

      I mean he does work for YanDev so why would he shame him over Miss Information?

  • @TinBryn
    @TinBryn Před 2 lety +767

    I liked your take on how everyone suggests converting the else ifs into switch statements. The problem isn't the style of large conditional statements, the problem is large conditional statements.

    • @kylek.3689
      @kylek.3689 Před 2 lety +74

      Exactly! And if you refer to Microsoft's documentation, switch statements are effectively syntactical sugar for if/else if/else chains!
      *A switch statement executes the statement list in the first switch section whose case pattern matches a match expression and whose case guard, if present, evaluates to true. A switch statement evaluates case patterns in text order from top to bottom.*
      -- Selection statements (C# reference)

    • @BarioIDL
      @BarioIDL Před 2 lety +8

      @@kylek.3689 if else is great if you need to compare stuffs too

    • @yourbiggestfan395
      @yourbiggestfan395 Před 11 měsíci +1

      you made me laugh a lot, thank you.

    • @skvader4187
      @skvader4187 Před 11 měsíci +35

      Most people saying that else If statements are bad, are people who are not game devs or programmers.

    • @toxicitzi357
      @toxicitzi357 Před 10 měsíci +9

      ​@@skvader4187they probably are, but they're also so pretentious that I want to believe they only exist in hobbyist places and outside of workplaces in general..

  • @-ja
    @-ja Před 3 lety +1808

    Holy shit where did you COME FROM!? An hour of A1 editing, incredibly understandable concept presentation, insane amounts of knowledge/info on both Unity and computer science in general. This is crazy. This video has like several years worth of game dev knowledge/analytics shoved into it. You have under 100k subs, 2 videos, like what the hellll?!?! Your transition materials and songs are fucking well-found too. I don't understand where you came from bro, this is nuts.

    • @michaelmartiarena625
      @michaelmartiarena625 Před 2 lety +48

      i think he has got 2 vids because he's more of a streamer, but i agree, the quality is dope and he deserves more subs.

  • @amenokagaseo
    @amenokagaseo Před 3 lety +1296

    "a dark magic ritual known only to the compiler gods"
    so like building any cmake project

    • @maxinealexander9709
      @maxinealexander9709 Před 3 lety +8

      pfffff, yeahhhhh

    • @jacobbau8328
      @jacobbau8328 Před 3 lety +1

      Soo... like blast beating in drumming? Cause that’s essentially a ritual in itself.

    • @DFE-wu9lq
      @DFE-wu9lq Před 3 lety +6

      Till this day. I am not sure how did I manage to build llvm from source.

    • @whiteclaws6882
      @whiteclaws6882 Před 3 lety +16

      nah bro, that's easy, you call 'cmake .' and cry if it fails before finishing.

    • @nagitokomaeda3237
      @nagitokomaeda3237 Před 3 lety

      this.

  • @DartzSoryu
    @DartzSoryu Před 3 lety +6461

    I'm learning to code specifically for video games, and this video, despite expecting to see a well detailed criticism to YandereSims code, it ended to have a very high educational value for me, it helped me to understand many concepts and "why's" of things that I have only seen in paper, your visual editing adds a lot to understand it better. Thank you so much for this.

    • @ljhoser5842
      @ljhoser5842 Před 3 lety +40

      same bro

    • @manuelsoares4343
      @manuelsoares4343 Před 3 lety +26

      @Olli Rolli other people made the mistake first so you don't have to do it too, you won't even get a prize for it just a headche

    • @yj9729
      @yj9729 Před 3 lety +21

      Same to me...I clicked this video for entertaining, but it ended up educating me. It taught me that why the things that I did not fully understand in sample codes are used.

    • @thesammurairat700
      @thesammurairat700 Před 3 lety

      Same, but it turns out dyc3 works for yandev so its ok

    • @deliciousnoodles5505
      @deliciousnoodles5505 Před 3 lety +6

      Yup, also don't listen to the other CZcamsrs who claimed framerates are affected by too many if else statements

  • @esentries
    @esentries Před rokem +385

    "The compiler is smarter than you."
    Completely valid statement.

  • @PhoenixLive_YT
    @PhoenixLive_YT Před 2 lety +512

    As someone holding a degree in coding i knew since the beginning that most people are just shitting on Yan dev for the sake of shitting on him without any understanding of code optimization and differences.
    IF statements are not the reason why his game is slow, but people doesn't care about fact checking when they want to cancel someone.
    ..
    NOTE:
    i still Think Yan dev deserves most of the hate due to how childish he handled the drama

    • @lartts7483
      @lartts7483 Před 2 lety +123

      Most people hate YandereDev because of his actions and toxic behaviour, not his coding. The "shitting on his code" part is usually to make fun of him, fyi I don't exaggeratedly shit on his code as other people do.

    • @imarchello
      @imarchello Před 2 lety +5

      Imaging caring about someone you have never met and never will.

    • @ammyvl1
      @ammyvl1 Před 2 lety +9

      to be fair, they didn't really have access to the profiler

    • @strych9ines
      @strych9ines Před 2 lety +1

      Yandere dev isn’t gonna fuck you dude

    • @demonking86420
      @demonking86420 Před 2 lety +15

      @@lartts7483 yeah the whole segment this dude did on the "elseif criticism" is cringe

  • @ethanyeung6216
    @ethanyeung6216 Před 3 lety +2152

    yo your music slaps, didn't realize you made all of it yourself

  • @Wiizl
    @Wiizl Před 3 lety +6797

    Finally a real analysis of the whole thing! Not just "IF-ELSE bad, SWITCH good!!!"

    • @nitesy381
      @nitesy381 Před 3 lety +288

      Yay someone mentions how compilers can fix everything

    • @Drizzle52693
      @Drizzle52693 Před 3 lety +118

      He’s wrong tho. The compiler can optimize if there’s less than 5 if else statements. If he did the experiment with 5+ If elses then the results would be much different

    • @neociber24
      @neociber24 Před 3 lety +408

      @@Drizzle52693 Sure, but that will save how much? 1ms?
      Most of the problems of fps are in the render updates not in a bunch of if statements and bad coding practices

    • @keiskay
      @keiskay Před 3 lety +176

      @@neociber24 most of the fps drops come from his god awful ai pathing, if you disable the ai pathing your fps will jump up by a huge amount.

    • @RaskaTheFurry
      @RaskaTheFurry Před 3 lety +88

      @@neociber24 even if it were 1 ms, 1 ms every frame is huge.

  • @Thornskade
    @Thornskade Před 3 lety +81

    51:20 "The ritual used to pull this standard out of some poor engineer's ass" - Engineer dies in background
    That must be the most obscure TF2 reference ever, even I barely noticed it and had to rewind.

  • @YTPrule
    @YTPrule Před 3 lety +47

    As someone who codes, I always found the "If-Else" meme stupid for years. Replacing it with switch statements? The code he showed needed better code structure so he wouldn't need so many if statements in the first place. I told off people who suggested using cases rather than negating the need for so many in the first place. BlackWasp did a test where a billion iterations were done to test the speed difference between if-else and switch on C# and it amounted to about 5 seconds of difference. Thanks for concisely saying what I've been trying to tell people since that dumb meme was a thing. By the time changes like that need to be made, their code better be so beautiful that it ups the world's divorce rates. I better see people leaving their wives because of how beautiful the code is. And I've seen groups that believe if-else statements simply look better therefore keep them just for readability's sake.

  •  Před 3 lety +2209

    The fact that this is the first "YandDev code review" that doesnt start with "I'm not a programmer/I don't use C-Sharp/I havent used Unity" its quite telling on most of the discourse on his code.

    • @proxy1035
      @proxy1035 Před 3 lety +143

      ​@@weakspirit_ compilers are literal magic and can optimize things you never thought about. but they can't fix everything, as seen in the video...
      and it's still better to try and write "good" code, not because it would run much faster but because it would make more readable and easier to work with.
      even if you just write something by yourself, if you choose stupid variable names, format stuff shitty, and don't add useful comments, you're not gonna know what is going on in your code if you stopped working on it for some time.

    • @a.n.l.aantineoliberalismas4504
      @a.n.l.aantineoliberalismas4504 Před 3 lety +8

      @@weakspirit_ yha most if the drama around him is also bs

    • @skeleyold5991
      @skeleyold5991 Před 3 lety +64

      I mean it doesn't change the fact that the game runs like trash

    • @harrylane4
      @harrylane4 Před 3 lety +76

      @@a.n.l.aantineoliberalismas4504 no. No it's not. Dudes a dick.

    • @bonelesscommunism4031
      @bonelesscommunism4031 Před 3 lety +29

      DawnPraiser optimizing code doesn’t really help when it’s structure is god awful so awful no one can read it besides Yandere dev

  • @personettelabs
    @personettelabs Před 3 lety +1802

    "Painstakingly converted every if statement I could to a switch statement". You absolute mad lad.

    • @thorham1346
      @thorham1346 Před 3 lety +19

      A total waste of time.

    • @prithyachan333
      @prithyachan333 Před 3 lety +1

      @@thorham1346 Why do you think so?

    • @thorham1346
      @thorham1346 Před 3 lety +115

      @@prithyachan333 Because you can save yourself a lot of time, effort, and headaches by just starting over from scratch completely and implementing everything properly.
      If you would actually clean up that source code entirely and properly there wouldn't be any of it left anyway.

    • @prithyachan333
      @prithyachan333 Před 3 lety +157

      @@thorham1346 I see. But they did that only to clear up some misconceptions. So I think they did a pretty good job.

    • @demonking86420
      @demonking86420 Před 2 lety +36

      @@prithyachan333 to be honest the whole "misconceptions about the code" bit seemed cringe, it seems like he was offended abut the elseif screeching when the vitriol against yanderedev primarily hinges on the abysmal development speed, his creepy behaviour, and his inability to take criticism
      The elseif screeching was nothing but decorative icing on the cake

  • @dmj271095
    @dmj271095 Před 8 měsíci +62

    Are we allowed to bully now?

    • @holyboiamethin2790
      @holyboiamethin2790 Před 8 měsíci +3

      That's what I wanted to comment 😂. Glad we have the same thoughts

    • @_WalterWhite
      @_WalterWhite Před 8 měsíci +8

      yes i give you permission 😄😄🙌🙌

    • @BarioIDL
      @BarioIDL Před 8 měsíci

      yes

    • @MYLAR.
      @MYLAR. Před 7 měsíci +12

      oh we’ve always been allowed to bully the Moment he put panty shot currency in the game

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

      What happened? I'm not exactly up to date with YanDev lore

  • @thaumaticpig
    @thaumaticpig Před rokem +166

    There's an interesting comparison to be had between Yandere Simulator and Wintergarten's Marble Machine X. Both projects have incurred massive amounts of Technical Debt over the years of their development, but while YandereDev holds onto his precious game code, Wintergarten (essentially) threw away the MMX that he spent years on so he can instead use the knowledge he gained from the first two machines to create a new, better one without the burden of his previous designs. Another interesting thing is that both creators are also the biggest critics of their own projects. YanDev could have done his fabled Kickstarter years ago (and it'd likely be wildly successful), but he doesn't feel like the game is close enough to his vision for that; and Wintergarten could've toured with the MMX and almost no-one would notice a few dropped marbles. Ultimately, I hope both projects come to fruition, but we'll have to wait at least a few more years for that.

  • @siangchengpang772
    @siangchengpang772 Před 3 lety +2142

    Just gonna say, as a coder myself this is probably one of the best video about programming I've seen on CZcams, it's mind bogging that you don't have more content

    • @ErrorNameNotFound123
      @ErrorNameNotFound123 Před 3 lety +5

      I feel the same dogsong

    • @firstname4337
      @firstname4337 Před 3 lety +2

      considering the way he looks I'm surprised he has any viewers at all

    • @SuperColdLemonade
      @SuperColdLemonade Před 3 lety +58

      @@firstname4337 considering the way you write, it is hard to believe you can write at all. Is this even a comment ? nice nick btw.

    • @XGreySkyX
      @XGreySkyX Před 3 lety +6

      I'd take quality over quantity everytime. 😊 Keep up the informative work!

    • @PorthoGamesBR
      @PorthoGamesBR Před 3 lety +12

      It actually made me more confident about my own game. My code has lots of if else and switches and i was a litle bit scared of having bad performance. But now i undesrtand that this is something more of architechture than actually performance

  • @RUdigitized
    @RUdigitized Před 3 lety +2794

    This guy has professnals offering to work on his game for free and says no. No wonder he’s in the pickle he’s in

    • @WolfrostWasTaken
      @WolfrostWasTaken Před 3 lety +150

      This ^^^^
      THIS ^^^^^^^^

    • @Pred.
      @Pred. Před 3 lety +341

      Also the fact he's a massive pedophile and creep

    • @PebelWasTaken
      @PebelWasTaken Před 3 lety +29

      @@Pred. he's a pedo?

    • @alf_url
      @alf_url Před 3 lety +224

      His backstories for the characters are quite, let's say, disturbing.

    • @swindlesmccoop
      @swindlesmccoop Před 3 lety +107

      Pred is that true? or is it just something you've heard with no evidence and you want to believe because you want to jump on the anti-yanderedev propaganda train full of lies and hate and like taking in all the drama, thinking youre actually contributing to something?

  • @yusuf3728
    @yusuf3728 Před 2 lety +68

    I was waiting a 10 min critisism instead I found a highly educational 1 hour video. I learned A LOT. Thank you and do more of this thing

  • @laurencisewski7859
    @laurencisewski7859 Před 3 lety +79

    hey! just wanted to return to this old video to say it’s truly amazing. i can tell you really know what you’re talking about and also really have a passion for it. your humor is totally great but still doesn’t impede on the technicality, which is really commendable. keep it up, man :-)

  • @Tacticalgamer2011
    @Tacticalgamer2011 Před 3 lety +403

    As a Unity noob, this was more helpful as a tutorial than many actual tutorials out there

    • @saulgoodman5662
      @saulgoodman5662 Před 3 lety +2

      lol

    • @tinhead_junk
      @tinhead_junk Před 3 lety +27

      As a Unity noob, I have no clue what is even happening.

    • @doopy
      @doopy Před 3 lety +11

      @SpyInTheBasement as a unity noob, what's unity?

    • @manman-fq4zw
      @manman-fq4zw Před 3 lety +2

      as a Unity noob, I killed my entire family and am on the run

    • @AstralSpectre
      @AstralSpectre Před 3 lety +7

      As a unity Noob, I have commited arson

  • @LordBumwaggle
    @LordBumwaggle Před 3 lety +1156

    I never knew that this was what I've been missing in my life. I went fullscreen on this badboy, lay back in my chair and watched this shit like a nature documentary.

    • @nonamezgamez4041
      @nonamezgamez4041 Před 3 lety +75

      Dude same. like, we finally get an UNBIASED look into whats really happening. Thank god i stumbled in this.

  • @jupiterjaeden9163
    @jupiterjaeden9163 Před 3 lety +68

    The production value on this video for such a small and new channel is insanely high. I expected to scroll down and see a channel with hundreds of thousands of subscribers (at least!). Great video, you definitely deserve more recognition.

  • @Jaminux
    @Jaminux Před 3 lety +206

    i honestly adore when youtubers have nice, calming videos like these, but then they slip in subtle things like 38:38. has a nice flavor to it

  • @kanamea5786
    @kanamea5786 Před 3 lety +1826

    THANK YOU!
    This is by far the most informed analysis for yandere simulator's code I've seen. I was getting tired of people barking at the wrong tree (like if-else vs switch) and ignoring the glaringly obvious architectural issues. I never looked at the full source code myself, but the snippets I've seen people criticized seemed like it's something that can just be written better elsewhere to make it more generalized/abstract because of constant reinvention of wheel and copy paste. You're the only person I've seen tackle this code from this perspective and it's really refreshing.
    I also appreciate the rundown on things like asset optimization because I'm not familiar with this department. It makes sense that the underlying performance issues lies heavily on those part rather than his badly written scripts. I've always felt like his scripts are more maintenance/development issue rather than performance issue, massively slowing down the development progress.

    • @ErgonomicChair
      @ErgonomicChair Před 3 lety +10

      Well, he's not really correct, though. There are a lot of actual trash practices in his code that is slowing it down, and I am developing a game that has more content and more systems running at once than Yandere Simulator. Price for freedom Avarice. I know for a fact that his programming is shit, and the game chugs for a reason.
      Measuring via ReLive and Fraps, no, actually, the FPS does make dips
      down to 17 on my system despite having an RX 580 and Ryzen 2600x.
      Let's not ignore that within a month another project just popped up that
      runs better and smoother, and is more complex. WNM was also one of
      these, Lovesick, etc. Yandere Simulator chugs. It chugs. HARD.
      Constantly. Despite being so simple it is embarassing.
      It only
      simplifies if-else statements if it is SIMPLE by the way. I don't know
      how dyc3 got that his huge fucking complex if else chains will simplfiy
      in their current state. THey won't. It won't go into a switch if there
      is no switch in IL either.

    • @kanamea5786
      @kanamea5786 Před 3 lety +45

      @@ErgonomicChair I never said his coding isn't bad, I just don't believe that it's the bottleneck or the major cause for performance issue, more of a readability/maintainability issue.
      I never really looked at the full source code, can you give some examples of bad coding practices that impacts the performance in a meaningful way? I can see them do stuff like calling some drawing or state calculation logic more than necessary outside of scripts, but honestly I don't think this guy's 20 layers of if statement really impact the performance all that much despite being a terrible code.

    • @scottmichaud
      @scottmichaud Před 3 lety +15

      @@ErgonomicChair An RX 580 with a Ryzen 2600x should get ~80-120 FPS with shadows disabled (we know about the issue with shadows) and when the students aren't all in the camera's view frustum (because the game uses the single-threaded Legacy Animation System instead of the multi-threaded Mecanim). We know about a few bottlenecks, but, apart from shadows and lower detail 3D for integrated GPUs, it's in the realm of okay... and the bottlenecks that do exist *are not the code*. There are now two people who have profiled it, dyce and myself, who says it's not the code. Listen to us.
      And I mean it should make sense. If you see a massive performance increase by going to Unity 2019.3, which did not change the scripts, then it should tell you that the code was not the bottleneck. In fact, the game got way over a 2x speed-up between January 2019 and July 2020 for gaming machines without the code changing. Over half of all computation time disappeared, but YandereDev's code didn't change. That's definitive proof that people who blamed the code back in January 2019 were completely wrong.

    • @MattRogan28
      @MattRogan28 Před 3 lety +2

      My PC ran Yandere simulator with max setting with shadows on and get 55-64 FPS and ever beyond that
      The only issue I have is that has long load time but beside my PC ran the game fine
      Edit:correction when I have shadows on is drop A bit but stay over 30 FPS

    • @maddie-xk2uv
      @maddie-xk2uv Před 3 lety +4

      P-peko?!

  • @roserocksrapidly
    @roserocksrapidly Před 3 lety +421

    95% of this went directly over my head, but I was still strangely entertained for an hour lol

    • @Crazylom
      @Crazylom Před 3 lety +4

      That is what i call true intertainment

    • @jayive34
      @jayive34 Před 3 lety +5

      Same. If I understood that shit. I wouldn't be a mall cop.

    • @8015908
      @8015908 Před 3 lety +1

      I'm a programmer, and am still entertained. This guy has a good presentation.

    • @monicaraybrandt
      @monicaraybrandt Před 3 lety

      i'm just here like "i made a website in notepad once"

  • @loop_zoop
    @loop_zoop Před 3 lety +51

    This is one of the most quality code analysis videos I've ever seen. Really hoping you do more of these type of videos.
    Also a suggestion that would be interesting is Celeste's movement code where there are 5400 lines of code in one file.

  • @viktortarko9344
    @viktortarko9344 Před 3 lety +35

    Me, who never even attempted to make a 3d game: "hmm, yes"

  • @snicklefritzal
    @snicklefritzal Před 3 lety +381

    Every programmer should have "the compiler is smarter than you" as their desktop background :p

    • @gileee
      @gileee Před 3 lety +35

      Exactly. The only thing we understand that the compiler doesn't is the underlying logic of the algorithm itself and that is what we're supposed to optimize.

    • @0x00Fyou
      @0x00Fyou Před 3 lety +9

      Fuck it. Ryzen 4K logo to remind Intel fanboys that i spend less money for equal, sometimes more performance
      lol

    • @PeterG00000
      @PeterG00000 Před 3 lety +3

      It seems as though this game creator is just dragging ass until his devoted fans crowdsource the game into completion for him. Maybe the guy knows more now, but he doesn't seem to have known enough at the game's inception.
      However, the controversy is more interesting than the game itself, so maybe I shouldn't complain.

    • @JosephAgrane
      @JosephAgrane Před 3 lety +4

      The compiler can actually be a pain in the ass leading to incorrect optimisation that breaks code. You then have to dig through the code and tell the compiler not to optimise certain things and stop breaking your code.

    • @0x00Fyou
      @0x00Fyou Před 3 lety +1

      @@PeterG00000 1,2 million dollars in crowdfunding, 400 dollars spent on a sex doll and dressed it as a student in the game , a generous 3,5K monthly as his salary. Shit coding

  • @cryptidcoven7143
    @cryptidcoven7143 Před 3 lety +625

    Trained game artist here, retopping the entire game, although a big job, wouldn't take as long as you might think. With a game that's not that detailed, this job wouldn't make a display difference really. I must admit, when you showed the polys on the models walking i just about had a fit. Unfortunately, Yanderedev doesn't pay and gives no credit so i doubt he'll get hold of someone able to retop these models to a decent degree.

    • @harrylane4
      @harrylane4 Před 3 lety +46

      It's not just retopping these models. Iirc, entirely new ones need to be made, because these ones are from the unity store.

    • @bonelesscommunism4031
      @bonelesscommunism4031 Před 3 lety +16

      Harrison Lane not really?? Most of them are made by some high school/college kid doing the models not knowing what in the candy fuck they’re doing and they optimize them super poorly like someone got ahold of some of the models and they had some baffling design decisions made

    • @cnof00
      @cnof00 Před 3 lety +24

      @@bonelesscommunism4031 The majority of the models still are from the unity store.

    • @solidshark91493
      @solidshark91493 Před 3 lety +2

      @Yeah Itsme There are hundreds on the subject. Just search Model retopology.

    • @trashdoge1217
      @trashdoge1217 Před 3 lety +9

      @@bonelesscommunism4031 No most of them especially surroundings are just unity store bought assets.

  • @TheBoxyBear
    @TheBoxyBear Před 3 lety +44

    Instead of having complex inheritance and a class for each student, you could also have a single Student class that stors its personality as fields. Then have its functions like "ReactToMurder" call an instance delegate whose value is assigned in the constructor depending on the personality. The two main benefits are
    1: You only have one class to maintain and using delegates removes the need to read the personality every time the student has to do something.
    2: You can modify the personality of student at runtime by turning the fields into properties with a setter that also reassigns the delegates.
    To avoid having every student keeping a seperate copy of its code, you could also define static delegates that act as defaults then assign the instance ones to the static ones.

    • @ahall9839
      @ahall9839 Před 11 měsíci +1

      So inheritance, but with extra steps to make it technically not inheritance. And I have no idea what you think "complex inheritance" is or how any of this qualifies as "complex inheritance". Unless you think "any inheritance whatsoever" is "complex inheritance".
      "1: You only have one class to maintain..."
      Okay, so you just don't know what inheritance is. One of the main points is to reduce maintenance of exactly this type of thing. And I feel like you have not only never coded anything in your life, but possibly have never opened Notepad before.

    • @2minuss
      @2minuss Před 8 měsíci +18

      ​@@ahall9839Ahh, good old "condescending CZcams commenter making baseless assumptions for no reason".

  • @abbeycase143
    @abbeycase143 Před 3 lety +279

    His voice is a mix of ASMR and the nerd in class who only speaks when he's spitting facts

    • @amandaschmitt5019
      @amandaschmitt5019 Před 3 lety +14

      As someone who takes classes with him, you're entirely correct

    • @Intikus
      @Intikus Před 3 lety +3

      @@amandaschmitt5019 Prove it

  • @secretcactus4717
    @secretcactus4717 Před 3 lety +1680

    Excellent video. A solid in-depth look to this game.

    • @rollthedyc3
      @rollthedyc3  Před 3 lety +130

      Much appreciated!

    • @G_Ryuji
      @G_Ryuji Před 3 lety +35

      You mean, mess. It's not even a game, it's just a walk and kill sim with a ton of messy assets everywhere.

    • @marrowyoutube
      @marrowyoutube Před 3 lety +9

      @@G_Ryuji true

    • @firstname4337
      @firstname4337 Před 3 lety

      a shit video

    • @ryzhik9608
      @ryzhik9608 Před 3 lety +6

      @@G_Ryuji No you are talking about Lovesick now. We are talking about yansim, kiddo

  • @GoldphishAnimation
    @GoldphishAnimation Před rokem +50

    Went into this with the common "if switch" belief, but showing the tests you did very clearly and speaking unbiasedly, you really have changed my mind. Well done, love the teardown and honest discussion. 10\10

  • @BunnLilah
    @BunnLilah Před 3 lety +31

    I'm really new to programming so I didn't understand a lot of the stuff in this video but it's really great to see someone knowledgeable explain it and tell people who don't code why it isn't as easy as what a lot of these people suggest all the time. I imagine if these people got to see the source code of some of the biggest games in recent years, they'd be surprised by how "sloppy" it is. It's probably structured better but I guarantee there's some really embarrassing code in many of the games we all play.

  • @Lilacuity
    @Lilacuity Před 3 lety +209

    Pointing out flaws in his game rendering times and then helping him opitimize them?? You're a true hero

  • @ButtslammerBob
    @ButtslammerBob Před 3 lety +368

    "these save files are super big"
    *cries in modded skyrim save files that always inevitably break*

    • @MelonDev04
      @MelonDev04 Před 3 lety +3

      The Save file is bigger than the Maus

    • @InterestEPC
      @InterestEPC Před 3 lety

      Rimworld save file sizes would like a word too.

    • @happydemon3038
      @happydemon3038 Před 3 lety

      I dunno, that save file size seems rather small for modern systems.
      Even if the game only took 1 GB of space, to double it's space with save files, you'd have to make at least 1 024 saves.
      Compare that to world files in Minecraft, which can become truly massive.

    • @ButtslammerBob
      @ButtslammerBob Před 3 lety

      @@InterestEPC And CK2, and some Total War, and Warband, but these don't habitually break because they've gotten too big

    • @thesammurairat700
      @thesammurairat700 Před 3 lety

      Why tf would yu b using mods if the save breaks with them

  • @Gr13fM4ch1n3
    @Gr13fM4ch1n3 Před 10 měsíci +9

    I have no clue what you said, but I listened to every second of it.

  • @TheAnonLee
    @TheAnonLee Před 3 lety +42

    As someone learning to code this was a great resource to me. Glad to see someone actually probably taking it all apart and seeing what’s wrong rather than just pointing out if else statements.

  • @aj7842
    @aj7842 Před 3 lety +1417

    me watching as if i know about anything he’s talking about: 👁👄👁

  • @GibusWearingMann
    @GibusWearingMann Před 3 lety +166

    the autocaptions don't know what a "yandere" is and it's very funny to watch them struggle with this word

    • @anon-jp6kx
      @anon-jp6kx Před 3 lety +9

      40:38 when the automation gets it right

  • @Spellweaver5
    @Spellweaver5 Před 2 lety +19

    You know, I really appreciate you pointing out the real problems with the code.
    It bothered me to hear people saying nonsense like "the code runs poorly because of elseif statements".
    I actually wrote the comment before I saw you address this specific point, and I really want to thank you again. As someone who works with code, I hate blind micro-optimisations. It's not the milliseconds of performance that should be chased when refactoring, but hours of development time.

  • @SmileytheSmile
    @SmileytheSmile Před rokem +10

    For some reason I keep coming back to this video once in a while. Wish you did more code reviews like this one, dude.

  • @tistitistiyeaya199
    @tistitistiyeaya199 Před 3 lety +619

    Coding level at the start of the video: 0
    Coding level at the end of the video: 0

    • @caidenbond1988
      @caidenbond1988 Před 3 lety +49

      Coding level forever: 0

    • @jmanpolo5611
      @jmanpolo5611 Před 3 lety +102

      @@caidenbond1988 Congrats you guys set variables! CodingLevelAtStart = 0 , CodingLevelForever = 0, CodingLevelAtEnd = 0 !!! Budding programmers already! You should now be at CodingLevel = 1!

    • @pitiponk1
      @pitiponk1 Před 3 lety +49

      @@jmanpolo5611 it's not the god of code status that's important, it's the semicolons we forgot to write along the way.

    • @TheDwarvenDefender
      @TheDwarvenDefender Před 3 lety +31

      if (codingLevel == 1) {
      console.log("Looks like you've still got a ways to go.");
      }

    • @user-sb8cs3le2j
      @user-sb8cs3le2j Před 3 lety +22

      @@TheDwarvenDefender nah do it in python
      codingLevel = 1
      if codingLevel == 1:
      print("ya did it!")

  • @mrldbsz
    @mrldbsz Před 3 lety +357

    As a software engineer, I must congratulate you on your amazing work on this video, I stumbled across it by accident and it just felt extremely good to see someone, who actually understands how coding works, talk about all the yandere dev bad code drama. Oh and I loved when you said: "The compiler is smarter than you", that is not only true but it is something more people should now about, as it appears that a lot of people forget that to run modern programming languages there are extremely robust compilers, with years of development behind them and that these compilers are engineered and designed not only to be smarter than average level programmers but to also be fool proof(well we know nothing can be 100% fool proof)

    • @superscatboy
      @superscatboy Před 3 lety +7

      Yeah, it can't be overstated how smart compilers these days really are. To a certain extent they even have literal theorem provers in them. The best advice these days is to write your code in a way that's easy to understand and easy to modify, and let the compiler worry about the rest.

    • @doliague2590
      @doliague2590 Před 3 lety

      Karen Pfp uwu

    • @frank-michaeljaeschke4798
      @frank-michaeljaeschke4798 Před 3 lety +2

      Citing Martin Fowler: Any fool can write code that a computer can understand. Good programmers write code that humans can understand.

    • @47Mortuus
      @47Mortuus Před 3 lety

      Decades* of development
      And additionally, the actual development that's being done on them is work being done by mathematicians AND computer scientists (being a mathematician does not necessarily help you understand computer performance)
      I attempted to write "clever" SIMD code for some commonly used (by me) but unusual/arbitrary modulo operations. None of them were even 75% as fast as simply typing "x % y" and letting the compiler do all the work for me...
      The compiler is actually, IMO, the real reason behind so many experienced programmers feeling like impostors:D

    • @DFPercush
      @DFPercush Před 3 lety

      @47Mortus the channel javidx9 recently did a video about simd code and crunching the mandelbrot set, he looks through a few examples of where the compiler can optimize it for you and where it can't. Pretty enlightening. It basically comes down to whether there are any conditions inside your loop.

  • @justinlua4848
    @justinlua4848 Před 3 lety +19

    Thank you for the else if vs case presentation. People (including myself when I was younger) get waaaaay too wrapped up in micro-optimizing things to save microseconds.
    There's nothing wrong with using the massive computing power we have to run high level "unoptimized" code if your program works well for what you're trying to do.

  • @emilie5501
    @emilie5501 Před 3 lety +10

    thank you for like... ACTUALLY explaining everything in a very coherent way? i came into this video knowing NOTHING about game coding/coding in general, and came out of it with a better grasp on what gaming coding/coding actually is (and helped me understand what was ACTUALLY going on w yandere simulator) , thank u!

  • @wisemage0
    @wisemage0 Před 3 lety +763

    Someone actually reverse-engineered the game to retrieve this man's Unity project. How suave.
    This video is better than the drama, and that is saying something!

    • @BreakTheBeat852
      @BreakTheBeat852 Před 3 lety +28

      It's not really reverse engineering, it's just decompiled code

    • @wisemage0
      @wisemage0 Před 3 lety +13

      @@BreakTheBeat852 Close enough. 😎

    • @thesammurairat700
      @thesammurairat700 Před 3 lety +1

      Doesn’t really say something because the drama far from that

    • @fungo6631
      @fungo6631 Před 3 lety +1

      Wasn't the source code leaked?

    • @thesammurairat700
      @thesammurairat700 Před 3 lety +6

      @@fungo6631 Not really, its misinformed... The leaked code that is

  • @PASTRAMIKick
    @PASTRAMIKick Před 3 lety +398

    Finally, someone that does know what he's talking about, I've been coding embedded C and assembly for some time now and people didn't seem to understand that some "best practices" things are for code readability not much for performance, since in the end it all gets converted to assembly (in C), and a similar thing happens in programming languages like C# and Java it gets turned into bytecode and something that can be executed by the JVM or C# equivalent.

    • @Yotanido
      @Yotanido Před 3 lety +51

      @Jonathan Gomez Why do people keep saying that Java is slow?
      Yes, it is far slower than C, C++, and Rust. Sure.
      But in the grand scheme of things, it's pretty fast. Much much faster than languages like Python, Ruby, PHP, etc. Which are all used professionally.
      -
      Java is not a slow language by any means, it's just not a super fast one, either.
      (Oh, and also, Java can be compiled ahead of time, which would put it on par with C++. Nobody does that, though)

    • @theshermantanker7043
      @theshermantanker7043 Před 3 lety +6

      @@Yotanido I would even go so far as to say Java is the fastest non AOT language to exist in fact

    • @freelanceart1019
      @freelanceart1019 Před 3 lety +2

      @@Yotanido JavaScript is Amazing its a highly versatile language used in Buildbox 3 and Construct 3.

    • @DP-jt6xx
      @DP-jt6xx Před 3 lety +26

      @@freelanceart1019 java and JavaScript are 2 different things

    • @MadsterV
      @MadsterV Před 3 lety +1

      Sure, Java is not slow if you compare it to other slow languages... and systems being in use "professionaly" says little about their performance. The things you see in the field....
      Compiling Java does not put it on par with C++ though. The runtime does a lot of runtime checking, and this goes into the build, while C++ does none of that nonsense and just slaps you with an exception when you do something you shouldn't. Java (the JVM actually) also has some greedy resource usage patterns, so it can hide it's low performance, while C++ can be very lean if you don't do anything silly, while still performing properly.
      On another topic, js is only verbose if you're doing it wrong. It's problem (or what most people starting in it struggle with) is not verbosity, it's the unusual object model (and shooting your own foot with all that type freedom).

  • @juneru2
    @juneru2 Před rokem +22

    I think the main problem is that as far as I know Yandere Sim one of, if not *his first games he's ever made.*
    Game development is a journey, and it takes making _many_ games to achieve making something remotely as ambitious as Yandere Sim. He should've started with something like PONG, even Tetris can be a struggle for a beginner. It's no wonder he's been working on this game for almost a decade now.

  • @manthrax69
    @manthrax69 Před 3 lety +11

    This is a great investigation/roundup. Im not a "yandere" player, but I'm an old game dev (30 yrs) , and the information you're throwing out here is a great roadmap for avoiding some performance pitfalls in Unity.

  • @axcel8896
    @axcel8896 Před 3 lety +812

    Me as a non coder: Haha lines go 🅱︎🆁︎🆁︎🆁︎🆁︎🆁︎🆁︎

    • @Cc99XYT
      @Cc99XYT Před 3 lety +23

      Me, a normie: Haha FBI go 🅱︎🆁︎🆁︎🆁︎🆁︎🆁︎🆁︎

    • @axcel8896
      @axcel8896 Před 3 lety +21

      @@Cc99XYT My man you gotta unsub to yandev bro it's not worth it to follow him anymore

    • @okie9025
      @okie9025 Před 3 lety +9

      Me, a coder: Oh, that's strange! What you'll find here is££&(-) -) /'/%%%%%@%@%###]]©¥

    • @Epsellis
      @Epsellis Před 3 lety +9

      Me as a game artist trying to understand this smart people wizardry
      "Oh yeah polygons i get polygons, haha funny fence amirite? haha, yeah, wait... floating poi- what? nopenopenopenope"
      I'M NOT STUPID! I CAN COLOR INSIDE THE CIRCLES OKAY?!?

    • @Cc99XYT
      @Cc99XYT Před 3 lety

      @@axcel8896 I sub, only to watch him fall.

  • @invix3447
    @invix3447 Před 3 lety +197

    You got me hooked in the first minute lol.
    “But before we begin, I want to make it clear - because the last time _it didn't get through your fucking skulls_ - NO BULLYING.”

  • @JourneysADRIFT
    @JourneysADRIFT Před 3 lety +9

    Been working with unity for a few years now on content experienced by tens of thousands of people and this one video is by far the most information packed single video regarding Unity optimization I've ever seen over the years. I wish I had this video when I started my Unity journey. A+ man.

  • @ArcRayven
    @ArcRayven Před 2 lety +1

    Great job going over this. It was nice to hear your thought on the problems, identify what they had, why they might have done it that way and review potential solutions or theoretical ways. I had fun listening to this

  • @Hot18Shot
    @Hot18Shot Před 3 lety +244

    As someone who has never coded in his whole life, this whole video sounded alien to me but was quite interesting. I think I might have learned at least one small thing.

    • @DFPercush
      @DFPercush Před 3 lety +1

      I don't know how many times I've found it useful to write a little 10 line program to do some stupid little thing I needed. It's a nice skill to have, even at a very basic level. Think about it. Python is a good starting language these days.

    • @halinaqi2194
      @halinaqi2194 Před 3 lety

      Yikes, just start with c ++. I am going to game Development and I hate python, so glad I never went back to it.

    • @DFPercush
      @DFPercush Před 3 lety +1

      @@halinaqi2194 well, yes, python is not for games, but if you're a lay person who wants to dabble for simple scripting purposes, the learning curve is not as steep as C++. If you want to learn serious programming C++ is probably the best language because you can basically go from it to anything.

    • @jodazague8333
      @jodazague8333 Před 3 lety

      @@halinaqi2194 I wouldn't recommend c++ as your first programming language. Java or Python are better candidates

  • @barmetler
    @barmetler Před 3 lety +253

    The reason people cling onto that if/else stuff is, in my opinion, because it's the easiest to understand for a layman. The broad audience of criticism channels don't know much of anything about coding, but like to have an opinion and feel like they know something.

    • @nates9778
      @nates9778 Před 3 lety +22

      "BUT THE IF AND THE ELSE ISNT CLEAN LIKE THE BIG PRO CODERS DO IT. LIKE, I KNOW THERES CLEANER CODE THAN THIS, I DONT EVER SAW IT, BUT IT THERE AND THIS NOT CLEAN CODE!!!"

    • @PyroFTB
      @PyroFTB Před 3 lety +54

      @@nates9778 it is a valid reason tho, it's important to keep your code clean if you want to update/modify it.

    • @Obyvvatel
      @Obyvvatel Před 3 lety +12

      I mean, it just looks plain nightmarish to read. It's hard to fuck up performance with compilers that are smart, unless it's some sort of ground level thing, like loops within loops within loops doing something.

    • @barmetler
      @barmetler Před 3 lety +25

      @@Obyvvatel Yeah, It is really important to keep things readable. I personally am kind of a perfectionist when it comes to this, and love making things more efficient even if the compiler already does it. I basically treat programming like an art form, even if that might sound kind of pretentious, but I find it a lot of fun.
      However, in this situation, the bad code wasn't the problem when it comes to why the game runs like shit...

    • @glens2019
      @glens2019 Před 3 lety +5

      It's a tip of the iceberg type thing. If you make an elementary level mistake like this, who knows what you've done with more advanced functions.

  • @AlbySilly
    @AlbySilly Před rokem +5

    At this point, the game probably need a re-write to make expandability easier in the long run

  • @Red_Phantom64
    @Red_Phantom64 Před 8 měsíci +12

    Welp, now I'm getting recommendations of Yan Dev since his allegations came out, oof

  • @UngodlyDev
    @UngodlyDev Před 3 lety +660

    Sorry i didnt see this video sooner. I hope you see this comment dyc3; Im a professionally trained 3D artist and i fux wit da unity.
    You missed some optimization techniques that i think are super important:
    Unity only culls occlusion outside of the cameras view. So behind the camera. If theres objects behind some objects within the camera cone of view those are not automatically culled out by unity. For that you need a plugin.
    Some optimizations you didnt mention, and please research:
    Sectors and portals: effectively unload all assets that are not in your current room or in any of the hallways connected to your room. Thats better than just occlusion culling because occlusion culling checks for mesh object visibility every frame. Sectors and portals disable those objects and their components so they dont have to report every frame. Also disabling colliders, physics objects, skinned meshes, animation controllers and audio sources, which otherwise wouldnt have been culled unless theyre attached to a mesh renderer component, which can make them stutter and create unpredictable bugs.
    Gpu instancing: unity has a default setting for this but i use a plugin, anyways you can render identical mesh objects with less draw calls using the gpu. It can allow you use just absurd numbers of similar objects on screen without hitting the frames per second.
    Theres also gpu instancing for skinned meshes (animated characters) which you need a plugin for.
    Imposters: replace a very far away object like an LOD would, but with a normal mapped super low poly plane which is still light interactive and you can strife the camera in circles around the object and it will still report accurately, updating the billboard as you move, at the full resolution of the mesh with it's shaders no less.
    Lightmap baking: you only need a few runtime lights at any given time and you can switch off the far away ones. That saves an assload of light calculations, static lights on static objects can be baked which looks just like a real time light except WAY WAY BETTER. and way more preformant. You can still have runtime lights and they'll be even more beautiful also.
    FixedUpdate(): is better if something can be called from a fixed update rather than an update, youll save a lot of performance because its running each physics frame which called much less frequently than render frames.
    I've been following all these yandere sim youtube critiques (but not the pedo fuel game itself) and ive been consistently impressed with the content I've seen from the game and its critiques.
    Unfortunately right now i have to work a real job so i can afford upgrades to my life, but when i get back to making games, i wanna hire you to review my code before release pwease and tank u.

    • @rollthedyc3
      @rollthedyc3  Před 3 lety +175

      Wow! Thanks for writing this big long comment. I made it a point to *only* talk about optimizations that would help *this game in particular*. The only thing I didn't talk about in the video was draw calls, because the frame debugger doesn't work on the linux editor.
      I thought Unity did frustum culling before occlusion culling. Is this not the case? It doesn't make sense to do occlusion culling for anything outside of the frustum.
      Occlusion portals are pretty heavily used already so I didn't mention it in the video.
      Gpu Instancing: Very cool, would probably be extremely helpful. I found out yesterday that the students are being drawn twice, and there's a seperate draw call for every modular part of the student (hair, iris, hair pins, etc.).
      Imposters: Also sounds useful, but I'm not exactly sure how practical it is to implement now. This also sounds like it would interfere with mesh combining.
      Lightmap baking: As far as I can tell, lighting is baked, and while there are 14 instances of UnityEngine.Light, I don't think most of them are enabled, because I can't find them in game.
      FixedUpdate(): You have to be *really* careful about using fixedupdate because if the framerate is low enough, the frequency of fixedupdate is actually *higher* than update. Not good for fps. According to the Unity documentation, Fixedupdate is made for adding forces to rigidbodies and such, which is not really how Yandere sim's code works.
      Feel free to DM me on twitter: twitter.com/rollthedyc3

    • @scottmichaud
      @scottmichaud Před 3 lety +59

      @@rollthedyc3 Btw: I help YandereDev with optimizing the game. The game already does GPU Instancing and Static Batching. It used to do Dynamic Batching but I disabled it when switching from DX9 to DX11 because it was measurably slower. (I didn't try turning it back on after we jumped to Unity 2019.3, though. Maybe it's faster now. Testing that was one of my small items on the backlog.)
      There are some times when GPU Instancing breaks, though.
      Sometimes YandereDev adds a new material and forgets to check the GPU Instancing flag. Sometimes the object has a negative scaling, which forced Unity to disable batching and instancing (which I'm assuming is due to the winding order but Unity doesn't say)... but sometimes is big things like per-tree wind. I can fix that by writing a vertex shader instead of using the built-in wind system, but it's one of those "I need to stop YandereDev to implement it, and it needs to be at a time when I'm not helping other projects".
      But yeah... every dozen trees is 12 trees x 2 materials x 4 shadow cascades (basically cameras for shadow casters) = 96 draw calls... which should be 8 (or 4 if your toon leaves are opaque and just clipped with Alpha To Coverage or something). Lots of room to play in this space... including a low-quality shadow setting that sets shadows down from 4 to 1 cascade. There's a bunch of things that can be tried but it's a time thing... especially things that take a lot of time... especially things that take a lot of time and touch data files that YandereDev will also touch (like SchoolScene and StudentChan)... which means that he'd need to stop working on anything I'd change.
      Also, most of my tests with standalone builds shows rendering is not dominant (except if shadows are enabled of course). Not really sure why it's hitting you so hard.
      Also, lighting *is not* baked. That said, it's one directional light and an ambient fill, so it's not any slower than baked lighting. Toon is all about flat lighting because it's emulating an animator filling in a color, so flat, ambient fill makes sense. The extra lights are in the bathrooms, and they have a small range. They're there because Unity doesn't allow you to subtract lighting below the ambient (and you still can't, even in URP and HDRP)... so YandereDev drops the exposure and pushes the point light to compensate... which is why the bathrooms look weird.

    • @scottmichaud
      @scottmichaud Před 3 lety +32

      @Robin Hoole -- dyc3 is correct. Unity does frustum culling, and then does occlusion culling after that (if you set it up by setting objects to static occluder/static ocludee and then bake the occlusion voxels). Unity licensed it from a company called Umbra back in the Unity 3 days. Unfortunately, it's also kind-of slow and awkward, so there are some assets to replace it.

    • @perisleaf
      @perisleaf Před 3 lety +1

      Is your native language English because the grammar is not the best (just asking)

    • @kloa4219
      @kloa4219 Před 3 lety +3

      @@perisleaf I'm impressed

  • @Smugg
    @Smugg Před 3 lety +880

    Thanks for making this, dyc3. I’m a Sr. Software Engineer and all these people pointing at various small refactorings that wouldn’t even be mentioned in a rejected code review was making me frustrated. Sometimes in a production system you need to find the perfect performance to make your code fast enough, but over 90% of code most people write just doesn’t need all of the performance optimizations people were talking about. It’s almost as if they had never written a line of code for a real world software project with specs and deadlines. Sometimes these things just aren’t perfect but are still perfectly acceptable since they work well enough to get the code shipped. Given the amount of time he had, I’d expect things to be a bit better, though... but perhaps YandereDev either was an immature programmer or didn’t actually put a full 6 years worth of full time work into it (I suspect the latter but I don’t want to assume anything.)
    Anyway. Thanks again for making this. It was really interesting learning more about video game code optimizations in unity.

    • @Benjy52
      @Benjy52 Před 3 lety +35

      He spends most of his time streaming video games on Twitch.

    • @ryzhik9608
      @ryzhik9608 Před 3 lety +4

      @@Benjy52 wrong.

    • @Smugg
      @Smugg Před 3 lety +32

      @Paul Kerrigan Yes, 100%. They do have a point that nested ifs and a ton of ifs everywhere is harder to read, but that's not really the point they make in the various videos. They act like it impacts performance when in the real world nobody cares that much unless it an idealistic thing where they're trying to save every cpu cycle for some strange reason. Like, I wouldn't tell someone it's best practice to not care about how you use your ifs vs switches, but it doesn't affect performance the way they're making it seem like it does.

    • @yourbiggestfan395
      @yourbiggestfan395 Před 11 měsíci

      It's a useful tool, but when used entirely by itself it's fucking nonsensical

    • @elobiretv
      @elobiretv Před 6 měsíci +1

      Yeah it's easy for bedroom programmers to sit there and criticise code not being written perfectly for performance meanwhile in the real world it rarely matters and moving on to implement the next feature is more important.

  • @edvardpotapenko
    @edvardpotapenko Před 3 lety +2

    Great video. It's really cool that you've invested so much time not to only explain all of this, but help to fix it.

  • @pablorepetto2759
    @pablorepetto2759 Před 3 lety +13

    After 2 months of working with a terribly mismanaged codebase, I have to say: you sir, are an absolute legend, and I thank you for your service to coders everywhere.

  • @luxraider5384
    @luxraider5384 Před 3 lety +167

    This video really sounds like "common mistakes in game developpement" and for me as a beginner programmer it was really instructive

  • @KnucklesNCS
    @KnucklesNCS Před 3 lety +547

    In regards to the IF vs SWITCH argument, this argument was the wrong thing to look at to begin with.
    It should never have been IF vs SWITCH, but why do you need so many IFs to begin with.
    Most of the time, you can completely remove long IF ELSE scenarios by using inheritance or programming patterns (like the component pattern).
    But that would require YanDev to know what classes are, and from looking at his students script, he does not.
    Thus, an architectural problem does become a performance problem, as "perform a check" is always more costly than if you need to do nothing at all. (That said, I'm not sure how much it would affect the actual performance if most of the long IF ELSE blocks were gone, but it would still speed up the game, even if only marginally.)
    Great video all around! It was fun and interesting listening to everything you highlighted.

    • @TheEpicnesscontained
      @TheEpicnesscontained Před 3 lety +89

      This! A large reason why people always bash on elseif is to not tell yandev to use switch but to use other patterns and code that negates the need to have 50 elseif statements per student at all.
      You can SEE that the script for this game is taking up alot of the processing time if you go onto the game itself and turn on debug mode actively killing all of the background students besides the main character. The frame rate jumps up to 60fps and higher consistently. This is because the program doesn't have to constantly be doing those else if checks for each of the 100s of student per frame.

    • @pranavkarmarkar
      @pranavkarmarkar Před 3 lety +28

      Agreed! Multiple nested if-else statements also lead to some DEEP indentations which also messes up code readability that much.

    • @pacman_pol_pl_polska
      @pacman_pol_pl_polska Před 3 lety +1

      Is there any video/tutorial/infographic that would explain how to escape the IF ELSE IF IF IF IF ELSE IF IF ELSE hell?

    • @TheDXPower
      @TheDXPower Před 3 lety +19

      Using inheritance just moves the if-else somewhere else. It moves it to the vtable lookup, which *cannot* be optimized or predicted like an if statement can.
      A switch to inheritance can have benefits if and only if you are comparing the same state variables way more than necessary. If you use inheritance, the code will already "know" its intended behavior and thus won't have to check for what to do.
      Now for something like YandereSim, I think that yeah, inheritance would probably be the right option. But not necessarily for performance reasons. Architecturally, having a lot of different behaviors represented by just a few base functions is the perfect fit for inheritance. I don't think Components are a good choice here, because I don't see the possibility of modelling students' behavior using a component model. You would have to constantly check what components you have, which would create the convoluted if statements you were trying to avoid to begin with. Component models work best when you have lots of completely unrelated behaviors and data you want to join together.

    • @WolfrostWasTaken
      @WolfrostWasTaken Před 3 lety +45

      The problem here (and it's a very huge problem) is purely ARCHITECTURAL. If you write code like that, implementing new features and fixing bugs is going to become a NIGHTMARE, and a really time consuming one at that. YandereDev clearly doesn't know design patterns, he just writes code because "lul I want to see this work!!!!". That's his mentality since he was fucking 15, and he never grew up. Seriously. This is a problem in a game of this scale. This is a problem.

  • @maxifernandez1760
    @maxifernandez1760 Před 8 měsíci +9

    The argument that "the code is so badly written that it causes huge performance issues" is one of the worst becuase it's just calculations and are very little compared to what usually tanks performance, which is rendering related most of the time. Even if this is some of the worst code I've ever seen, Spaghetti code has existed in many games (although not as bad as Yandere Sim's code) and can be present in some of the greatest games. IIRC Halo 2 is one of these examples, according to youtuber InfernoPlus when talking about modding in Halo 2: "this game engine is held together by duct tape and popscile sticks".

  • @ShreddedNerd
    @ShreddedNerd Před rokem +5

    Enjoyed this video. It was better than most I've seen on this subject. Your knowledge was really apparent.

  • @sartouhou8349
    @sartouhou8349 Před 3 lety +387

    FINALLY BRO someone who actually knows what they're talking about

    • @sartouhou8349
      @sartouhou8349 Před 3 lety +11

      @@RitsuAbyssgard Yeah but "any other person with basic knowledge of coding" only knows about the if-else argument, and only knows about it because they've just read about it somewhere

    • @CH3LS3A
      @CH3LS3A Před 3 lety +18

      @@RitsuAbyssgard who said anything about appearance? plus, he showed us his thorough knowledge and experience, which is much more than basic knowledge, and much more than most of the "if else xdddd" circlejerkers.

    • @nesy3634
      @nesy3634 Před 3 lety +3

      @@CH3LS3A
      Not gonna lie, that strawman made me laugh from this Anime lad. This person who responded seems like a total blimp in the head.

    • @Dan_Kanerva
      @Dan_Kanerva Před 3 lety +5

      @@RitsuAbyssgard you are the reason people hate weeaboos

  • @manuillo94
    @manuillo94 Před 3 lety +367

    ur an unity wizard, my 7 years developing in the engine now feels like child's play

    • @freelanceart1019
      @freelanceart1019 Před 3 lety +29

      Unity is pretty hard for beginners considering so many option and version interations to choose from. Amazing but stability wise overwhelming.

    • @nursultannazarov8379
      @nursultannazarov8379 Před 3 lety +3

      @@freelanceart1019 what a weakling. Unity is peace of cake compared to Unreal Engine

    • @phitc4242
      @phitc4242 Před 3 lety +26

      @@nursultannazarov8379 ha! what engine? I only know C, you weakling

    • @ramster4459
      @ramster4459 Před 3 lety +48

      @@phitc4242 shame on you, i write everything from scratch in binary. Imagine using pre-cooked languages, pathetic

    • @phitc4242
      @phitc4242 Před 3 lety +15

      @@ramster4459 okay okay... my comeback:
      I designed my own cpu & cpu architecture MUWHAHA

  • @alzanari1274
    @alzanari1274 Před 3 lety +1

    one hell of a video to watch !! great work and please make more, i don't mind a long wait for videos of this quality!!

  • @Xhez2slash
    @Xhez2slash Před 3 lety +1

    This is a very informative video! Even though I didn't really understand most of the technical details, it was pretty dope to see everything at a high level. Thanks for the time you put into this video!!!

  • @Alesan99
    @Alesan99 Před 3 lety +778

    Finally a video that doesn't blame the performance issues on if-else statements.

    • @einarengvoll
      @einarengvoll Před 3 lety +3

      Are those bad?

    • @LowestofheDead
      @LowestofheDead Před 3 lety +50

      @@einarengvoll Compilers usually optimize them, so the supposed 'disadvantages' aren't a big deal anyway

    • @Alesan99
      @Alesan99 Před 3 lety +117

      @@einarengvoll using a lot of if-else statements makes the code look long and ugly (which is why people made fun of it) but it doesn't really make the game slower.

    • @gentaisurge8133
      @gentaisurge8133 Před 3 lety +13

      What I got from it is that yan dev doesnt know how to work with phiscal game asets and bones thus making the game slower, and the disorganisation making him take long on simpler tasks

    • @gayusschwulius8490
      @gayusschwulius8490 Před 3 lety +28

      @@Alesan99 this, so much this! It annoys the hell out of me that people who aren't even programmers keep beating that dead horse.

  • @ShadeStarMC
    @ShadeStarMC Před 3 lety +345

    Finally a review that isn't just "he's allergic to arrays" and "too many if statements" nice and in depth, sexy video

    • @jammiejammed
      @jammiejammed Před 3 lety +25

      i agree with all, but i agree with the sexy part the most

    • @ShadeStarMC
      @ShadeStarMC Před 3 lety +2

      @@jammiejammed ayyy you get it :)

    • @wisemage0
      @wisemage0 Před 3 lety +8

      Funny thing is, the game is crammed full of automatically generated arrays because of all the Drag'n'Drop.

  • @MirkoCrafter
    @MirkoCrafter Před 3 lety +21

    Talks about Occlusion Culling.
    Shows an image of Frustum Culling.
    *laughs in nerd*

  • @nevaehhamilton3493
    @nevaehhamilton3493 Před 8 měsíci +25

    Is anyone else here after YanDev's allegations of pedophilia came to light?

  • @SergeantMolt
    @SergeantMolt Před 3 lety +191

    I remember years ago, when I was really invested in the very beginning of Yandere Simulator, Yandere Dev decided he wanted to query the community about optimizing his game and refactoring it to be better built and engineered, to optimize and refine the architecture and make development ultimately faster. It would take him 2 months of no updates to do it.
    I voted "yes you've got to do that", but the community overruled it by 66% saying "screw performance, I want features". Just goes to show part of what the POTENTIAL root of the problem of optimization probably was: pressure from the 'stakeholders' to output consumable updates, which just ended up drowning the project in the long term and pissing everyone off more.

    • @neobahumuth6
      @neobahumuth6 Před 3 lety +48

      funny, this could be an allegory on AAA gaming too in the sense that shareholders (the community) don't care about quality of the project and only want cool new fireworks

    • @sebastiansosnowski3859
      @sebastiansosnowski3859 Před 3 lety +68

      This is one of these things where you just DO NOT listen to people who know nothing about how the software is made. Literally had the same problem at my job last year. We got an old crappy codebase and a client who wanted new features NOW, we just ignored them, fixed the architecture and then work has been a breeze. Don't want to know what'd happen if we kept building on top of that pile of garbage.

    • @MariaLuiza-tp2dc
      @MariaLuiza-tp2dc Před 3 lety +66

      Yandev is the adult, his fanbase are literal children. He SHOULDN'T ASK. He should ignore them. He's supposed to be in charge and he lets himself be bullied by his community all the time. He's too childish for this project to work

    • @SergeantMolt
      @SergeantMolt Před 3 lety +29

      @@MariaLuiza-tp2dc I think inexperienced and unprepared is the fairer qualifier here. Completely agree that he should've just had a spine and known what was best for his project, but it's quite emblematic of the qualifications he did have for this. You've got to have the spine to stare people in the eye and tell them "No", but also the experience/mentorship to know that's required and how.

    • @sebastiansosnowski3859
      @sebastiansosnowski3859 Před 3 lety +3

      @@MariaLuiza-tp2dc Absolutely true

  • @viks2ndaccount478
    @viks2ndaccount478 Před 3 lety +274

    about optimizing character models: the way you optimize them is by knowing how to prioritize polygons and use as few as possible without hurting the visuals, the character should be deisgned in a way where basic body parts that dont move (like forearms, thighs etc) have the least polygons while joints and features (elbows, knees, faces, maybe hair or some highlights on clothes) have more polygons to give more realistic animation for bends, twists and turns. They should also be constructed with a clear understanding of edge loops and how to effectively split features apart without "stitching" so it looks natural for arms to bend or strech or expressions to not interfere with other features or look half-baked. there are also several tricks that you can use to artificially make characters look better with textures, normal maps/height maps and shaders togheter with some other neat tricks, most of which can be seen in a+start's low poly series.
    of course im no proffesional or expert on this, i can be wrong about some things or using the wrong terminology, but its enough to get the point acorss. Making a model for a game is not as simple as making a model, slap some textures and a rig on and call it a day as long as it looks good enough.

    • @matejpesl6442
      @matejpesl6442 Před 3 lety +2

      And that's why I want to avoid game development as much as possible. It's hard man. And to me also boring.

    • @victornecromancer
      @victornecromancer Před 3 lety +3

      @@matejpesl6442 don't give up pal, there's no need to do everything in your game, just call some friends or hire someone that nails it for you

    • @matejpesl6442
      @matejpesl6442 Před 3 lety +5

      @@victornecromancer I change my comment: it's hard to do it *right. It's easy to do *something** in unity, but it's a very different thing to do it right.
      Also thank you, but I as I said I don't want to make games :D It's boring to me and my creativity isn't the best either. I'll stick to good ol' desktop, web or Android development.

    • @victornecromancer
      @victornecromancer Před 3 lety +2

      @@matejpesl6442 in the end, when you delegate functions to other people, you can focus on what you're good at. Anyway, i understand you

    • @matejpesl6442
      @matejpesl6442 Před 3 lety +1

      @@victornecromancer wtf are you talking about

  • @netscayped
    @netscayped Před 3 lety +2

    please make more 🥺 this is so much more engaging than most of my programming classes were

  • @EGIMSL
    @EGIMSL Před 3 lety +11

    dude wtf not only are you a very talented programmer but also incredibly talented music producer if you really made all that stuff from scratch. Lowkey I'd love to see a video of some of your production projects, your go to instruments / plugins, and other music production stuff...

  • @filly291
    @filly291 Před 3 lety +302

    I'm glad I found this video, I had enough of people screaming about the code and not explain g what is actualy wrong with it. Also, I know nothing about coding, but you explained it so I could understand as well. Nice job! Very well made video.

  • @Legendary-Miles
    @Legendary-Miles Před 3 lety +34

    So you know in the sims 4 when your sim is reading a skill book that is to advanced, they get tense and say that they didn't understand a single thing... yeah thats me right now

  • @RyanCGames
    @RyanCGames Před 3 lety +11

    For a small channel, this was a great, well put together video! I enjoyed it even though I never really got deep into programming (just basic Java and some MATLAB).

  • @cn-ml
    @cn-ml Před 3 lety +18

    16:30 When you converted all those if statements by hand i was laughing a bit, because visual studio even has a code refactoring snippet that does that automatically.

  • @amosp9411
    @amosp9411 Před 3 lety +229

    "I'll leave that as an exercise to the viewer"
    My guy, I am nothing like you...
    :'(

    • @ona512
      @ona512 Před 3 lety +1

      @@oldred890 oic, and here i thought i could rewatch it and think if my surface level coding knowledge would allow me to "solve" it. Guess not XD

    • @cakeisyummy5755
      @cakeisyummy5755 Před 2 lety

      I've never coded anything in my life.

    • @instantchaos2385
      @instantchaos2385 Před 2 lety

      @@ona512 i mean, u only need to place another component on top of it so it's probably your lack of Unity knowledge

    • @instantchaos2385
      @instantchaos2385 Před 2 lety

      @@cakeisyummy5755 happy for you

    • @ona512
      @ona512 Před 2 lety

      @@instantchaos2385 ur right, i know jack about unity.

  • @laresident5179
    @laresident5179 Před 3 lety +882

    Finally somebody actually debunks to code and not says "iF elSe deCreaSe PeRFormance!!!" like every other person. Thank you for this video.

    • @ecyor0
      @ecyor0 Před 3 lety +97

      Welp, guess it's time to once and for all cross that one off the list of reasons to dunk on yanderedev
      (Unfurls 6ft scroll and crosses out a single line)

    • @rburk854
      @rburk854 Před 3 lety +50

      yeah that's a super cringey CS 100 level take. Obviously a switch statement is nicer to look at from a coding style perspective, but it's not going to improve performance lmao

    • @prometheus5218
      @prometheus5218 Před 3 lety +24

      Who cares. Even if you know solutions to improve fps Yandev will not listen at all

    • @jp0678
      @jp0678 Před 3 lety +11

      ​@@rburk854 Yeah, it's sad that misconception even resulted to the "if-else" meme, should've just stuck to the cum chalice meme.

    • @iandrsaurri625
      @iandrsaurri625 Před 3 lety +20

      @@prometheus5218 He literally linked this video in his new blog post and he has made many updates and optimization fixes in recent times. He definitely watched this video so new features will have better practice. Also, he is hiring a professional programmer to redo the code *if* he ever gets to the demo.

  • @LowLevelLemmy
    @LowLevelLemmy Před rokem +4

    I come back to this video regularly and realize/learn something new that I didn't process the first time cuz I was a worser programer back then

  • @zokalyx
    @zokalyx Před 3 lety +2

    Bro this is so high quality content. 10/10 would watch again somewhen in the future.