ITT: Post games or devs with advanced spaguetti code

>ITT: Post games or devs with advanced spaguetti code

Attached: 1560349266408.png (637x782, 123K)

who are you quoting?

which game?

Attached: Alex_Mahan-YandereDev.jpg (190x265, 7K)

CS grad who hasn't coded anything since 2012 here, I agree this is an inefficient way of doing things BUT there is no reason to write code intelligently while computers are getting faster and faster every year. It's more inefficient to invest time to write smart code than just buying more speed.

Attached: curly vs waffle.jpg (439x594, 115K)

he still did more than you

Attached: 1555497582363.jpg (768x1024, 139K)

lol

curly>waffle

yes but also no

why even post this youtube comment tier bait, nobody will fall for it

>STOP TELLING ME TO IMPROVE I'M PERFECT
zoomer.

>buy more speed
typical programmer lol

some people want to be able to solve their problems without buying more ram or waiting ten years for better computers

people who write cancer code like that should have a special place in hell. always commment and call the stuff with descriptive names

Say what gen this was or fuck off.

>oh no encryption is going to make my Pokemon game that basically has the demands of a toaster from 1990 run ever so slightly slower

>there is no reason to write code intelligently while computers are getting faster and faster every year
what university did you attend so I can make sure to avoid it?

Thats is not an excuse for going full retard.

Attached: Screenshot_20190613-194601~01.png (1813x300, 142K)

Don't worry about it, I'm sure you'll avoid university altogether.

Does anyone understand that code? Wouldn't you need a definition of the functions to even understand what's happening? Can anyone help? I'm a retard.

Attached: 02a.gif (200x113, 2.18M)

Kill yourself

Attached: 1553867736419.png (1024x1024, 347K)

I know you're trolling, but I'm also pretty sure there are schools this bad out there for real

Attached: 1353717249996.gif (177x150, 1.74M)

Something that takes exponential time is still shitty no matter how fast your computer is.

Imagine being such an advanced level coder that basic fags who just took their first course on python call your work "spaghetti code" when the language itself holds back your true prowess.

From the name it looks like it's getting a pokemon's LBall (Large ball? Not a pokemonfag so someone correct me here)

You pass it a variable pointing to the pokemon you want, and it runs a function that decrypts the pokemon large (or whatever L stands for), extracts the value of a variable from the decrypted data to "ball", then re-encrypts the pokemon large, then returns the value it extracted to "ball"

Pokemon encrypts its data in memory so that the user can't use hacks to change it on the fly. The function OP posted is just one that returns the "ball" from an encrypted struct. Who knows what "Ball" actually does, but that's it.

OP is upset that they do this for every variable in the struct, but the real reason why they do this is because they don't want "ball" or w/e leaking into memory if possible. By exposing only "ball" which is an int it's likely in a register and is basically safe from outside modification.

>t.Microsoft CEO

Don't forget:

If it works it's fine, just get it done on time.

GF has doing advanced spaguetti code since the first gen. They could't even finish the 2gen alone.

Unironically this
Don't worry user, once (if) you stop being a worthless NEET you'll understand. The only thing that matters is time. You can spend a few hours intelligently designing your functions, or you can shit out some atrocious code that still manages to work in half an hour. Which do you think upper management on tight deadlines is going to ask for

Imagine thinking that encrypting and decrypting data is necessary for fucking pokemon. Literally who gives a shit if people save edit

Where the fuck is emunand
You promised

Downloadmoreram.com

Someone high up clearly thought it was necessary and the programmers who are forced to comply. That's how the real world works. It's not always fair and you don't get your way all the time.

this is how bethesda turned a perfectly fine gamebryo engine into a frankensteinian abomination in 10 years

faggots like you are the /g/ equivalent of tards on /3/ saying retopology is pointless because ZRemesher is half decent now

Attached: mfw.png (510x555, 421K)

And thus a clusterfuck of legacy code is created and an intern fresh out of school, like you, would be tasked with fixing. Asshat.

Wanna know how I know your whole 'CS grad' schtick is bullshit? No professor would pass someone with your mentality, which would show in any assignment you ever submitted.

I'm not blaming the code monkeys here, I'm blaming the retard who had them put in encryption in the first place

>just buy better hardware
you're literally part of the reason why the game industry is so shit, go die

Nintendo probably, since they charge for the bank shit and their game is built on collecting & trading.

Though wouldnt it be better to just keep track of the stat changes to a particular pokemon between each save and re-apply them to a copy of whatever is saved in memory whenever you need to write to it rather than constantly encrypt/decrypt? That way if theres a discrepancy between what is in memory and what is loaded you know something fucky is going on

The amount of spaghetti code this game
*had was simply astonishing, holy shit. You can see for yourself too on the PS4 version.
*the developers hired a 3rd party to fix their shit coding job

This wasn't Iwata's, was it?
>game runs like shit with all that inefficient code with frame drops everywhere when it looks worse than a game that actually manages to run better still
>UH JUST GET A BETTER COMPUTER BRO
Fuck off.

Since when did Pokemon go open source?

Attached: 1560193989309.jpg (1003x900, 84K)

Ah FUCK I forgot to add the image like a total faggot

Attached: nt.jpg (616x353, 93K)

Read nigga, read.

If you were smart then you wouldn't even have to shit out atrocious code in the first place.

Attached: Nyan.png (540x482, 190K)

You OK user?

Attached: image0-6.jpg (562x429, 27K)

>Wanna know how I know your whole 'CS grad' schtick is bullshit? No professor would pass someone with your mentality, which would show in any assignment you ever submitted.
wanna know how I know you haven't been to any college or university in your life?

You mean doing things the reasonable and sane way? No can do, it's a Nintendo product

Based retard

>when you use the photoshop smudge tool

2 brown hands, one covered in curry, the other in shit, typed this post

see

>he thinks American diploma mills have standards

Attached: 1350509872447.jpg (650x450, 60K)

so instead they just edit the box and get it anyways with no effort.

Anything by YandereDev

Sure. That might get by on a PC where you just have to get a faster CPU.
On a 3ds? A console?
Fuck no lmao. Pokemon S/M are some of the largest 3ds games as a result of bad coding. The same model copy pasted for every area they appear instead of just calling one model in different areas makes it bloated and huge. Thats not good. That is an issue passed along to the consumer.

If the encryption and decryption process can be reverse engineered, then what's the point of such obscuring?

american diplomas are just buy-ins these days, as evidenced by the trainwreck of controversy
it's most likely happening in other schools but they just haven't been caught

Ball is pretty obviously the type of pokeball the Pokemon was caught in, since he said that's a snippet from the construction of a Pokemon.

This one isn't so bad if you consider it's quicker to load everything from one directory per area rather than seeking out multiple models from multiple directories. There's more than enough rom space for shit like this now.

As for the decrypting/encrypting per individual stat check, that's way more fucking retarded as it's bottlenecking the cpu in the process, causing visible lag in the 3ds games.

The average player isn't going to take the time to do it. That's the entire point. It's to make the user put more effort into doing their bad deeds. It's the entire idea behind DRM even. It's not a permanent solution, it's a temporary deterrent that they know is bound to be broke. It's just a matter of how much effort the other side is willing to put in.

To buy time. No encryption of any sort lasts forever, but people put DRM on stuff anyway. The longer you can go without people hacking in pokemon, the healthier online is.

>Which do you think upper management on tight deadlines is going to ask for
Upper management that know why good code is important knows not to force programmers to do shit code because it will always save them time and money in the long run.
If you're working for management who doesn't know any better, you're supposed to explain to them why good code is important (car mechanics tell you what needs to be done, simply because they know why it's better that way, than how you think it ought to be done)

If you simply follow what upper management tells you to do, you're no better than 3rd world code monkeys, and yes men drones.

To appease the corporate executives in charge who know shit-all about how this shit actually works but you can't actually tell them that or you'll get fired.

Shadowverse. It's a japanese hearthstone clone with million dollar tournaments. All the RNG stuff is done on the client, not on serverside. Server only gives both players a seed number for the random number generator at the beginning of the game, but after that all random things including card draws, random card effects, mulligan, are computed deterministically on the client. This allows you to do stuff like see your next card draw ahead of time.

Attached: shadowverse-sample-2.jpg (1920x1080, 545K)

That will buy them a week at best. That's not worth having to possibly go from 60fps to 30

>Which do you think upper management on tight deadlines is going to ask for
if you're working at a company that knows at all what it's doing and isn't circling the drain then management is going to want well thought-out code that is easily understood and maintained. i've worked at companies like that and i've worked at companies where the deadline is the most important thing and i can assure you that companies that prioritize the deadline above good code are terrible places to be.

Depending on what pokemon gen this is I doubt they care that you're stuck with 30 fps.

true

Do they do the same thing as granblue where there is only like one or two jpn servers and fuck you everywhere else? Cuss that makes sense if you never really expected you kusoke to make it out of japan.

Also whatever happened to desighn of scale what the fuck isnt azure or something like a thing in japan. Damn every time i hear about code in asia it's some retarded shit.

No, everyone plays on the same server. Except mainland Chinese players

nigga iwata has been dead since 2015 and he never really touch pokemon except helped with the og silver / gold

Azure is very expensive. Same with AWS compared to hosting your own servers if you already own a datacenter or even the traditional renting methods.

wasting cpu cycles = wasting battery life

wrong

>no degree
>no job in the industry
>no github
HIRE THIS MAN

Irrelevant to Pokemon but people always complain about bad PC ports as if the porting company (which often is a 3rd party) is at fault. People fail to realize that most performance issues have its roots on the game's original code and they affect the console versions too. Kiwami 2 comes to mind.

This man made a game that made more money than you will ever see.

Attached: 1456497570874.png (577x518, 64K)

Sure, but the amount of problems like that is actually pretty small. There's a specific band of problems that are exactly the right amount of time consuming that they are possible to do, but worth optimizing, but for everything outside of that band it's pointless. Either the problem is so large that optimization won't help enough to make it doable, or the problem is so small that optimization is a complete waste of time. And that band constantly changes over time as computers get better and cheaper.

Well i'm not too familiar with Shadowverse but in the long run you can have insane problems with scaling which is why i'm saying they probably expected their daisy chained ps3's to be enough for the time being. Plus with azure and AWS you dont really have to spend on maintenance thus reducing the man hours required. I dont know seams redundant to me.

>gen 1
>developing games for a tinyass device
>data storage at the highest premium it's ever been
>they managed to store the entirety of a pokemon's stats in a single byte
>heavy computation needed to do this (encryption)
>fit 150 individual creatures on this (at the time already over ten years old) godforsaken piece of hardware
>twenty years later some nobody comes along and says it's bad because it's slow
>everyone bandwagons because they don't like where things have been going with the series
nice

>those edge loops
HNNNNNNNNNNNNNNNNNNGH

t. Wagie

Assuming he actually does have a case for 0 - 864 that is impressive that you could sanely do that and not think that something is wrong.

Attached: 1497566914156.png (128x99, 21K)

Being a programmer is hard. Being a good programer is too hard. Being on the same level as John Carmack is almost impossible.

and yet he's still a retard who can't write code

Makes nice tunes though.

The problem is you don't just magically scale by using Azure or AWS. If your server netcode isn't setup to support it then it's not going to work any differently than having it on your own servers or a traditional renting method. Azure and AWS also doesn't eliminate the need for you to have people who know how to manage your server from an application perspective. Microsoft and Amazon isn't going to install your custom application and maintain it for you. They are only providing the rented access and maintenance on the physical and base OS.

Why not get Iwata to fix the code? It seems like every game Game Freak made needs Iwata to come in and unfuck all of the mess they did though. Moon and Sun was a fucking mess until he stepped in.

It's on a console 2 generations behind

Spaghetti code is understandable if it's an indy project where it's a one-man job, especially if they know they suck and try and make a fun game anyway. Not everyone can be Chris Sawyer. Sometimes, something like Undertale or Dink Smallwood is Good Enough for the people who actually play it. For a company in charge of making literally one of the top 3 franchises in Nintendo, and one of the top franchises period, there's no excuse not to hire programmers who actually know their shit and directors who let them do their shit properly.

For the uninitiated

Attached: gyubzyq87xmx.png (828x801, 149K)

Nigga this is the Switch. It was outdated on release and that only becomes more true day to day. When your hadware is locked at a shit level then actually knowing how to efficiently program is a huge fucking deal.

BUT LET'S NOT IGNORE THE ELEPHANT IN THE ROOM THAT THIS IS SOMETHING THAT OCCURS EVERY SINGLE TIME AN BATTLE HAPPENS. THAT'S THE WHOLE POINT OF THE GAME

Welcome to Microsoft!

Has anyone rewritten this in a proper way? I want to see.

Wouldn't that defeat the point of encryption?

Encryption is to hide saved data not hide how the code actually works

If you're a programmer, comparing yourself to John Carmack is the equivalent of a casual athlete comparing themselves to an olympic medalist.

What job have you done since 2012 if you don't mind me asking? I did some CS modules at uni and got a job as a web developer, not sure I love it though, so just interested to see where a CS grad who hasn't coded in years decided to go with their career.

True. Fuck I wish Carmack was still developing games.

curly
GANG

It's okay, it sounds like you'll have a brilliant future at Microsoft. Send them your resume.

First of all the top two if statements could be combined, cutting out a ton of whitespace
You should also use a switch / case for the other items, which can be more efficient depending on what he's working with

brainlets will ignore this post.

The proper way would use objects and would be one line long.
Would look like this.Witnessed.Update();

With what kind of code?

Attached: thumb-2_image-154992128820315[1].jpg (1920x1081, 146K)

Japan has some weird-ass pattern decisions, though I assume this is their feeble attempt at stopping disassembling

user don't even try to defend GameFreak when they can't even make demos even right
People leaked Mega Evolutions from the demo of Omega Ruby and Alpha Saphire
And proceeded to no learn anything with the demo of Sun and Moon and got every Pokémon leaked day 1 of the release of the demo

the real draw to AWS, Azure and the like is that the extra costs in subscription fees are essentially insurance premiums against prolonged outages because of hardware failure

Yea man hours is not what i wanted to really say. I guess what i mean is they dont have to maintain the physical plant somewhere in yokahama or some shit, they can optimize per region, plus it's not like a server in Mumbai is that much different from Tokyo. Also i'm just basing this off what i experienced in an internship where the higher ups were adamant on keeping their old ass Windows 2008 system because the lead engineers where experienced with it, so when Irma happened and it fucked their data center they had to move to AWS exclusively to run their backups.

No because none of the tards bitching about it know jack shit about programming.
>hi eva
Yeah that's what I thought.

Isn't comparing strings really inefficient?
Why not enums?

>falling for the programming jew

Attached: programming.png (1608x882, 264K)

>or you can shit out some atrocious code that still manages to work in half an hour. Which do you think upper management on tight deadlines is going to ask for
Then your atrocious code gets discovered to be riddled with bugs 6 months after release and you have to go back and do it properly, taking away time from your current deadlines.

All of this needs to be rewritten with a proper data-oriented approach, not hard-coded with switches or whatever. That data shouldn't be in any source file.

>fucking scrub here, plz dont roast me
how do you get the source code for games?

And they made a fuckton of money doing this.

every time I see this posted I laugh.
it's like someone who knows 3rd grade level English trying to say knowing more words is bad.
fucking lol.
just use objects retard.

>making a life decision based off of 1 Yea Forums post
you're hispanic aren't you?

>using objects
OH NO NO NO NO

2girls1cup is insanely popular.
not a good metric for engineering.

just post the tl;dr you retard
>you can't learn programming because APIs are memorized at best
which is fucking retarded

>using what you are supposed to use in a hand-holding game engine
just manually write out a 800 case switch for a unity game lmfao ok.

>people JUST now hearing about the multiple Lillie models
Fucking why?

Here's a version I wrote in about ten minutes to best replicate the functionality.

Attached: notepad++_2019-06-13_22-03-23.png (903x654, 34K)

>every time I see this posted I laugh.
I can tell the guy who wrote it is annoying but he sorta has a point but for the wrong reasons. The real truth is programming is glorified because companies/governments want coding to just be a skill that they can expect anyone to have. It's the whole reason they make places like Facebook look like playgrounds, working in those offices is the carrot on the stick to the general population for now to get us learning but in 30 years those same jobs will be making a quarter of what they used to make and they'll be back in office holes and be forced to wear shoes like the rest of society.

Programming is just such a "new" concept that it's magical to some people, but most of that culture is just to devalue programming as a whole so companies don't have to overpay programmers.

Whoops. Fixed a bug.

Attached: notepad++_2019-06-13_22-04-29.png (896x699, 31K)

>nice
damange control

Attached: mac_sense.gif (500x333, 1.88M)

>t. not a programmer
That pic is stupid, there will always be a demand for good programmers, and you can say that anyone can do anything they want with practice, not just programming.
also,
>programming in scratch from html
what did he mean by this

this is true, but making programming popular isn't going to turn every nerd into an expert software engineer.
if you actually know what you're doing you'll stand out among the masses of CS retards.

>Just loop over every cases like a retard instead
Congratz, you just made the code worse.
If you really want to use enums instead of objects at least use a Map

You could reach Carmack level, but you really have to have his mindset of liking programming, instead of spending time here or elsewhere.

>>game runs like shit with all that inefficient code
It runs like shit because of the high poly models, not the code. Stop pretending you know what you're talking about.

Pajeet wrangling probably.

>programming in scratch from html
he's a literal retard that thinks making something in Game Maker is just as good as writing your own game engine.
he also doesn't understand that HyperTextMarkupLanguage is a Markup Language.

it's mind boggling that brainlets keep reposting this.

>high poly models
We're talking about pokemon here aren't we? Stop denying that bad programmers exist.

Reminder that no one has actually posted proof for the "Lillie models" thing and it's literally all just retards parroting other retards

Map wouldn't help in this case. You still need to check in a particular order to match the original code.

literally this
enum makes far more sense, especially if use them as bit flags so you can have each status (weapon, blood, insanity, etc) combine into unique combinations

Do you have proof that they're bad at programming beyond screencaps of anonymous posts providing no sources or reasonings for why the code makes the game run slow?

itt: coping cs undergrads

>bro just make the game a 200GB download
>hard drive space is cheap now

Attached: 1557011139612.jpg (506x529, 24K)

What order? It's just a bunch of mutually exclusive conditions

have sex/dilate/seethe.
im sorry you weren't hired because you're a hormone abomination in a dress.

Actually a math undergrad.
Programming was like pulling teeth for me.

>game is an exclusive to the most underpowered console of today

Original code is looking at combinations of Crime Flags stored as strings because Yandev is stupid. But the flags are not mutually exclusive, they're combined. Only one thing can trigger a game over at a time so you need to check the high priority flags first, therefore order matters.

Don't all recent bethesda games have super spaghetti code because they're STILL using the morrowind engine?

Attached: totally fucking fucked mate.jpg (574x863, 59K)

Followup: I'm also assuming that all flags must be checked at arbitrary times, rather than checking every time a new flag is raised.

how im a supposed to know if the code it's good or bad when all the games are closed source?

>adding an item to the windows control panel.jpg

Seethe more tranny. Maybe someday will hire you under diversity quota.

switch-case statements are cool man
It's at least one level above making infinite if-then-else statements

Comparing two arbitrary strings is expensive, but checking to see if a reference to a string constant is equal to another reference to a string constant is O(1). Of course, this assumes that the thing that sets Witnessed is well-written, which it probably isn't.

Yes and they ABSOLUTELY 100% refuse to budge on changing it. ES6 will no doubt still use it.

REEEEEEEEE
IDIOT CODE MONKEYS LIKE YOU ARE WHY NO ONE KNOWS HOW TO OPTIMIZE ANYMORE

this mentality is what is holding computing back

There are ways to decompile code and get something legible. This is easy for games made in Unity, and old, popular games like Pokemon and Guitar Hero have fans to decompile for fun and to make hacks. Bigger companies will invest in technology to scramble their code before compiling, so it's perfectly functional but absurdly difficult to read and reverse-engineer.

Gen 7

That's C#, so we can assume he's passing strings by value and not reference.

SM

Terraria
I love the game, but taking a look at how it's programmed really puts into perspective both how far it has come and what the original state was

Attached: The bitrh of a shitposter.png (1276x315, 472K)

In order to get real performance out of Unity, you basically have to discard anything to do with GameObject and the unity API in any way, nullifying much of the draw of the system.

You're better off writing your own ECS than using anything Unity comes with and anything their tutorials recommend (though Unity support will at least tell you so to your face).

Well yeah, his code might be spaghetti but unlike most of the people here he actually had the drive to sit down and write it instead of letting it fester in his brain.

does c# not automatically hash strings and do its comparisons with the hash like java does

yeah but
John Carmack is still pretty based

>Once you've learned basic syntax there is nothing more you can do.

Stopped reading. What a retard.

Iwata is dead, besides ever since the gamecube he didn't have time for those kind of things, he even said once that he was one of the causes for Mother 3 to be delayed so much and eventually canceled, Yamauchi just killed this man with so much work.

>Iwata
user...

>while computers are getting faster and faster every year.
Can't wait for Moore's Law to fail so you fucks all neck yourselves

>Iwata
Oh lordy lord he does not know.

Attached: IMG_20190413_204020.jpg (541x529, 32K)

>food-eater who hasn't grown a thing in his life critiques the taste of food from his beloved fruit-bearing planet
Damn boi

Attached: 1556910666284.jpg (216x325, 33K)

You're fucking retarded and this is why we keep getting garbage, unoptimized games. Fuck off you dumb cunt.

>I saw that the source code for Elona, a fun japanese roguelike was available online and decided to take a look. It turns out it is a single, 14mb text file with 444000 lines of code, completely devoid of comments, written in 'Hot Soup Processor', a japanese basic like language.
>The code that determines what monsters can spawn is 30000 lines of this (7% of the total game code), which checks for every monster, where if it fails it goto's the next monster, for all 1000 monsters in the game.

Attached: D8kxsAYV4AEU0Mf.jpg (1293x1051, 114K)

this post is correct but it won't stop all the armchair developers on Yea Forums to stop seething.

Attached: 1530123308297.jpg (511x671, 33K)

All variables are global.

would anyone stupid enough to do this even know how to use something that can open a 14mb text file without choking