Yandere Simulator Complete Source Code Analysis - Code Review

  Рет қаралды 1,683,383

dyc3

dyc3

Күн бұрын

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

Пікірлер: 4 300
@rollthedyc3
@rollthedyc3 3 жыл бұрын
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: kzbin.infoUgwqYKf598HtLsnKV314AaABCQ 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 3 жыл бұрын
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 3 жыл бұрын
you are a god.
@gamingbud926
@gamingbud926 3 жыл бұрын
Didn't even notice :)
@CirkusBolgen
@CirkusBolgen 3 жыл бұрын
Put the mic on your chin. Leads to constant distance from your mouth. Leads to constant volume. If popping too much: Plosive filter. Can be DIY-ed. Also: Don't swallow the ends of your sentences. And put more effort into annunciation - Structure of video: Put more time into it - Transitions: Use consistent ones, with backgrounds that are less distracting - Text: You put up much more of it than is needed, leading viewers to have to pause often, and search for the difference. Simplify. - Thank you for making this video
@sashaenglebert5932
@sashaenglebert5932 3 жыл бұрын
@MJ you mean the 31 year old coder who linked this video on his wordpress and thanked this dude's help?
@billvolk4236
@billvolk4236 3 жыл бұрын
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 жыл бұрын
where/when does a toothbrush even appear in the game ????
@TeknoJackal
@TeknoJackal 3 жыл бұрын
@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 жыл бұрын
@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 жыл бұрын
@@kittycat344 protags bedroom I believe.
@fluffybun713
@fluffybun713 3 жыл бұрын
@@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 3 жыл бұрын
Me who doesn't know anything about coding: "Yeah, you're perfectly right."
@ona512
@ona512 3 жыл бұрын
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 жыл бұрын
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 жыл бұрын
print (“Yandere Sim will never be finished.”) else end end end)
@jake_dev1046
@jake_dev1046 3 жыл бұрын
@envy lua language has end
@jake_dev1046
@jake_dev1046 3 жыл бұрын
@envy i mostly code in lua
@MoeMoeStudio
@MoeMoeStudio 3 жыл бұрын
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
@compositeembryo7186
@compositeembryo7186 2 жыл бұрын
If that were the case they'd never finish
@tommymack2589
@tommymack2589 2 жыл бұрын
@@compositeembryo7186 LOL
@vaporean_boylove.0w083
@vaporean_boylove.0w083 2 жыл бұрын
That be the ultimate punishment of homework
@direhunter7045
@direhunter7045 2 жыл бұрын
*circles the entire test paper*
@seantaggart7382
@seantaggart7382 Жыл бұрын
Student: Yeah Its...EVERYTHING
@RandomPianoMan
@RandomPianoMan 3 жыл бұрын
"Inconsistent use of tabs and spaces" "F-ing pick one" I felt that
@TimeTravelingFetus
@TimeTravelingFetus 2 жыл бұрын
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 Жыл бұрын
what the fuck is wrong with him?
@rayhimmel7167
@rayhimmel7167 Жыл бұрын
@@TimeTravelingFetus maybe he was copying the code from stack overflow but, you know, from the questions
@mariocamspam72
@mariocamspam72 10 ай бұрын
​@@rayhimmel7167Mainstream C# IDEs run silent formatting passes when pasting code, so it's even more perplexing how he managed that.
@Mabra51
@Mabra51 7 ай бұрын
fucking*
@loft1543
@loft1543 3 жыл бұрын
My man be lookin like coraline's dad.
@ethanwinters1469
@ethanwinters1469 3 жыл бұрын
Ya winning dad?
@narriee8098
@narriee8098 3 жыл бұрын
Are ya coding Dad?
@SeymourDisapproves
@SeymourDisapproves 3 жыл бұрын
No bullying >:( /j
@varundeva1931
@varundeva1931 3 жыл бұрын
If you're watching this video you probably already look like coraline's dad :(
@sazsha
@sazsha 3 жыл бұрын
Prince of hell Elmo Floorgang gang
@DarthOmix
@DarthOmix 3 жыл бұрын
"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 жыл бұрын
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 жыл бұрын
@@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 жыл бұрын
@@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 2 жыл бұрын
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 2 жыл бұрын
@@vraolet also he didnt like the other dev/s "changing his code"
@HydratedBeans
@HydratedBeans 3 жыл бұрын
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 3 жыл бұрын
@Saitama Baldy thankfully no. Never really had acne except for at age 13.
@brtomassampaio
@brtomassampaio 3 жыл бұрын
@@HydratedBeans soooooo, do you know animes and the concept of Yandere?
@HydratedBeans
@HydratedBeans 3 жыл бұрын
@@brtomassampaio yeah, but just the basics.
@eschcal1619
@eschcal1619 3 жыл бұрын
I only use tools like UAE/UABE/DnSPY to create my own mods or have some fun editing values and seeing what the games do, but I never really got into the actual dev tools to create, just to edit. Even I was able to understand a large portion of this fellas breakdown, which I consider amazing, and I even learned a thing or two.
@sandraswan9008
@sandraswan9008 3 жыл бұрын
@Saitama Baldy uhhhhh
@soranuareane
@soranuareane 11 ай бұрын
"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 5 ай бұрын
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 5 ай бұрын
"Trust the compiler" is to software what "never trust the autorouter" is to hardware
@originalcomment4818
@originalcomment4818 5 ай бұрын
Make it understandable, but also make it efficient. At some point, a compiler can't turn shitty code into good code.
@thewhitefalcon8539
@thewhitefalcon8539 4 ай бұрын
"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 4 ай бұрын
Sometimes I can write code in assembly that executes faster than the equivalent optimized c code. But I don’t do it often because it takes too long. Also I can almost always massage the underlying c or c++ to help the compiler make it more than fast enough
@skywolfie8573
@skywolfie8573 3 жыл бұрын
'sort of implied that he didn't want me to do it' 'so I did it anyway' You mad lad
@Chaser-nt2te
@Chaser-nt2te 3 жыл бұрын
Yanderedev will remember that.
@nihilblue9669
@nihilblue9669 3 жыл бұрын
Yanderedev is no longer available as a companion
@alinagolovach7125
@alinagolovach7125 3 жыл бұрын
R/madlads
@simplyplague5465
@simplyplague5465 3 жыл бұрын
[Everyone liked that]
@nonymouswisp8176
@nonymouswisp8176 3 жыл бұрын
@@alinagolovach7125 r/Boom boom
@saniancreations
@saniancreations 3 жыл бұрын
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 3 жыл бұрын
LMAO is that fr?!!?
@imbadatusernames3304
@imbadatusernames3304 3 жыл бұрын
@@etam8099 ig he was trying to predict how slow it would be, thats funny
@420eater
@420eater 3 жыл бұрын
LMFAO
@keychain3554
@keychain3554 3 жыл бұрын
Ok let’s get to the bottom of this I’m going to run msi afterburner
@ThatDude-qw1sg
@ThatDude-qw1sg 3 жыл бұрын
He gonna cook this dudes code
@skedlkej
@skedlkej 3 жыл бұрын
“don’t decompile my code” “Ok, I’ll do it while you don’t watch
@-ja
@-ja 3 жыл бұрын
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 2 жыл бұрын
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.
@valumtimes
@valumtimes 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
Me
@Dystopie173
@Dystopie173 3 жыл бұрын
@@computer_toucher l actually had the exact same thought after this video.
@hrhcrab
@hrhcrab 3 жыл бұрын
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 3 жыл бұрын
He's like a polished male version of Caroline Konstnar with a skill.
@amenokagaseo
@amenokagaseo 3 жыл бұрын
"a dark magic ritual known only to the compiler gods" so like building any cmake project
@maxinealexander9709
@maxinealexander9709 3 жыл бұрын
pfffff, yeahhhhh
@jacobbau8328
@jacobbau8328 3 жыл бұрын
Soo... like blast beating in drumming? Cause that’s essentially a ritual in itself.
@DFE-wu9lq
@DFE-wu9lq 3 жыл бұрын
Till this day. I am not sure how did I manage to build llvm from source.
@whiteclaws6882
@whiteclaws6882 3 жыл бұрын
nah bro, that's easy, you call 'cmake .' and cry if it fails before finishing.
@nagitokomaeda3237
@nagitokomaeda3237 3 жыл бұрын
this.
@esentries
@esentries 11 ай бұрын
"The compiler is smarter than you." Completely valid statement.
@TinBryn
@TinBryn 2 жыл бұрын
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 жыл бұрын
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 Жыл бұрын
@@kylek.3689 if else is great if you need to compare stuffs too
@yourbiggestfan395
@yourbiggestfan395 10 ай бұрын
you made me laugh a lot, thank you.
@skvader4187
@skvader4187 10 ай бұрын
Most people saying that else If statements are bad, are people who are not game devs or programmers.
@toxicitzi357
@toxicitzi357 9 ай бұрын
​@@skvader4187they probably are, but they're also so pretentious that I want to believe they only exist in hobbyist places and outside of workplaces in general..
@ethanyeung6216
@ethanyeung6216 3 жыл бұрын
yo your music slaps, didn't realize you made all of it yourself
@aquarius5264
@aquarius5264 3 жыл бұрын
i've seen other creators use their own music because of demonetization
@mightypurplelicious3209
@mightypurplelicious3209 3 жыл бұрын
Oh dang
@HollowVize
@HollowVize 3 жыл бұрын
wait WHAT? He made all the music in the video himself? Wow...
@DartzSoryu
@DartzSoryu 3 жыл бұрын
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 3 жыл бұрын
same bro
@manuelsoares4343
@manuelsoares4343 3 жыл бұрын
@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 3 жыл бұрын
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 3 жыл бұрын
Same, but it turns out dyc3 works for yandev so its ok
@deliciousnoodles5505
@deliciousnoodles5505 3 жыл бұрын
Yup, also don't listen to the other KZbinrs who claimed framerates are affected by too many if else statements
@rorysparshott4223
@rorysparshott4223 6 ай бұрын
This guy turned up, made a single million view video, then left. Absolute fucking hero.
@luxraider5384
@luxraider5384 3 жыл бұрын
This video really sounds like "common mistakes in game developpement" and for me as a beginner programmer it was really instructive
@Wiizl
@Wiizl 3 жыл бұрын
Finally a real analysis of the whole thing! Not just "IF-ELSE bad, SWITCH good!!!"
@nitesy381
@nitesy381 3 жыл бұрын
Yay someone mentions how compilers can fix everything
@Drizzle52693
@Drizzle52693 3 жыл бұрын
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 3 жыл бұрын
@@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 3 жыл бұрын
@@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 3 жыл бұрын
@@neociber24 even if it were 1 ms, 1 ms every frame is huge.
@Rycluse
@Rycluse 3 жыл бұрын
Is this... good faith criticism? Coming from knowledge and experience instead of guesswork? That exists?
@MelonDev04
@MelonDev04 3 жыл бұрын
Rycluse Yes it does exist
@nonamezgamez4041
@nonamezgamez4041 3 жыл бұрын
Boi i think it is what you say it is.
@ootdega
@ootdega 3 жыл бұрын
That's what happens when you're an actual professional, not a manchild joining in a circlejerk.
@HydratedBeans
@HydratedBeans 3 жыл бұрын
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 3 жыл бұрын
I mean he does work for YanDev so why would he shame him over Miss Information?
@PhoenixLive_YT
@PhoenixLive_YT 2 жыл бұрын
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 2 жыл бұрын
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 2 жыл бұрын
Imaging caring about someone you have never met and never will.
@ammyvl1
@ammyvl1 2 жыл бұрын
to be fair, they didn't really have access to the profiler
@strych9ines
@strych9ines 2 жыл бұрын
Yandere dev isn’t gonna fuck you dude
@demonking86420
@demonking86420 2 жыл бұрын
@@lartts7483 yeah the whole segment this dude did on the "elseif criticism" is cringe
@dmj271095
@dmj271095 7 ай бұрын
Are we allowed to bully now?
@holyboiamethin2790
@holyboiamethin2790 7 ай бұрын
That's what I wanted to comment 😂. Glad we have the same thoughts
@_WalterWhite
@_WalterWhite 7 ай бұрын
yes i give you permission 😄😄🙌🙌
@BarioIDL
@BarioIDL 7 ай бұрын
yes
@MYLAR.
@MYLAR. 6 ай бұрын
oh we’ve always been allowed to bully the Moment he put panty shot currency in the game
@Kreze202
@Kreze202 3 ай бұрын
What happened? I'm not exactly up to date with YanDev lore
3 жыл бұрын
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 3 жыл бұрын
​@@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 3 жыл бұрын
@@weakspirit_ yha most if the drama around him is also bs
@skeleyold5991
@skeleyold5991 3 жыл бұрын
I mean it doesn't change the fact that the game runs like trash
@harrylane4
@harrylane4 3 жыл бұрын
@@a.n.l.aantineoliberalismas4504 no. No it's not. Dudes a dick.
@bonelesscommunism4031
@bonelesscommunism4031 3 жыл бұрын
DawnPraiser optimizing code doesn’t really help when it’s structure is god awful so awful no one can read it besides Yandere dev
@LordBumwaggle
@LordBumwaggle 3 жыл бұрын
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 3 жыл бұрын
Dude same. like, we finally get an UNBIASED look into whats really happening. Thank god i stumbled in this.
@Thornskade
@Thornskade 3 жыл бұрын
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.
@yusuf3728
@yusuf3728 2 жыл бұрын
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
@siangchengpang772
@siangchengpang772 3 жыл бұрын
Just gonna say, as a coder myself this is probably one of the best video about programming I've seen on KZbin, it's mind bogging that you don't have more content
@ErrorNameNotFound123
@ErrorNameNotFound123 3 жыл бұрын
I feel the same dogsong
@firstname4337
@firstname4337 3 жыл бұрын
considering the way he looks I'm surprised he has any viewers at all
@SuperColdLemonade
@SuperColdLemonade 3 жыл бұрын
@@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 3 жыл бұрын
I'd take quality over quantity everytime. 😊 Keep up the informative work!
@PorthoGamesBR
@PorthoGamesBR 3 жыл бұрын
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
@personettelabs
@personettelabs 3 жыл бұрын
"Painstakingly converted every if statement I could to a switch statement". You absolute mad lad.
@thorham1346
@thorham1346 2 жыл бұрын
A total waste of time.
@prithyachan333
@prithyachan333 2 жыл бұрын
@@thorham1346 Why do you think so?
@thorham1346
@thorham1346 2 жыл бұрын
@@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 2 жыл бұрын
@@thorham1346 I see. But they did that only to clear up some misconceptions. So I think they did a pretty good job.
@demonking86420
@demonking86420 2 жыл бұрын
@@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
@YTPrule
@YTPrule 2 жыл бұрын
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.
@thaumaticpig
@thaumaticpig Жыл бұрын
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.
@RUdigitized
@RUdigitized 3 жыл бұрын
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 3 жыл бұрын
This ^^^^ THIS ^^^^^^^^
@Pred.
@Pred. 3 жыл бұрын
Also the fact he's a massive pedophile and creep
@PebelWasTaken
@PebelWasTaken 3 жыл бұрын
@@Pred. he's a pedo?
@alf_url
@alf_url 3 жыл бұрын
His backstories for the characters are quite, let's say, disturbing.
@swindlesmccoop
@swindlesmccoop 3 жыл бұрын
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?
@snicklefritzal
@snicklefritzal 3 жыл бұрын
Every programmer should have "the compiler is smarter than you" as their desktop background :p
@gileee
@gileee 3 жыл бұрын
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 3 жыл бұрын
Fuck it. Ryzen 4K logo to remind Intel fanboys that i spend less money for equal, sometimes more performance lol
@PeterG00000
@PeterG00000 3 жыл бұрын
It seems as though this game creator is just dragging ass until his devoted fans crowdsource the game into completion for him. Maybe the guy knows more now, but he doesn't seem to have known enough at the game's inception. However, the controversy is more interesting than the game itself, so maybe I shouldn't complain.
@JosephAgrane
@JosephAgrane 3 жыл бұрын
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 3 жыл бұрын
@@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
@loop_zoop
@loop_zoop 3 жыл бұрын
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.
@jupiterjaeden9163
@jupiterjaeden9163 3 жыл бұрын
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.
@Tacticalgamer2011
@Tacticalgamer2011 3 жыл бұрын
As a Unity noob, this was more helpful as a tutorial than many actual tutorials out there
@saulgoodman5662
@saulgoodman5662 3 жыл бұрын
lol
@tinhead_junk
@tinhead_junk 3 жыл бұрын
As a Unity noob, I have no clue what is even happening.
@doopy
@doopy 3 жыл бұрын
@SpyInTheBasement as a unity noob, what's unity?
@manman-fq4zw
@manman-fq4zw 3 жыл бұрын
as a Unity noob, I killed my entire family and am on the run
@AstralSpectre
@AstralSpectre 3 жыл бұрын
As a unity Noob, I have commited arson
@kanamea5786
@kanamea5786 3 жыл бұрын
THANK YOU! This is by far the most informed analysis for yandere simulator's code I've seen. I was getting tired of people barking at the wrong tree (like if-else vs switch) and ignoring the glaringly obvious architectural issues. I never looked at the full source code myself, but the snippets I've seen people criticized seemed like it's something that can just be written better elsewhere to make it more generalized/abstract because of constant reinvention of wheel and copy paste. You're the only person I've seen tackle this code from this perspective and it's really refreshing. I also appreciate the rundown on things like asset optimization because I'm not familiar with this department. It makes sense that the underlying performance issues lies heavily on those part rather than his badly written scripts. I've always felt like his scripts are more maintenance/development issue rather than performance issue, massively slowing down the development progress.
@ErgonomicChair
@ErgonomicChair 3 жыл бұрын
Well, he's not really correct, though. There are a lot of actual trash practices in his code that is slowing it down, and I am developing a game that has more content and more systems running at once than Yandere Simulator. Price for freedom Avarice. I know for a fact that his programming is shit, and the game chugs for a reason. Measuring via ReLive and Fraps, no, actually, the FPS does make dips down to 17 on my system despite having an RX 580 and Ryzen 2600x. Let's not ignore that within a month another project just popped up that runs better and smoother, and is more complex. WNM was also one of these, Lovesick, etc. Yandere Simulator chugs. It chugs. HARD. Constantly. Despite being so simple it is embarassing. It only simplifies if-else statements if it is SIMPLE by the way. I don't know how dyc3 got that his huge fucking complex if else chains will simplfiy in their current state. THey won't. It won't go into a switch if there is no switch in IL either.
@kanamea5786
@kanamea5786 3 жыл бұрын
@@ErgonomicChair I never said his coding isn't bad, I just don't believe that it's the bottleneck or the major cause for performance issue, more of a readability/maintainability issue. I never really looked at the full source code, can you give some examples of bad coding practices that impacts the performance in a meaningful way? I can see them do stuff like calling some drawing or state calculation logic more than necessary outside of scripts, but honestly I don't think this guy's 20 layers of if statement really impact the performance all that much despite being a terrible code.
@scottmichaud
@scottmichaud 3 жыл бұрын
@@ErgonomicChair An RX 580 with a Ryzen 2600x should get ~80-120 FPS with shadows disabled (we know about the issue with shadows) and when the students aren't all in the camera's view frustum (because the game uses the single-threaded Legacy Animation System instead of the multi-threaded Mecanim). We know about a few bottlenecks, but, apart from shadows and lower detail 3D for integrated GPUs, it's in the realm of okay... and the bottlenecks that do exist *are not the code*. There are now two people who have profiled it, dyce and myself, who says it's not the code. Listen to us. And I mean it should make sense. If you see a massive performance increase by going to Unity 2019.3, which did not change the scripts, then it should tell you that the code was not the bottleneck. In fact, the game got way over a 2x speed-up between January 2019 and July 2020 for gaming machines without the code changing. Over half of all computation time disappeared, but YandereDev's code didn't change. That's definitive proof that people who blamed the code back in January 2019 were completely wrong.
@MattRogan28
@MattRogan28 3 жыл бұрын
My PC ran Yandere simulator with max setting with shadows on and get 55-64 FPS and ever beyond that The only issue I have is that has long load time but beside my PC ran the game fine Edit:correction when I have shadows on is drop A bit but stay over 30 FPS
@maddie-xk2uv
@maddie-xk2uv 3 жыл бұрын
P-peko?!
@Jaminux
@Jaminux 3 жыл бұрын
i honestly adore when youtubers have nice, calming videos like these, but then they slip in subtle things like 38:38. has a nice flavor to it
@laurencisewski7859
@laurencisewski7859 3 жыл бұрын
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 :-)
@roserocksrapidly
@roserocksrapidly 3 жыл бұрын
95% of this went directly over my head, but I was still strangely entertained for an hour lol
@Crazylom
@Crazylom 3 жыл бұрын
That is what i call true intertainment
@jayive34
@jayive34 3 жыл бұрын
Same. If I understood that shit. I wouldn't be a mall cop.
@8015908
@8015908 3 жыл бұрын
I'm a programmer, and am still entertained. This guy has a good presentation.
@monicaraybrandt
@monicaraybrandt 3 жыл бұрын
i'm just here like "i made a website in notepad once"
@cryptidcoven7143
@cryptidcoven7143 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
@@bonelesscommunism4031 The majority of the models still are from the unity store.
@solidshark91493
@solidshark91493 3 жыл бұрын
@Yeah Itsme There are hundreds on the subject. Just search Model retopology.
@trashdoge1217
@trashdoge1217 3 жыл бұрын
@@bonelesscommunism4031 No most of them especially surroundings are just unity store bought assets.
@doublea47
@doublea47 3 жыл бұрын
everyone: "yandere simulator is so bad that they still use if else" me who always use if else statement: "is my code that bad?"
@backslash_phi
@backslash_phi 3 жыл бұрын
Find the Linux kernel source mirror on github. Search "else if".
@CCSleep_
@CCSleep_ 3 жыл бұрын
@@philipschulze8213 there's like 17407 of them
@chronenojysk5107
@chronenojysk5107 3 жыл бұрын
Else if is the “Comic Sans” of coding it seems.
@UnknownAlienSpecie
@UnknownAlienSpecie 3 жыл бұрын
@@chronenojysk5107 nah it aint
@FlowPlex
@FlowPlex 3 жыл бұрын
@@chronenojysk5107 It isn't. It's just that YandereDev uses an incredibly ridiculous amount of else if's in his code, so everyone clowns on him for that.
@SmileytheSmile
@SmileytheSmile Жыл бұрын
For some reason I keep coming back to this video once in a while. Wish you did more code reviews like this one, dude.
@GibusWearingMann
@GibusWearingMann 3 жыл бұрын
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 3 жыл бұрын
40:38 when the automation gets it right
@ButtslammerBob
@ButtslammerBob 3 жыл бұрын
"these save files are super big" *cries in modded skyrim save files that always inevitably break*
@MelonDev04
@MelonDev04 3 жыл бұрын
The Save file is bigger than the Maus
@InterestEPC
@InterestEPC 3 жыл бұрын
Rimworld save file sizes would like a word too.
@happydemon3038
@happydemon3038 3 жыл бұрын
I dunno, that save file size seems rather small for modern systems. Even if the game only took 1 GB of space, to double it's space with save files, you'd have to make at least 1 024 saves. Compare that to world files in Minecraft, which can become truly massive.
@ButtslammerBob
@ButtslammerBob 3 жыл бұрын
@@InterestEPC And CK2, and some Total War, and Warband, but these don't habitually break because they've gotten too big
@thesammurairat700
@thesammurairat700 3 жыл бұрын
Why tf would yu b using mods if the save breaks with them
@Gr13fM4ch1n3
@Gr13fM4ch1n3 9 ай бұрын
I have no clue what you said, but I listened to every second of it.
@Spellweaver5
@Spellweaver5 2 жыл бұрын
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.
@abbeycase143
@abbeycase143 3 жыл бұрын
His voice is a mix of ASMR and the nerd in class who only speaks when he's spitting facts
@amandaschmitt5019
@amandaschmitt5019 3 жыл бұрын
As someone who takes classes with him, you're entirely correct
@Intikus
@Intikus 3 жыл бұрын
@@amandaschmitt5019 Prove it
@Lilacuity
@Lilacuity 3 жыл бұрын
Pointing out flaws in his game rendering times and then helping him opitimize them?? You're a true hero
@JourneysADRIFT
@JourneysADRIFT 3 жыл бұрын
Been working with unity for a few years now on content experienced by tens of thousands of people and this one video is by far the most information packed single video regarding Unity optimization I've ever seen over the years. I wish I had this video when I started my Unity journey. A+ man.
@edvardpotapenko
@edvardpotapenko 3 жыл бұрын
Great video. It's really cool that you've invested so much time not to only explain all of this, but help to fix it.
@aj7842
@aj7842 3 жыл бұрын
me watching as if i know about anything he’s talking about: 👁👄👁
@appleglassjuice11
@appleglassjuice11 3 жыл бұрын
Mood
@DanielFoxy1999
@DanielFoxy1999 3 жыл бұрын
mood
@chrysanthebokvist7959
@chrysanthebokvist7959 3 жыл бұрын
Mood
@kittskeeps
@kittskeeps 3 жыл бұрын
Mood
@griffin4556
@griffin4556 3 жыл бұрын
Mood
@mrldbsz
@mrldbsz 3 жыл бұрын
As a software engineer, I must congratulate you on your amazing work on this video, I stumbled across it by accident and it just felt extremely good to see someone, who actually understands how coding works, talk about all the yandere dev bad code drama. Oh and I loved when you said: "The compiler is smarter than you", that is not only true but it is something more people should now about, as it appears that a lot of people forget that to run modern programming languages there are extremely robust compilers, with years of development behind them and that these compilers are engineered and designed not only to be smarter than average level programmers but to also be fool proof(well we know nothing can be 100% fool proof)
@superscatboy
@superscatboy 3 жыл бұрын
Yeah, it can't be overstated how smart compilers these days really are. To a certain extent they even have literal theorem provers in them. The best advice these days is to write your code in a way that's easy to understand and easy to modify, and let the compiler worry about the rest.
@doliague2590
@doliague2590 3 жыл бұрын
Karen Pfp uwu
@frank-michaeljaeschke4798
@frank-michaeljaeschke4798 3 жыл бұрын
Citing Martin Fowler: Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
@47Mortuus
@47Mortuus 3 жыл бұрын
Decades* of development And additionally, the actual development that's being done on them is work being done by mathematicians AND computer scientists (being a mathematician does not necessarily help you understand computer performance) I attempted to write "clever" SIMD code for some commonly used (by me) but unusual/arbitrary modulo operations. None of them were even 75% as fast as simply typing "x % y" and letting the compiler do all the work for me... The compiler is actually, IMO, the real reason behind so many experienced programmers feeling like impostors:D
@DFPercush
@DFPercush 3 жыл бұрын
@47Mortus the channel javidx9 recently did a video about simd code and crunching the mandelbrot set, he looks through a few examples of where the compiler can optimize it for you and where it can't. Pretty enlightening. It basically comes down to whether there are any conditions inside your loop.
@ArcRayven
@ArcRayven 2 жыл бұрын
Great job going over this. It was nice to hear your thought on the problems, identify what they had, why they might have done it that way and review potential solutions or theoretical ways. I had fun listening to this
@alzanari1274
@alzanari1274 3 жыл бұрын
one hell of a video to watch !! great work and please make more, i don't mind a long wait for videos of this quality!!
@tistitistiyeaya199
@tistitistiyeaya199 3 жыл бұрын
Coding level at the start of the video: 0 Coding level at the end of the video: 0
@caidenbond1988
@caidenbond1988 3 жыл бұрын
Coding level forever: 0
@jmanpolo5611
@jmanpolo5611 3 жыл бұрын
@@caidenbond1988 Congrats you guys set variables! CodingLevelAtStart = 0 , CodingLevelForever = 0, CodingLevelAtEnd = 0 !!! Budding programmers already! You should now be at CodingLevel = 1!
@pitiponk1
@pitiponk1 3 жыл бұрын
@@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 3 жыл бұрын
if (codingLevel == 1) { console.log("Looks like you've still got a ways to go."); }
@user-sb8cs3le2j
@user-sb8cs3le2j 3 жыл бұрын
@@TheDwarvenDefender nah do it in python codingLevel = 1 if codingLevel == 1: print("ya did it!")
@axcel8896
@axcel8896 3 жыл бұрын
Me as a non coder: Haha lines go 🅱︎🆁︎🆁︎🆁︎🆁︎🆁︎🆁︎
@Cc99XYT
@Cc99XYT 3 жыл бұрын
Me, a normie: Haha FBI go 🅱︎🆁︎🆁︎🆁︎🆁︎🆁︎🆁︎
@axcel8896
@axcel8896 3 жыл бұрын
@@Cc99XYT My man you gotta unsub to yandev bro it's not worth it to follow him anymore
@okie9025
@okie9025 3 жыл бұрын
Me, a coder: Oh, that's strange! What you'll find here is££&(-) -) /'/%%%%%@%@%###]]©¥
@Epsellis
@Epsellis 3 жыл бұрын
Me as a game artist trying to understand this smart people wizardry "Oh yeah polygons i get polygons, haha funny fence amirite? haha, yeah, wait... floating poi- what? nopenopenopenope" I'M NOT STUPID! I CAN COLOR INSIDE THE CIRCLES OKAY?!?
@Cc99XYT
@Cc99XYT 3 жыл бұрын
@@axcel8896 I sub, only to watch him fall.
@ShreddedNerd
@ShreddedNerd Жыл бұрын
Enjoyed this video. It was better than most I've seen on this subject. Your knowledge was really apparent.
@GoldphishAnimation
@GoldphishAnimation 11 ай бұрын
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
@secretcactus4717
@secretcactus4717 3 жыл бұрын
Excellent video. A solid in-depth look to this game.
@rollthedyc3
@rollthedyc3 3 жыл бұрын
Much appreciated!
@G_Ryuji
@G_Ryuji 3 жыл бұрын
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 3 жыл бұрын
@@G_Ryuji true
@firstname4337
@firstname4337 3 жыл бұрын
a shit video
@ryzhik9608
@ryzhik9608 3 жыл бұрын
@@G_Ryuji No you are talking about Lovesick now. We are talking about yansim, kiddo
@wisemage0
@wisemage0 3 жыл бұрын
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 3 жыл бұрын
It's not really reverse engineering, it's just decompiled code
@wisemage0
@wisemage0 3 жыл бұрын
@@BreakTheBeat852 Close enough. 😎
@thesammurairat700
@thesammurairat700 3 жыл бұрын
Doesn’t really say something because the drama far from that
@fungo6631
@fungo6631 3 жыл бұрын
Wasn't the source code leaked?
@thesammurairat700
@thesammurairat700 3 жыл бұрын
@@fungo6631 Not really, its misinformed... The leaked code that is
@Xhez2slash
@Xhez2slash 3 жыл бұрын
This is a very informative video! Even though I didn't really understand most of the technical details, it was pretty dope to see everything at a high level. Thanks for the time you put into this video!!!
@TheAnonLee
@TheAnonLee 3 жыл бұрын
As someone learning to code this was a great resource to me. Glad to see someone actually probably taking it all apart and seeing what’s wrong rather than just pointing out if else statements.
@PASTRAMIKick
@PASTRAMIKick 3 жыл бұрын
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 3 жыл бұрын
@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 3 жыл бұрын
@@Yotanido I would even go so far as to say Java is the fastest non AOT language to exist in fact
@freelanceart1019
@freelanceart1019 3 жыл бұрын
@@Yotanido JavaScript is Amazing its a highly versatile language used in Buildbox 3 and Construct 3.
@DP-jt6xx
@DP-jt6xx 3 жыл бұрын
@@freelanceart1019 java and JavaScript are 2 different things
@MadsterV
@MadsterV 3 жыл бұрын
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).
@invix3447
@invix3447 3 жыл бұрын
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.”
@emilie5501
@emilie5501 3 жыл бұрын
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!
@BunnLilah
@BunnLilah 3 жыл бұрын
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.
@KnucklesNCS
@KnucklesNCS 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
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.
@UngodlyDev
@UngodlyDev 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
@@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 3 жыл бұрын
@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.
@cursling
@cursling 3 жыл бұрын
Is your native language English because the grammar is not the best (just asking)
@kloa4219
@kloa4219 3 жыл бұрын
@@cursling I'm impressed
@manthrax69
@manthrax69 3 жыл бұрын
This is a great investigation/roundup. Im not a "yandere" player, but I'm an old game dev (30 yrs) , and the information you're throwing out here is a great roadmap for avoiding some performance pitfalls in Unity.
@netscayped
@netscayped 2 жыл бұрын
please make more 🥺 this is so much more engaging than most of my programming classes were
@barmetler
@barmetler 3 жыл бұрын
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 3 жыл бұрын
"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 3 жыл бұрын
@@nates9778 it is a valid reason tho, it's important to keep your code clean if you want to update/modify it.
@Obyvvatel
@Obyvvatel 3 жыл бұрын
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 3 жыл бұрын
@@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 3 жыл бұрын
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.
@Alesan99
@Alesan99 3 жыл бұрын
Finally a video that doesn't blame the performance issues on if-else statements.
@einarengvoll
@einarengvoll 3 жыл бұрын
Are those bad?
@LowestofheDead
@LowestofheDead 3 жыл бұрын
@@einarengvoll Compilers usually optimize them, so the supposed 'disadvantages' aren't a big deal anyway
@Alesan99
@Alesan99 3 жыл бұрын
@@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 3 жыл бұрын
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 3 жыл бұрын
@@Alesan99 this, so much this! It annoys the hell out of me that people who aren't even programmers keep beating that dead horse.
@zokalyx
@zokalyx 3 жыл бұрын
Bro this is so high quality content. 10/10 would watch again somewhen in the future.
@AKA_Guest
@AKA_Guest 7 ай бұрын
This got recommended at the best time lmao
@manuillo94
@manuillo94 3 жыл бұрын
ur an unity wizard, my 7 years developing in the engine now feels like child's play
@freelanceart1019
@freelanceart1019 3 жыл бұрын
Unity is pretty hard for beginners considering so many option and version interations to choose from. Amazing but stability wise overwhelming.
@nursultannazarov8379
@nursultannazarov8379 3 жыл бұрын
@@freelanceart1019 what a weakling. Unity is peace of cake compared to Unreal Engine
@phitc4242
@phitc4242 3 жыл бұрын
@@nursultannazarov8379 ha! what engine? I only know C, you weakling
@ramster4459
@ramster4459 3 жыл бұрын
@@phitc4242 shame on you, i write everything from scratch in binary. Imagine using pre-cooked languages, pathetic
@phitc4242
@phitc4242 3 жыл бұрын
@@ramster4459 okay okay... my comeback: I designed my own cpu & cpu architecture MUWHAHA
@Smugg
@Smugg 3 жыл бұрын
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 3 жыл бұрын
He spends most of his time streaming video games on Twitch.
@ryzhik9608
@ryzhik9608 3 жыл бұрын
@@Benjy52 wrong.
@Smugg
@Smugg 3 жыл бұрын
@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 10 ай бұрын
It's a useful tool, but when used entirely by itself it's fucking nonsensical
@elobiretv
@elobiretv 5 ай бұрын
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.
@RyanCGames
@RyanCGames 3 жыл бұрын
For a small channel, this was a great, well put together video! I enjoyed it even though I never really got deep into programming (just basic Java and some MATLAB).
@pablorepetto2759
@pablorepetto2759 3 жыл бұрын
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.
@ShadeStarMC
@ShadeStarMC 3 жыл бұрын
Finally a review that isn't just "he's allergic to arrays" and "too many if statements" nice and in depth, sexy video
@jammie6544
@jammie6544 3 жыл бұрын
i agree with all, but i agree with the sexy part the most
@ShadeStarMC
@ShadeStarMC 3 жыл бұрын
@@jammie6544 ayyy you get it :)
@wisemage0
@wisemage0 3 жыл бұрын
Funny thing is, the game is crammed full of automatically generated arrays because of all the Drag'n'Drop.
@Hot18Shot
@Hot18Shot 3 жыл бұрын
As someone who has never coded in his whole life, this whole video sounded alien to me but was quite interesting. I think I might have learned at least one small thing.
@DFPercush
@DFPercush 3 жыл бұрын
I don't know how many times I've found it useful to write a little 10 line program to do some stupid little thing I needed. It's a nice skill to have, even at a very basic level. Think about it. Python is a good starting language these days.
@halinaqi2194
@halinaqi2194 3 жыл бұрын
Yikes, just start with c ++. I am going to game Development and I hate python, so glad I never went back to it.
@DFPercush
@DFPercush 3 жыл бұрын
@@halinaqi2194 well, yes, python is not for games, but if you're a lay person who wants to dabble for simple scripting purposes, the learning curve is not as steep as C++. If you want to learn serious programming C++ is probably the best language because you can basically go from it to anything.
@jodazague8333
@jodazague8333 3 жыл бұрын
@@halinaqi2194 I wouldn't recommend c++ as your first programming language. Java or Python are better candidates
@GiovannT300
@GiovannT300 3 жыл бұрын
Marking this on favorites just for the code explaination, you're really good at this!!!!!!
@justinlua4848
@justinlua4848 3 жыл бұрын
Thank you for the else if vs case presentation. People (including myself when I was younger) get waaaaay too wrapped up in micro-optimizing things to save microseconds. There's nothing wrong with using the massive computing power we have to run high level "unoptimized" code if your program works well for what you're trying to do.
@filly291
@filly291 3 жыл бұрын
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.
@viks2ndaccount478
@viks2ndaccount478 3 жыл бұрын
about optimizing character models: the way you optimize them is by knowing how to prioritize polygons and use as few as possible without hurting the visuals, the character should be deisgned in a way where basic body parts that dont move (like forearms, thighs etc) have the least polygons while joints and features (elbows, knees, faces, maybe hair or some highlights on clothes) have more polygons to give more realistic animation for bends, twists and turns. They should also be constructed with a clear understanding of edge loops and how to effectively split features apart without "stitching" so it looks natural for arms to bend or strech or expressions to not interfere with other features or look half-baked. there are also several tricks that you can use to artificially make characters look better with textures, normal maps/height maps and shaders togheter with some other neat tricks, most of which can be seen in a+start's low poly series. of course im no proffesional or expert on this, i can be wrong about some things or using the wrong terminology, but its enough to get the point acorss. Making a model for a game is not as simple as making a model, slap some textures and a rig on and call it a day as long as it looks good enough.
@matejpesl6442
@matejpesl6442 3 жыл бұрын
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 3 жыл бұрын
@@matejpesl6442 don't give up pal, there's no need to do everything in your game, just call some friends or hire someone that nails it for you
@matejpesl6442
@matejpesl6442 3 жыл бұрын
@@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 3 жыл бұрын
@@matejpesl6442 in the end, when you delegate functions to other people, you can focus on what you're good at. Anyway, i understand you
@matejpesl6442
@matejpesl6442 3 жыл бұрын
@@victornecromancer wtf are you talking about
@Red_Phantom64
@Red_Phantom64 7 ай бұрын
Welp, now I'm getting recommendations of Yan Dev since his allegations came out, oof
@jasperzanjani
@jasperzanjani 3 жыл бұрын
you are a very smart guy. I know from trying to do these tech/tutorial-themed videos that it is a ton of work, but luckily you're building on a solid base of technical expertise. I look forward to seeing more from you
@Violent_Wolfen
@Violent_Wolfen 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
@@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 3 жыл бұрын
@@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 KZbinr 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 3 жыл бұрын
@@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 3 жыл бұрын
@@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.
@sartouhou8349
@sartouhou8349 3 жыл бұрын
FINALLY BRO someone who actually knows what they're talking about
@RitsuAbyssgard
@RitsuAbyssgard 3 жыл бұрын
Just because he looks like a nerdy loser doesn't mean he knows what he's talking about more than any other person with basic knowledge of coding.
@sartouhou8349
@sartouhou8349 3 жыл бұрын
@@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 3 жыл бұрын
@@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 жыл бұрын
@@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 жыл бұрын
@@RitsuAbyssgard you are the reason people hate weeaboos
@TheBoxyBear
@TheBoxyBear 3 жыл бұрын
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 10 ай бұрын
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 7 ай бұрын
​@@ahall9839Ahh, good old "condescending KZbin commenter making baseless assumptions for no reason".
@AlejandroCab98
@AlejandroCab98 3 жыл бұрын
Good shit brother, I used to study computer science in college and switched to law when I realized that I was unhappy staying up till 4am in the library every time I had to submit a project but I massively respect the craft and those willing to grind it out. I watched the entire video thinking you were some big time youtuber and after finding out the amount of attention you get I think you deserve more! Beautiful editing and concise explanations of a complex topic like this is rare in small channels, guess I found a gem lol
@SergeantMolt
@SergeantMolt 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
@@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 3 жыл бұрын
@@MariaLuiza-tp2dc Absolutely true
@imerence6290
@imerence6290 3 жыл бұрын
As someone said: Look at this.dude
@MetaPikachu
@MetaPikachu 3 жыл бұрын
lol
@CopernicusLee
@CopernicusLee 3 жыл бұрын
fuck you
@mparagames
@mparagames 3 жыл бұрын
this.dude lol
@NoTraceOfSense
@NoTraceOfSense 3 жыл бұрын
bruh.lookAt(this->dude);
@kreettahamalainen4454
@kreettahamalainen4454 3 жыл бұрын
Finally someone with in-depth knowledge covers this topic! Thank you!
@myx555
@myx555 2 ай бұрын
Loved the video! This feels more like a game optimisation lecture instead of that particular game's code review.
@laresident5179
@laresident5179 3 жыл бұрын
Finally somebody actually debunks to code and not says "iF elSe deCreaSe PeRFormance!!!" like every other person. Thank you for this video.
@ecyor0
@ecyor0 3 жыл бұрын
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 3 жыл бұрын
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 3 жыл бұрын
Who cares. Even if you know solutions to improve fps Yandev will not listen at all
@jp0678
@jp0678 3 жыл бұрын
​@@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 3 жыл бұрын
@@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.
@amosp9411
@amosp9411 3 жыл бұрын
"I'll leave that as an exercise to the viewer" My guy, I am nothing like you... :'(
@ona512
@ona512 3 жыл бұрын
@@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 2 жыл бұрын
I've never coded anything in my life.
@instantchaos2385
@instantchaos2385 2 жыл бұрын
@@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 2 жыл бұрын
@@cakeisyummy5755 happy for you
@ona512
@ona512 2 жыл бұрын
@@instantchaos2385 ur right, i know jack about unity.
@Soulinescent
@Soulinescent 3 жыл бұрын
Your video was really insightful. Thank you so much😊. I think I will come back again to understand more. The code definitions and more.
Protect The Yacht, Keep It!
15:08
MrBeast
Рет қаралды 4 МЛН
Why Are Open Source Alternatives So Bad?
13:06
Eric Murphy
Рет қаралды 256 М.
顔面水槽がブサイク過ぎるwwwww
00:58
はじめしゃちょー(hajime)
Рет қаралды 40 МЛН
маленький брат прыгает в бассейн
00:15
GL Show Russian
Рет қаралды 3,1 МЛН
Exploring the Game that Glorifies Stalking
25:03
Visual Venture
Рет қаралды 535 М.
The Minecraft Cookie Clicker Experience
19:13
Dragoon
Рет қаралды 95 М.
Fast Inverse Square Root - A Quake III Algorithm
20:08
Nemean
Рет қаралды 4,8 МЛН
When Optimisations Work, But for the Wrong Reasons
22:19
SimonDev
Рет қаралды 761 М.
Non-Euclidean Worlds Engine
5:15
CodeParade
Рет қаралды 11 МЛН
Why You Shouldn't Nest Your Code
8:30
CodeAesthetic
Рет қаралды 2,5 МЛН
When Your Game Is Bad But Your Optimisation Is Genius
8:52
Vercidium
Рет қаралды 1,3 МЛН
phone charge game #viral #tranding #new #reels
0:18
YODHA GAMING RAAS
Рет қаралды 11 МЛН
Эволюция телефонов!
0:30
ТРЕНДИ ШОРТС
Рет қаралды 5 МЛН
Теперь это его телефон
0:21
Хорошие Новости
Рет қаралды 545 М.
Клавиатура vs геймпад vs руль
0:47
Balance
Рет қаралды 908 М.