[Yandere Simulator] if else if else if else if else if else if else

46
Jump in the discussion.

No email address required.

dont forget about the 5k polygon toothbrush meant for hyperrealistic advertisements that was just casually in the protagonists's room

![](/images/16658021440385122.webp)

Jump in the discussion.

No email address required.

Wtf is this waifu simulator or a pixar film

Jump in the discussion.

No email address required.

yeah it was hilarious, random assets (which pretty much all were completely stolen btw) were gigantic and NOTHING was resized at all

Jump in the discussion.

No email address required.

And the game looks like shit

Jump in the discussion.

No email address required.

logic based on string equality

:#marseycringe2:

Jump in the discussion.

No email address required.

The whole program is a string, why is the parts in quotes so different?

Jump in the discussion.

No email address required.

And operator? Is that a band?

Jump in the discussion.

No email address required.

Average unity dev

Jump in the discussion.

No email address required.

nintendo HIRE THIS MAN

Jump in the discussion.

No email address required.

Hey this is progress. It used to just be ifs.

Jump in the discussion.

No email address required.

elif it werent that would be cool

Jump in the discussion.

No email address required.

Get this man a career in contracting or code boot camp instructor.

Jump in the discussion.

No email address required.

what is wrong with this

Jump in the discussion.

No email address required.

I won't bore you with the details. Imagine an r-slur using a gun as a fidget spinner. You start to ask lots of questions like, "Who let him have a gun?" "Maybe I should run away." Something is very wrong. There are so many red flags you realize he's not teachable, or even worth 10 seconds of your time. Also he claims to be Special Forces (i.e. a full time game developer).

Jump in the discussion.

No email address required.

I thought this was @bbbb at first lmao

Jump in the discussion.

No email address required.

Thanks for the laugh, now piss off.

Jump in the discussion.

No email address required.

Shoul I be offended haha

Jump in the discussion.

No email address required.

Are you fricking r-slurred? Obviously someone with your lack of intelligence would be too afraid to even approach me, let alone ask me any questions. And for your information, I am Special Forces. So you can go frick yourself, you little piece of shit.

Jump in the discussion.

No email address required.

I'd like to experience your special forces:marseyshy2::marseyblush:

Jump in the discussion.

No email address required.

Your special forces aren't anything to write home about.

Jump in the discussion.

No email address required.

Maybe you could teach me? I wouldn't mind a live demonstration. :marseycapyshy::horny:

Jump in the discussion.

No email address required.

What makes you think I'm interested in teaching you anything? You couldn't even handle a live demonstration.

Jump in the discussion.

No email address required.

The ifelif isn't the bad part. It's the fact his game logic is setup in a way where he needs to use so many ifelif. A ton of this can optimized or converted to enums/flags to simplify the logic(particularly note how the three components weapon, blood, insanity have a hierarchy). Furthermore the updateLabel function looks and probably is r-slurred.

If you truly need to use a chain of ifelifs, then it's not bad to use them. But the question is whether you truly need to use them in the first place.

Jump in the discussion.

No email address required.

note this code gets executed EVERY SINGLE frame

Jump in the discussion.

No email address required.

:#marseybegonethot:

Dios mio you're right

Jump in the discussion.

No email address required.

tbh i googled what enums were and i didnt really understand the benefit but you sound smart so i will believe you

Jump in the discussion.

No email address required.

Integer comparison is faster than string comparison.

Jump in the discussion.

No email address required.

oh ok that does make sense, thank you for your patience :marseyautism:

Jump in the discussion.

No email address required.

okay. So it's like you have a coin on you. you take the coin and flip it to make every single decision ever in your system. So you go, man is white or black, if he is black does man have big nose or small nose, if man has small nose does he have big eyes or small if, if he has small eyes, does he like music or does he not like music.

You program your entire game using this two options nested within each other logic.

As you can probably figure out for your entire game code to be nested ifs is downright r-slurred and we have like a dozen better ways to write down good code.

This is why the whole thing is downright r-slurred beyond comprehension. Most modern day code would be a sort of network where everything is not connect by a single if's cascade.

BTW I am not a coder I just studied the basics of coding in 11th and 12th grade.

Jump in the discussion.

No email address required.

literally everything

Jump in the discussion.

No email address required.

What would be the best way to fix this? I’m just starting to learn COOODING myself

Jump in the discussion.

No email address required.

The witnessed property being a string is jank as frick; should be separate props. Struct of bool flags, container of elements to iterate over, whatever.

Jump in the discussion.

No email address required.

and maybe execute stuff on a timer or something. the big problem with this was that all of this got executed on every single frame i'm pretty sure everywhere so even if you were like half a mile away it'd be checking for something that couldn't possibly be true

i don't know crap about game dev

Jump in the discussion.

No email address required.

Restart from scratch.

Jump in the discussion.

No email address required.

Entire architecture is completely fricked

Jump in the discussion.

No email address required.

He never uses the state machines in unity either.

There are so many cases where different conflicting states return a 1 so characters do 2 or 3 things at once, like be dead and alive at the same time.

Almost all of his problems could be solved by having 4 or 5 different student state machines with triggers and just letting Unity figure out what to do.

Also, he tried to make a sandbox game but every single player option is actually strictly defined through if/else. Imagine coding a separate if/else structure for every possible interaction in Morrowind.

OH Yeah there's no logging. No logs of any kind so he just runs the game and hopes it works

Jump in the discussion.

No email address required.

Don't nest if statements, use a guard.

if is_teacher is not True:
    something_else()

is_teacher can be True, False, or maybe even null. This way I guarantee the program moves on if the check fails. I don't need to go through all the possible omelet recipes if the customer didn't order eggs.

The next part is him checking scenarios. An enum + switch statement would work. Giant if else chains are acceptable when you use guards. Except he doesn't understand "and" operators which is reeeeeaally basic

Jump in the discussion.

No email address required.

Yandev is terrified of function calls, he doesn't ever use them

Jump in the discussion.

No email address required.

Jesus no wonder this game took so long to make, and runs like complete shit lol

Jump in the discussion.

No email address required.

Just fricking imagine having a typo in there

Jump in the discussion.

No email address required.

World's smartest coomer.

Jump in the discussion.

No email address required.

:#marseysaint:

Jump in the discussion.

No email address required.

Link copied to clipboard
Action successful!
Error, please refresh the page and try again.