Yandere Simulator Complete Source Code Analysis - Code Review

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

Комментарии • 4,5 тыс.

  • @rollthedyc3
    @rollthedyc3  4 года назад +8055

    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: ruclips.net/user/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 4 года назад +122

      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 4 года назад +53

      you are a god.

    • @gamingbud926
      @gamingbud926 4 года назад +23

      Didn't even notice :)

    • @CirkusBolgen
      @CirkusBolgen 4 года назад +157

      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

    • @sashaenglebert
      @sashaenglebert 4 года назад +85

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

  • @billvolk4236
    @billvolk4236 4 года назад +30677

    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 3 года назад +1989

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

    • @TeknoJackal
      @TeknoJackal 3 года назад +4624

      @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 3 года назад +1263

      @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 3 года назад +290

      @@kittycat344 protags bedroom I believe.

    • @fluffybun713
      @fluffybun713 3 года назад +709

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

  • @owl1095
    @owl1095 4 года назад +10507

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

    • @ona512
      @ona512 4 года назад +470

      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 3 года назад +290

      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 3 года назад +137

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

    • @jake_dev1046
      @jake_dev1046 3 года назад +15

      @envy lua language has end

    • @jake_dev1046
      @jake_dev1046 3 года назад +9

      @envy i mostly code in lua

  • @MoeMoeStudio
    @MoeMoeStudio 3 года назад +17049

    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 4 года назад +5608

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

    • @TimeTravelingFetus
      @TimeTravelingFetus 3 года назад +300

      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 2 года назад

      what the fuck is wrong with him?

    • @rayhimmel7167
      @rayhimmel7167 Год назад +181

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

    • @mariocamspam72
      @mariocamspam72 Год назад +59

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

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

      fucking*

  • @valumtimes
    @valumtimes 4 года назад +6450

    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 4 года назад +131

      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 4 года назад +3

      Me

    • @Dystopie173
      @Dystopie173 4 года назад +6

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

    • @hrhcrab
      @hrhcrab 4 года назад +13

      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 4 года назад +2

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

  • @DarthOmix
    @DarthOmix 4 года назад +16841

    "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 3 года назад +755

      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 3 года назад +744

      @@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 3 года назад +520

      @@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 3 года назад +191

      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 3 года назад +78

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

  • @loft1543
    @loft1543 4 года назад +14112

    My man be lookin like coraline's dad.

    • @ethanwinters1469
      @ethanwinters1469 4 года назад +698

      Ya winning dad?

    • @narriee8098
      @narriee8098 4 года назад +716

      Are ya coding Dad?

    • @SeymourDisapproves
      @SeymourDisapproves 4 года назад +179

      No bullying >:(
      /j

    • @varundeva1931
      @varundeva1931 4 года назад +134

      If you're watching this video you probably already look like coraline's dad :(

    • @sazsha
      @sazsha 4 года назад +7

      Prince of hell Elmo Floorgang gang

  • @HydratedBeans
    @HydratedBeans 4 года назад +8866

    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 4 года назад +56

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

    • @brtomassampaio
      @brtomassampaio 3 года назад +5

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

    • @HydratedBeans
      @HydratedBeans 3 года назад +40

      @@brtomassampaio yeah, but just the basics.

    • @eschcal1619
      @eschcal1619 3 года назад +10

      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.

    • @patheticapathetic5826
      @patheticapathetic5826 3 года назад +24

      @Saitama Baldy was that supposed to be an insult to the OP because he dissed yandev with logic and facts, or are you just mad because you can't understand code? /nm

  • @saniancreations
    @saniancreations 4 года назад +10404

    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 4 года назад +649

      LMAO is that fr?!!?

    • @imbadatusernames3304
      @imbadatusernames3304 4 года назад +928

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

    • @420eater
      @420eater 4 года назад +88

      LMFAO

    • @keychain3554
      @keychain3554 4 года назад +207

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

    • @ThatDude-qw1sg
      @ThatDude-qw1sg 4 года назад +83

      He gonna cook this dudes code

  • @siangchengpang772
    @siangchengpang772 4 года назад +2313

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

    • @ErrorNameNotFound123
      @ErrorNameNotFound123 4 года назад +6

      I feel the same dogsong

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

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

    • @SuperColdLemonade
      @SuperColdLemonade 4 года назад +61

      @@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 4 года назад +7

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

    • @PorthoGamesBR
      @PorthoGamesBR 4 года назад +13

      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

  • @DartzSoryu
    @DartzSoryu 4 года назад +6687

    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 4 года назад +41

      same bro

    • @manuelsoares4343
      @manuelsoares4343 4 года назад +30

      @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 4 года назад +26

      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 4 года назад

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

    • @deliciousnoodles5505
      @deliciousnoodles5505 3 года назад +7

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

  • @skedlkej
    @skedlkej 4 года назад +697

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

  • @ethanyeung6216
    @ethanyeung6216 4 года назад +2408

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

    • @aquarius5264
      @aquarius5264 4 года назад +50

      i've seen other creators use their own music because of demonetization

    • @mightypurplelicious3209
      @mightypurplelicious3209 4 года назад +5

      Oh dang

    • @HollowVize
      @HollowVize 4 года назад +86

      wait WHAT? He made all the music in the video himself? Wow...

  • @skywolfie8573
    @skywolfie8573 4 года назад +5817

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

  • @amenokagaseo
    @amenokagaseo 4 года назад +1825

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

    • @maxinealexander9709
      @maxinealexander9709 4 года назад +10

      pfffff, yeahhhhh

    • @jacobbau8328
      @jacobbau8328 4 года назад +3

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

    • @DFE-wu9lq
      @DFE-wu9lq 4 года назад +9

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

    • @whiteclaws6882
      @whiteclaws6882 4 года назад +20

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

    • @nagitokomaeda3237
      @nagitokomaeda3237 4 года назад

      this.

  • @soranuareane
    @soranuareane Год назад +2151

    "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 Год назад +62

      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 Год назад +36

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

    • @originalcomment4818
      @originalcomment4818 Год назад +22

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

    • @thewhitefalcon8539
      @thewhitefalcon8539 11 месяцев назад +19

      "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 11 месяцев назад +8

      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

  • @Wiizl
    @Wiizl 4 года назад +7227

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

    • @nitesy381
      @nitesy381 4 года назад +309

      Yay someone mentions how compilers can fix everything

    • @Drizzle52693
      @Drizzle52693 4 года назад +127

      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 4 года назад +446

      @@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 4 года назад +191

      @@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 4 года назад +93

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

  • @personettelabs
    @personettelabs 4 года назад +1993

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

    • @thorham1346
      @thorham1346 3 года назад +19

      A total waste of time.

    • @prithyachan333
      @prithyachan333 3 года назад +1

      @@thorham1346 Why do you think so?

    • @thorham1346
      @thorham1346 3 года назад +129

      @@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 3 года назад +174

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

    • @demonking86420
      @demonking86420 3 года назад +39

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

  • @Rycluse
    @Rycluse 4 года назад +4216

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

    • @MelonDev04
      @MelonDev04 4 года назад +45

      Rycluse Yes it does exist

    • @nonamezgamez4041
      @nonamezgamez4041 4 года назад +12

      Boi i think it is what you say it is.

    • @ootdega
      @ootdega 4 года назад +122

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

    • @HydratedBeans
      @HydratedBeans 4 года назад +222

      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 4 года назад +16

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

  • @rorysparshott4223
    @rorysparshott4223 Год назад +328

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

  • @Tacticalgamer2011
    @Tacticalgamer2011 4 года назад +468

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

    • @mr_madds
      @mr_madds 4 года назад +3

      lol

    • @tinhead_junk
      @tinhead_junk 4 года назад +32

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

    • @doopy
      @doopy 4 года назад +12

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

    • @manman-fq4zw
      @manman-fq4zw 4 года назад +2

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

    • @AstralSpectre
      @AstralSpectre 4 года назад +8

      As a unity Noob, I have commited arson

  • @roserocksrapidly
    @roserocksrapidly 4 года назад +465

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

    • @Crazylom
      @Crazylom 4 года назад +6

      That is what i call true intertainment

    • @jayive34
      @jayive34 4 года назад +7

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

    • @8015908
      @8015908 4 года назад +4

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

    • @monicaraybrandt
      @monicaraybrandt 4 года назад +1

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

  •  4 года назад +2547

    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 4 года назад +170

      ​@@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 4 года назад +8

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

    • @skeleyold5991
      @skeleyold5991 4 года назад +76

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

    • @harrylane4
      @harrylane4 4 года назад +76

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

    • @bonelesscommunism4031
      @bonelesscommunism4031 4 года назад +35

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

  • @-ja
    @-ja 4 года назад +1942

    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 3 года назад +50

      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.

  • @RUdigitized
    @RUdigitized 4 года назад +3084

    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 4 года назад +166

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

    • @Pred.
      @Pred. 4 года назад +340

      Also the fact he's a massive pedophile and creep

    • @PebelWasTaken
      @PebelWasTaken 4 года назад +29

      @@Pred. he's a pedo?

    • @maybe_just_emrys
      @maybe_just_emrys 4 года назад +250

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

    • @swindlesmccoop
      @swindlesmccoop 4 года назад +111

      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?

  • @TinBryn
    @TinBryn 3 года назад +939

    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 2 года назад +87

      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 2 года назад +10

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

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

      you made me laugh a lot, thank you.

    • @skvader4187
      @skvader4187 Год назад +45

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

    • @toxicitzi357
      @toxicitzi357 Год назад +11

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

  • @esentries
    @esentries Год назад +463

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

  • @LordBumwaggle
    @LordBumwaggle 4 года назад +1247

    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 4 года назад +79

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

  • @cryptidcoven7143
    @cryptidcoven7143 4 года назад +674

    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 4 года назад +52

      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 4 года назад +18

      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 4 года назад +28

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

    • @solidshark91493
      @solidshark91493 4 года назад +3

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

    • @trashdoge1217
      @trashdoge1217 4 года назад +10

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

  • @Lilacuity
    @Lilacuity 4 года назад +216

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

  • @user-xsn5ozskwg
    @user-xsn5ozskwg 7 дней назад +4

    This video really is the best in-depth review of the game's code. It's funny seeing all of the people who hopped on the analysis trend and had bona fides of taking a single comp sci class or just playing a lot of video games, so it's nice that there's a video resource out there that actually looks at the game's issue and addresses why they are issues rather than laughing at the length of a function.

  • @snicklefritzal
    @snicklefritzal 4 года назад +441

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

    • @gileee
      @gileee 4 года назад +37

      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 4 года назад +10

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

    • @PeterG00000
      @PeterG00000 4 года назад +4

      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 4 года назад +5

      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 4 года назад +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

  • @PASTRAMIKick
    @PASTRAMIKick 4 года назад +410

    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 4 года назад +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 4 года назад +6

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

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

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

    • @DP-jt6xx
      @DP-jt6xx 4 года назад +26

      @@freelanceart1019 java and JavaScript are 2 different things

    • @MadsterV
      @MadsterV 4 года назад +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).

  • @secretcactus4717
    @secretcactus4717 4 года назад +1688

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

    • @rollthedyc3
      @rollthedyc3  4 года назад +129

      Much appreciated!

    • @G_Ryuji
      @G_Ryuji 4 года назад +36

      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 4 года назад +9

      @@G_Ryuji true

    • @firstname4337
      @firstname4337 4 года назад

      a shit video

    • @ryzhik9608
      @ryzhik9608 4 года назад +6

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

  • @Spellweaver5
    @Spellweaver5 2 года назад +32

    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.

  • @GibusWearingMann
    @GibusWearingMann 4 года назад +184

    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 4 года назад +13

      40:38 when the automation gets it right

    • @rosemary3029
      @rosemary3029 2 месяца назад +6

      Yum dairy

  • @abbeycase143
    @abbeycase143 4 года назад +311

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

    • @amandaschmitt5019
      @amandaschmitt5019 4 года назад +16

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

    • @Intikus
      @Intikus 4 года назад +4

      @@amandaschmitt5019 Prove it

  • @luxraider5384
    @luxraider5384 4 года назад +171

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

  • @Gr13fM4ch1n3
    @Gr13fM4ch1n3 Год назад +19

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

  • @filly291
    @filly291 4 года назад +306

    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.

  • @invix3447
    @invix3447 4 года назад +214

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

  • @viks2ndaccount478
    @viks2ndaccount478 4 года назад +284

    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.

    • @matejpesl1
      @matejpesl1 4 года назад +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 4 года назад +3

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

    • @matejpesl1
      @matejpesl1 4 года назад +6

      @@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 4 года назад +2

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

    • @matejpesl1
      @matejpesl1 4 года назад +1

      @@victornecromancer wtf are you talking about

  • @yusuf3728
    @yusuf3728 3 года назад +77

    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

  • @wisemage0
    @wisemage0 4 года назад +774

    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 4 года назад +29

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

    • @wisemage0
      @wisemage0 4 года назад +14

      @@BreakTheBeat852 Close enough. 😎

    • @thesammurairat700
      @thesammurairat700 4 года назад +1

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

    • @fungo6631
      @fungo6631 3 года назад +1

      Wasn't the source code leaked?

    • @thesammurairat700
      @thesammurairat700 3 года назад +7

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

  • @manuillo94
    @manuillo94 4 года назад +370

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

    • @freelanceart1019
      @freelanceart1019 4 года назад +31

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

    • @madaraainna
      @madaraainna 3 года назад +3

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

    • @phitc4242
      @phitc4242 3 года назад +28

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

    • @ramster4459
      @ramster4459 3 года назад +49

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

    • @phitc4242
      @phitc4242 3 года назад +16

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

  • @idk-kun2488
    @idk-kun2488 4 года назад +12

    as a software engineer student i found this video to be a freaking breath of fresh air. my god, YES, finally someone took some actual effort and looked into real architectural issues without constantly joking about if-else.
    even though the concept of a technical debt was one of the first thing to be even taught about at my university, i found this video to be really useful. yandev story is just a huge "how not to" in every possible direction.
    hope this video will bring a lot of people to your channel, you're amazing!

  • @loop_zoop
    @loop_zoop 4 года назад +55

    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.

  • @Smugg
    @Smugg 4 года назад +883

    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 4 года назад +36

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

    • @ryzhik9608
      @ryzhik9608 4 года назад +4

      @@Benjy52 wrong.

    • @Smugg
      @Smugg 4 года назад +33

      @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 Год назад

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

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

      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.

  • @barmetler
    @barmetler 4 года назад +270

    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 4 года назад +23

      "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 4 года назад +61

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

    • @Obyvvatel
      @Obyvvatel 4 года назад +14

      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 4 года назад +28

      @@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 4 года назад +7

      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.

  • @AlbaniM
    @AlbaniM 4 года назад +149

    One of the few people that actually knows how to explain programming fundamentals in a concise and comprehensive way.
    I think if you ever decide to make turorial-like videos on Unity or coding in general they'll be a success.

  • @PhoenixLive_YT
    @PhoenixLive_YT 3 года назад +581

    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 3 года назад +139

      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 3 года назад +6

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

    • @ammyvl1
      @ammyvl1 3 года назад +11

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

    • @strych9ines
      @strych9ines 3 года назад +1

      Yandere dev isn’t gonna fuck you dude

    • @demonking86420
      @demonking86420 3 года назад +15

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

  • @sartouhou8349
    @sartouhou8349 4 года назад +391

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

    • @sartouhou8349
      @sartouhou8349 4 года назад +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 4 года назад +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 3 года назад +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 3 года назад +5

      @@RitsuAbyssgard you are the reason people hate weeaboos

  • @tistitistiyeaya199
    @tistitistiyeaya199 4 года назад +635

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

    • @caidenbond1988
      @caidenbond1988 4 года назад +51

      Coding level forever: 0

    • @jmanpolo5611
      @jmanpolo5611 4 года назад +108

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

    • @pitiponk1
      @pitiponk1 4 года назад +52

      @@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 4 года назад +31

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

    • @Lazar-w9u
      @Lazar-w9u 3 года назад +24

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

  • @UngodlyDev
    @UngodlyDev 4 года назад +675

    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  4 года назад +180

      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 4 года назад +62

      @@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 4 года назад +31

      @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 4 года назад +1

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

    • @kloa4219
      @kloa4219 4 года назад +3

      @@perisleaf I'm impressed

  • @Thornskade
    @Thornskade 3 года назад +115

    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.

  • @samyen3210
    @samyen3210 4 года назад +156

    Me before watching this video: maybe one day I can learn to code and make a game
    Me after watching this video: that’s going to be a lot harder than I thought

    • @chronenojysk5107
      @chronenojysk5107 4 года назад +20

      Watching someone doing code is already overwhelming.

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

      Isn't has to be, you can start without much of these things and learn them along the way, much of the stuff in this video stops being overwhelming once you understand a few key concepts and have some experience coding things

  • @ShadeStarMC
    @ShadeStarMC 4 года назад +352

    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 4 года назад +29

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

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

      @@jammiejammed ayyy you get it :)

    • @wisemage0
      @wisemage0 4 года назад +9

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

  • @Alesan99
    @Alesan99 4 года назад +781

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

    • @einarengvoll
      @einarengvoll 4 года назад +3

      Are those bad?

    • @LowestofheDead
      @LowestofheDead 4 года назад +50

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

    • @Alesan99
      @Alesan99 4 года назад +120

      @@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 4 года назад +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 4 года назад +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.

  • @jupiterjaeden9163
    @jupiterjaeden9163 4 года назад +70

    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.

  • @MadhatClemens
    @MadhatClemens 4 года назад +89

    Let me preface this by saying I have absolutely zero love for Yanderedev. I don't mean that in a bullying way, and I'm sorry if it is interpreted as such. I also have zero knowledge of coding. I may not be able to fully grasp the level of detail that you go into with your analysis, but I think you've done an amazing job, and I think it's great that you are demystifying these myths that are likely made by people that have become sick and tired of Yanderedev, or people with their own beliefs and opinions on coding habits. This does not absolve him of (nor validate) everything, but it is wholly unfair to condemn him on points that are based on misinformation or untruth. Excellent job.

    • @nerfedmann
      @nerfedmann 4 года назад +3

      But 6 years of eating free money from patreon, yeah. He should be in peison right now

  • @KnucklesNCS
    @KnucklesNCS 4 года назад +570

    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 4 года назад +94

      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 4 года назад +30

      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 4 года назад +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 4 года назад +21

      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 4 года назад +49

      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.

  • @axcel8896
    @axcel8896 4 года назад +826

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

    • @Cc99X_YT
      @Cc99X_YT 4 года назад +23

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

    • @axcel8896
      @axcel8896 4 года назад +21

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

    • @okie9025
      @okie9025 4 года назад +9

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

    • @Epsellis
      @Epsellis 4 года назад +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?!?

    • @Cc99X_YT
      @Cc99X_YT 4 года назад

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

  • @laurencisewski7859
    @laurencisewski7859 3 года назад +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 :-)

  • @WishMakers
    @WishMakers 4 года назад +88

    Ok so I know this is essentially your first upload but...please make more of this for other things. Honestly, I find it hard to believe you don't have a second channel where you've done other shit because this video is *really* good and very well edited. I'd love to see more source code analysis, if the time to make this one didn't break you entirely.

  • @Bradafer
    @Bradafer 4 года назад +85

    As a gamedev it really bothered me watching RUclipsrs that don't know much about dev critiquing "if else vs switch" and saying that was the reason the game was slow and "this is programming 101 stuff blah blah"
    This video is really really well done. Great work!!!

    • @gunswinger3110
      @gunswinger3110 4 года назад +10

      I'm just glad the big, highly edited videos focus more on yandev's behavior as well as the actual game design. Game's still problems, just that the coding isn't the real smoking gun.

    • @harrylane4
      @harrylane4 4 года назад +1

      @@gunswinger3110 you're right. It's the stolen assets and endorsement of pedophilia that are the problem with the game.

    • @ITR
      @ITR 4 года назад

      I was bothered more by the "this." complaining when most of the early complaints about that was purely due to the decompiler adding them.

  • @mmoIRL
    @mmoIRL 4 года назад +33

    Dude please start a "Programming tips you might have missed" series! I 've learned so much from this video.

  • @GippyHappy
    @GippyHappy 3 месяца назад +12

    I was surprised he responded to your email but then I remembered that's what he does all day instead of coding

  • @aj7842
    @aj7842 4 года назад +1436

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

  • @aaandag9688
    @aaandag9688 4 года назад +96

    thanks for clearing up things, i've had a hard time transitioning from python to c# and it just seems like everyone when talking about yanderedev's code says "switch good elseif bad", and me not knowing much, just took the statement and started passing it around. this really sheds to light the actual workings of the code, and the actual flaws that need fixes

  • @Violent_Wolfen
    @Violent_Wolfen 4 года назад +817

    So apparently the dude linked this video so I watched it out of curiosity. Now, I know jackshit about coding, but one thing I've learned is that a lot of people that bitched about the code didn't fully know what they were talking about and just spewed out what other people said regardless if it was true or not.
    I actually learned something this morning and I thank you for that.

    • @zamidare9038
      @zamidare9038 4 года назад +16

      Well in my opinion seeing lots of if statements in an update function in a single unity script file is hard to read and it really can't be skipped if it is a bunch of if statements (unlike with if else statement that will skip the rest once a condition is true in the code block). The aim is to have a simple flow and structure by taking advantage of using object oriented concepts so that others can read it, easily know what things does which. In Jason Weimann's youtube video, I learned of a story he encountered where a game feature is (probably) 10k lines of code made by one guy for inventory system but their team took months to study it of what's causing the problem and it is just so brittle (one small thing changed can make it go fail) so it is simpler to just start from the ground up and divide things to conquer them. (The vid is titled "Why I switched from Unreal to Unity & wont go back"). I'm still new to unity even though I know other simple programming but learning is fun.

    • @FF18Cloud
      @FF18Cloud 4 года назад +23

      @@zamidare9038 like, the code definitely isn't easily human maintainable
      That's definitely a problem
      Stuff like that leads to human error and well, bugs.
      But like, if you try to compare it on runtimes, yeh, an if statement is like, O(1) runtime, this isn't a loop where, you can get something like o(n)
      1 means straight through (means pretty fast)
      o(n) means runs n number if times
      I mean, every character is running this giant script, sure, but I think as this guy put it, unity has a pretty good game loop to run all this stuff on the update part of the loop
      Man, like, all these things yandere dev has issues with, architecture wise, these were all things I didn't learn in college, more so got my head bashed in by my project lead when I started my first job, lol.
      Like, I don't ever really have any motivation to play yandere simulator or lovesick, but ¯\_(ツ)_/¯ honestly it just sounds like the guy got into this without ever working with anyone on coding a game.
      Architecture stuff is something that would be worked out from a team environment when people start complaining that they can't work with all this stuff too coupled together to add new features
      I mean, at this point, he probably doesn't want to work on the game anymore considering all the stuff, I don't really care, just, :/ eyeah ¯\_(ツ)_/¯

    • @franst3909
      @franst3909 4 года назад +13

      @@zamidare9038 Same I'm relatively new to coding on Unity. I created a base project to test my code before doing my actual project. It was fun going back and reworking things to look as nice and neat as possible, the objective was to make it as easy as possible to add new content. Now I barely have to code anything when adding on to my game.
      Yeah, a lot of problems Yanderedev has can be assumed to be caused by bad organization, it works and frame rates will be good. However, it takes really long to add new content. Which can be a reason why his major updates are so slow. A RUclipsr by the name of k gon looked through the assets in yanderesimulator, many unused models and the names were confusing, hard to match texture to model.
      I believe if Yanderedev restarts the project from scratch in the long run his progress might actually be faster, (I don't think he will). Organization is also potentially why Lovesick may progress quicker than Yansim/ how it took them so fast.
      Neat code may not improve gameplay but it goes a long way in helping yourself and adding new content.

    • @zamidare9038
      @zamidare9038 4 года назад

      @@FF18Cloud Reading the code of others and being able to know how hard it is to work in a team can only be encountered first hand in a group work (which is the case for me) where we have this guy in a java project in college who don't know what to do (but he can do things, just don't know what or how to contribute) so I just told him to do small things we can do easily and faster but he is a little bit of a bottleneck. While another guy is like brainstorming with me what we can do, add and how we divide the work then combine it later. Even though we're 3 only 2 can do nicely. Maybe if I placed the first guy into debugging instead that might helped more than giving him work to do in smaller easy things. The unfortunate thing is group work in code is probably only common to software engineering students in our university back then. But really in my opinion we've reached an initial point where we prefer faster coding than shorter code blocks for a faster prototype where execution speed wasn't placed into consideration yet which is fine.

    • @zamidare9038
      @zamidare9038 4 года назад

      @@franst3909 Well if you can barely have to code when adding to your game then that's nice. If it's me I can definitely see myself able to write a single main script that's a long lines of code in unity while the other supporting scripts are short utilities or managers but what I'm envious about from others is their natural capability to divide the working functions into different scripts or modules that will receive / process parameters passed and each will do one clear thing. That's why it's a bit hard since I'm mostly comfortable with C (and the old days of assembly, basic stamp, arduino, visual basic) where multitasking isn't really a main thing while C++ and java dives you into this flexibility of classes which means reusing code and then in C# they're in the form of scripts representing modules. As for your point of restarting the project from scratch in my opinion it is easy to think and reasonably so that that will help in the long run but there are things to consider. We won't know for sure if rewriting the original is faster unless it is tried and compared. Working from a clean state with the aim of converting original code will still need time and effort. Though I know what you mean. The thing that's going to become faster is the addition of new elements.

  • @GoldphishAnimation
    @GoldphishAnimation Год назад +53

    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

  • @SergeantMolt
    @SergeantMolt 4 года назад +197

    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 4 года назад +49

      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 4 года назад +69

      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 4 года назад +68

      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 4 года назад +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 4 года назад +3

      @@MariaLuiza-tp2dc Absolutely true

  • @laresident5179
    @laresident5179 4 года назад +885

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

    • @ecyor0
      @ecyor0 4 года назад +98

      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 4 года назад +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 4 года назад +24

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

    • @jp0678
      @jp0678 4 года назад +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 4 года назад +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.

  • @Lunar-YT
    @Lunar-YT 4 года назад +326

    What a lovely video! Instead of the other videos that say that "IF STATEMENTS ARE BAD" but then give no fixes, you actually went in-depth and shown multiple fixes and improvements to the project. Plus, when I heard "The compiler is smarter than you", I mentally kicked myself for not thinking of that. Compilers are designed to be much faster and are more effective at optimizing "human-readable" code vs obfuscated code.

  • @BunnLilah
    @BunnLilah 3 года назад +33

    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.

  • @T33K3SS3LCH3N
    @T33K3SS3LCH3N 4 года назад +74

    14:15 YES THANK YOU. All that talk about if-else annoyed me so damn much. Of course I didn't expect the other reviewers to go through this insane work you put into reconstructing the whole project, but it was really disheartening to see how much time they focussed onto such a minor formal issue. Sure many of those if-elses (or worse, pure if-concatenations even though the conditions are mutually exclusive) were in bad style, but it should be obvious to anyone with a little experience with optimisation that this is a drop in the bucket compared to the overall structural issues. Much of that branching nightmare could be replaced with polymorphism or state machines, much like the activity classes you propose.

  • @amosp9411
    @amosp9411 4 года назад +237

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

    • @ona512
      @ona512 4 года назад +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 3 года назад

      I've never coded anything in my life.

    • @instantchaos2385
      @instantchaos2385 3 года назад

      @@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 3 года назад

      @@cakeisyummy5755 happy for you

    • @ona512
      @ona512 3 года назад +1

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

  • @imerence6290
    @imerence6290 4 года назад +675

    As someone said:
    Look at
    this.dude

  • @thaumaticpig
    @thaumaticpig Год назад +185

    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.

  • @amshegarh
    @amshegarh 4 года назад +61

    Finally a competent code review

  • @BriarYoung
    @BriarYoung 4 года назад +27

    Uh.. dude, I’m surprised you don’t have more subscribers than you do. You have an unbiased outlook and your experience shines through. Hope to see your channel grow.
    Edit: typo

  • @TheNewton
    @TheNewton 4 года назад +59

    2:35 "I also ran hitman 2 a game who problems are similar to yandere simulator"
    That one phrase compared to the youtube commenters reveals alot about software development culture.

  • @pablorepetto2759
    @pablorepetto2759 4 года назад +14

    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.

  • @geoneo4453
    @geoneo4453 4 года назад +14

    this was the nicest, most constructive, well manered and objective criticism and analyzis he got, i hope he will improve the code now based on this, great work

    • @serily4524
      @serily4524 23 дня назад +1

      he wont, hes a trash coder, not everyone deserves constructive criticism, some deserve destructive and its good

  • @strangeWaters
    @strangeWaters 4 года назад +22

    man, well-edited software dev content on RUclips that isn't a video of a talk from 2012? amazing

  • @WimsicleStranger
    @WimsicleStranger 4 года назад +240

    He didn't make any of the assets so I wouldn't ever count on him optimizing anything, nearly everything is just taken from some asset store.

    • @iandrsaurri625
      @iandrsaurri625 4 года назад +20

      He already has made several videos discussing this. He used most of those as placeholder models.
      He has already changed almost all assets with original ones from volunteers. In fact, the most infamous model for Ayana is currently being replaced with an original model.
      In fact the uploader says he is working closely with YanDev rn to optimize. This has promise

    • @banjo491
      @banjo491 4 года назад +34

      Ian Drsaurri who is gonna play this since a better game will came out than yan sim

    • @MariaLuiza-tp2dc
      @MariaLuiza-tp2dc 4 года назад +95

      @@iandrsaurri625 He refused the help of a indie game company because he didn't want to remade the code from zero, I don't think we should enable his behaviour at this point... He had every opportunity to hire professionals to help him and he just refused.

    • @darraghd9904
      @darraghd9904 4 года назад +68

      @@iandrsaurri625 it's been placeholders for 6 years. A bit long don't ya think?

    • @tripleoof8159
      @tripleoof8159 4 года назад +25

      Ian Drsaurri Wasn’t that video quite old, kinda late. Plus, if you are referring to the video where he showed a picture of Ayano’s new model, that was STOLEN. He refused to credit the artist sometime ago, so she pulled out of volunteering. Yet, he used her model/mock-up in his video.

  • @SmileytheSmile
    @SmileytheSmile 2 года назад +11

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

  • @mbcx3621
    @mbcx3621 4 года назад +16

    Man, thanks for this video!. Thanks to you, not only I see Video Game Development different now, but Programming as
    a whole!. This video is really one of those gems that you find once in your live. Again, thanks for this amazing video!.

  • @trippy9865
    @trippy9865 4 года назад +70

    This video was incredible. I was kinda getting sick of the videos that just were repeating old tired criticisms or not even making any critique at all and witch-hunting instead. There are a lot of people at this point who are just jumping on the Yandere Dev bandwagon for views.
    Your video by contrast was informative and had a good message: *technical debt kills projects!!!* I really do hope to see more programming videos from you in the future.

  • @fanime1
    @fanime1 4 года назад +245

    Wow! A completely unbiased look at the code! Not gonna lie, I've been watching videos about Yandere Sim, both positive and negative, for years. I find it very intriguing. And to be honest, I don't always agree with some of the negative videos. Unpopular opinion, I know. It's just that some just don't seem to know what they're talking about. But you clearly do. I'm an animation student though I've taken multiple game development courses. As such, while I don't know any coding language, I do understand a surprising amount of what you're saying. So it's just really refreshing to finally see the opinion of someone who actually codes as opposed to some people who don't really know anything about game development or even watch anime.

    • @nonamezgamez4041
      @nonamezgamez4041 4 года назад

      66th like, you know what to do

    • @slevinchannel7589
      @slevinchannel7589 4 года назад +4

      Y-Devs Ego reminds me a lot
      of Butch Hartman. They
      have a lot in common, especially
      when it comes to taking criticism.
      Butch has literally said "no one has the right
      to criticize me if they are not better at his
      one profession I'm good at. You cant point out
      anything to me, if you're not a better Artist than me,
      who's an Artist.".
      But Y-Devs Relationship with his fans
      reminds me a lot
      OF NINTENDO!!
      Nintendo and Gamefreak are so incredibly, impressively
      distant to their fanbase nowadays, it's outstanding.
      The Pokemon Franchise is basically burning
      and no one has told this to Nintendo
      and Gamefreak yet, apparently.
      They live in blissfull ignorance,
      the most literal i've ever seen...
      I doubt they even know any of the Top 50 Biggest
      Poke-RUclipsr - and that's a different question than if they have
      not accidently hurt these Poke-RUclipsrs already,
      without even knowing them...
      The state of Pokemon right now is impressive,
      and impressive is Yandere Simulator also.

    • @YouW00t
      @YouW00t 4 года назад +6

      For what I could tell, his problems come from having the ego the size of an air balloon with the resilience of a soap bubble. Because of that, he's trapped on a horrific cycle of hate and memes that's driving everybody involved into hilarious tragedy.
      He can't can the project because he needs the money and he has recieved a lot of it, and everything he does is panned beyond actual helpful advise, which makes him even more unlikely to listen to people that he was before.
      He's also done some stupid moves but honestly existing involves being stupid yourself, but that's life for you. And no, he won't listen about any of those either, probably.

  • @YTPrule
    @YTPrule 3 года назад +54

    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.

  • @lunarjellie
    @lunarjellie 4 года назад +37

    everyone: *ew yandere sims code is so bad*
    me: _doesnt understand it_
    also me: _uh huh, yep, wow so bad_

  • @Tomentos
    @Tomentos 4 года назад +27

    Finally someone that went through everything manually instead of taking rumours as facts.
    Also, good job on debunking claims that were true technically, but didn't change anything in the grand scheme of things.

  • @emilie5501
    @emilie5501 4 года назад +11

    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!

  • @dinnersandvich9329
    @dinnersandvich9329 2 месяца назад +20

    This video unironicly made me start a degree in Computer Science, half way done and just finished a large exam and passed showcasing understanding of C and a large range of data structures and algorithms :D

    • @Austrveg
      @Austrveg Месяц назад

      have fun being passed up on in favor for outsourced devs making 12 cents a day!
      ps they smell of curry

    • @Livvylol42
      @Livvylol42 Месяц назад +1

      Wow great job!!

  • @daniellin1726
    @daniellin1726 4 года назад +17

    As a student, this review is very useful as a warning and a list of thing I should check out. Thank you very much.

  • @ronelm2000
    @ronelm2000 4 года назад +19

    I like this. It's very comprehensive with actual evidence. I also do agree with everything on this video. Yes, else-if vs switch is a red herring, but the real problem is the technical debt.

  • @KristoKorps
    @KristoKorps 4 года назад +15

    YO, I've been waiting for someone to do this! Like, as a graduating compsci student, i always thought it would be interesting to look at what we can learn, as to what would happen if you don't apply best practices.

    • @craftworded
      @craftworded 4 года назад +1

      Arent you the guy that got banned from discord or smth?

    • @craftworded
      @craftworded 4 года назад +1

      No wait its just your pfp

  • @TheBoxyBear
    @TheBoxyBear 3 года назад +50

    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 Год назад +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 Год назад +23

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