YandereDevs' Code

Austin Miller
Austin Miller

This is video of yanderedev coding his game

youtube.com/watch?time_continue=998&v=CX_xUN89qeA

the 20 if else statements are fucking real

All urls found in this thread:

youtube.com/watch?time_continue=998&v=CX_xUN89qeA
youtu.be/6tfwdnY5cDg?t=6m30s

Ian Wilson
Ian Wilson

buump

Ryder Gutierrez
Ryder Gutierrez

how hard is it to make a unity game

Parker Lewis
Parker Lewis

You could probably spit some garbage out and post it on steam within the afternoon.

Landon Lewis
Landon Lewis

Why do video game devs use Windows?

Thomas Hughes
Thomas Hughes

because literally every video game runs on windows

Isaiah Brown
Isaiah Brown

We normally run it on our main computers to play video games. I only run linux on computers too weak to play video games

Hunter Russell
Hunter Russell

20 if else statements
Well, he's using string keys, so that can't be optimized to a switch--the compilation result would just be 20 if else statements.

Being real here though, I might use up to three if else statements just to test that the hair loads properly, then I would scrap it and replace the whole thing with a map so that I don't have to write the same code 20 times over.

Elijah Johnson
Elijah Johnson

which one of yous is the italyfag

Robert Peterson
Robert Peterson

the 20 if else statements are fucking real
What's wrong with "if"? He's checking words in a string.

Zachary Lee
Zachary Lee

what's wrong with 20 if statements?
you'll figure out what's wrong with that by the time you finish CS101

Jacob Lopez
Jacob Lopez

The if else statements being repeated isn't the most shocking stuff here, 'cause in machine language it'll give the same thing.
However, 20 string comparisons for something that could have been done with flags, holyshit that's retarded.

Liam Cox
Liam Cox

I've heard stories about how shitty his code is, but this is... just what the fuck man? He doesn't seem to know what a switch statement is, or even what a loop is for that matter, and the majority of those if-else conditions can be handled with a texture dictionary that uses constant integers as keys:

const PONYTAIL = 0;

Hairstyles = {
PONYTAIL: '/path/to/ponytail/textures/or/whatever'
}

player.hairstyle = Hairstyles[PONYTAIL];

Lincoln Reed
Lincoln Reed

the const strings in the code can be converted by the compiler into hashes, so comparison is a one-step operation, unless he does some string formatting bullshit.

The reason that he uses string keys for everything is probably related to how Unity uses string keys for everything.

Jackson Hill
Jackson Hill

What are enums

Evan Howard
Evan Howard

family, the word you are looking for is "enum" and "associative array"... or map.

Dominic Fisher
Dominic Fisher

Looking over this code a second time, the key-value pair is actually backwards but you get my point.

Ryder Baker
Ryder Baker

Will never happen, I'm self taught and in different non computer field of education.

William Scott
William Scott

He's using JavaScript, so I don't think enums are a tool at his disposal, and I believe all JS objects are associative arrays. A hash map would be ideal but that's more of a C#/C++ thing.

Jason Cox
Jason Cox

I don't get why people even consider strings for anything but actual text for UI, error messages, or file paths.

Isaiah Adams
Isaiah Adams

I see that now. I thought Unity was purely C#.

Why the hell is there JavaScript in Unity anyway?

Christopher Hill
Christopher Hill

JS in Unity is deprecated

Hunter Cruz
Hunter Cruz

I don't know, he talked about porting the code to C# like a year ago because it's supposed to be 4 times faster than JS or something like that, but quickly dropped the idea when he realized it meant more work.

Ryan Thompson
Ryan Thompson

He ported it to C#

Isaiah Harris
Isaiah Harris

Really fucking easy.

Juan Gonzalez
Juan Gonzalez

Still slower than flag comparisons, and still look retarded.

Dylan Mitchell
Dylan Mitchell

unity engine is good trust us guys

Robert Lewis
Robert Lewis

youtu.be/6tfwdnY5cDg?t=6m30s
Looks more like shit implementation.
VRchat and The Forest both runs Unity and there aren't any apparent delays in both games.

Disable AdBlock to view this page

Disable AdBlock to view this page

Confirm your age

This website may contain content of an adult nature. If you are under the age of 18, if such content offends you or if it is illegal to view such content in your community, please EXIT.

Enter Exit

About Privacy

We use cookies to personalize content and ads, to provide social media features and to analyze our traffic. We also share information about your use of our site with our advertising and analytics partners.

Accept Exit