based shut that cringe shit up. this code is fricking garbage, you can't write code much worse its not possible. javabeanfactorysingleton is miles better
1 week ago
Anonymous
Seriously I want to murder the "dev" with my own bare hands.
The frick is this garbage.
1 week ago
Anonymous
based shut that cringe shit up. this code is fricking garbage, you can't write code much worse its not possible. javabeanfactorysingleton is miles better
obviously the code is absolute garbage that no comptent dev would ever write, but that's beside the point
the main takeaway here is that what ultimately matters when making works people adore is passion and creativity, not necessarily technical skill, and that sometimes focusing on the wrong thing can take away from the reason you ever even started a project (implying: toby fox would've taken longer to learn to be a competent programmer before working on UT, and might even have lost motivation had he done so)
1 week ago
Anonymous
Nobody cares if you're a competent dev or not. Only other San Francisco transvestites do because their sexuality and code writing ability is what defined their existence. People only care that you deliver what they want in a working state. Take the blackpill.
based shut that cringe shit up. this code is fricking garbage, you can't write code much worse its not possible. javabeanfactorysingleton is miles better
Outside of literally wasting tens or hundreds of hours. It's like saying there's literally nothing wrong with digging a hole with your bare hands when there's a shovel nearby. Spaghetti shit code KILLS projects because refactors become an existential nightmare.
>Outside of literally wasting tens or hundreds of hours
Has IQfy never heard of code generators?
Embedding strings in C code is literally faster than any alternative approach.
based shut that cringe shit up. this code is fricking garbage, you can't write code much worse its not possible. javabeanfactorysingleton is miles better
Indie devs aren't real developers
This is a textbook example of “those who fail, teach.” Only instead of teaching, it’s nitpicking and seething.
You’ve realised early on that you’re actually too neurotic to amount to shit in this life, so the only thing you have is your autistic obsession with source code from better men. All you will ever amount to is criticising those who are better than you, nothing more.
Explains why you’re here too, you’ve given up and are now being a crab about it.
A Switch is pretty effective for storing dialogue. Using some regex wizardry, you could plug your text into the syntax a lot faster than just typing up raw text and importing it on a case-by-case basis.
There are probably more effective or "elegant" ways to solve that problem, but people seem to forget that simple code takes less time to read and troubleshoot and is a lot harder to frick up.
>extendible
Why do IQfytrannies always screech that games don't come out "finished" like they used to back in the good old days but at the same time they screech if a component of a game is not "extensible"?
Who gives a shit, the game is done and shipped.
1 week ago
Anonymous
Holy shit since when are there so many morons on this board? Kys techlet
1 week ago
Anonymous
/! Don't listen to this guy, he has never shipped anything. I repeat, he has never made a completed game ever.
1 week ago
Anonymous
>he has never shipped anything
Wrong, I'm employed and have several open and closed source projects, all of them well written >has never made a completed game
I'm not a game dev, moron
1 week ago
Anonymous
>I'm not a game dev, moron
Then don't speak.
1 week ago
Anonymous
Don't worry, whatever skid that wrote the same code 1000 times isn't a game dev either
Sometimes code is better than structured data, because code can handle arbitary logic such as the if statements seen in the excerpt.
moron
1 week ago
not him
>Doing things that are bad practice in general in all types of programs >>Then don't speak.
Why are you this delusional?
1 week ago
Anonymous
He's a nocoder moron/troony shill/troll/etc, either way he should kill himself
Undertale is no different than you going to the gas station and buying a winning lottery ticket and then saying "haha, see, it wasn't a waste of money all along". There's plenty of games on Steam which won't even break $200 partially due to or in whole due to code quality.
He had been a popular composer even before Undertale. He used his connections and established reputation to push his game. He basically did everything right and it paid off. Sure, it doesn't pay off for everyone, but it's pretty far from being a one-off thing. He has been making games, collabs with other musicians, and writing articles ever since, to great success.
this single variable might actually be yet more horrid than the entire switch monstrosity it's used in
surely this doesn't imply that all dialogue selections in the game modify the same global variable sequentially? surely not??? i admit, it's not exactly all that fragile as you can't have multiple choices at the same time or anything, but it's spiritually awful on principle
No it probably means there is a big context object being passed around. Nothing wrong with that, most GUIs work that way. Usually it's called a "world" object.
>it's not exactly all that fragile as you can't have multiple choices at the same time or anything, but it's spiritually awful on principle
So basically, it works perfectly fine but you're seething anyway?
You're right, he really should've planned for having a multiplayer version where 800 people can make choices simultaneously, that would've made the code much clearer.
then how did the game come into existence, was it just born out of thin air?
most games i know are developed in the warm moist womb of their developer mother (gender neutral)
based shut that cringe shit up. this code is fricking garbage, you can't write code much worse its not possible. javabeanfactorysingleton is miles better
Seriously I want to murder the "dev" with my own bare hands.
The frick is this garbage.
Enjoy starving while non-real-developers make money and provide real value to real people
an object for a dialogue message or set of messages. i can forgive nocoders for not coming up with something so obvbious. if you browse here you're brainwashed into thinking objects are evil and you should use 10000 switch cases instead
How else would you do this? if statements?
No, to be honest, I think it would have been better if they used json for dialog and a switch-case for languges it would be easier, would make life easier.
It's just odd to see programmers still hardcode shit.
Are you moronic? All resources like text should be loaded from a resource file, and since it seems it's doing the same for every case, you can parse it automatically
Why would the json method be a bad idea, maybe json is not the best format for this but maybe something like yaml or xml or something like it, I'm not a game dev.
several text files (split by level, chapter, etc) with entry markers for each dialog which can be previewed and bound to game objects in the level editor
pros of this approach are that you can get your game profesionally translated with ease, no need to rip the text lines out of code or dialog editor guis
Put all dialog into some structured file format (JSON or something), load that off disk on startup and map unique dialog names to dialog content in a hashmap. Then when I want to play a piece of dialog I lookup the dialog in the hashmap by name.
A basic editor that splits out Json file or even just a text file with something like they use for VNs. Game like Undertale that is so heavy in dialogues and cut scenes would work great for that.
You may disagree, and that's fair, the game's certainly not to everyone's tastes, but to act as though it didn't have massive appeal and top innumerable people's lists that year is just plain odd
How else would you do this? if statements?
No, to be honest, I think it would have been better if they used json for dialog and a switch-case for languges it would be easier, would make life easier.
It's just odd to see programmers still hardcode shit.
the most profitable company I worked for had the worst codebase I worked in
seems that code quality is inversely correlated to profitability aka you can spend time polishing your code or getting things done, not both
Eh, this one looks fine to me.
The other shit game was bad because a lot of the shit could have been done programmatically instead of with the switch case.
These are all completely independent so can't be programmatically filled like the other shit game.
>to launch games you NEED bad coding, it's IMPOSSIBLE to be good!
Aspastic moron trying to justify his own mediocrity, hope his twitter friends encourage him in never releasing something successful in his lifetime by supporting this stupid mentality lmfao.
he got shit done 3 years delayed, it's moronic to think this is an example unless you want an excuse to be lazy. sure he got shit done, such as pokemon got shit done with a source code so bad they had to rewrite everything from scratch in gold/silver, the coding doens't matter in a medium made for children like videogames. kys.
no, choices should just part of the message system you code in to replace this shite. if you really need something arbitrary for a few spots, let it take a lambda as part of some conditional feature.
Yet, he made millions $$$
But sure, knowing what's a function pointer is makes you a better person than him.
1 week ago
Anonymous
>he made millions $$$
People make millions doing all kinds of bullshit. It's not an argument you fricking moron.
1 week ago
Anonymous
Kinda is. Took the idea he had, hacked the shittiest code together that works, sold it and made millions.
I've seen some terrible embedded code that just works, is not touched for decades just does what it needs to day in and day out. Money made. No one cares about your paradigms or ensuring clean code, they just want their software to do the thing.
1 week ago
Anonymous
ah yes of course, youre above the realm, you just choose to be poor, fricking larper lol
>I don't care how much he made by selling a dumb "game" you couldn't pay me play. >He's a dumb nocoder skid and that remains a fact.
ask yourself the question what the frick is it that you actually do? seriously, what is it? why the frick do you do it? who are you coding for? why are you even coding? to shift product that is useful for other people or to satisfy your personal aesthetics? one of these things has value in society and the other is masturbation. you're shitting on a dude that has acheived more than you have on the basis of taste. because there is actually no final arbiter of code. no one is going to put this Black person in jail for 1000 switch cases. he will not be damned for all eternity for 1000 switch cases. it's literally not fricking important. and we know it's not important because the game is popular and playable and there is no end-user performance issue that can be determined. the important fact was a playable and enjoyable game for profit. he won, you have 240 peak users. just shut the frick up already, or maybe go lay a complaint in federal court or something? lol, lmao even.
this is the problem with autists and trannies, they're literally incapable of understanding what is important and what is not.
1 week ago
Anonymous
>no one is going to put this Black person in jail for 1000 switch cases.
He should be publicly executed >you have 240 peak users
And you're a dumb nocoder with 0 projects and 0 users
He probably has all the dialogue in some kind of plaintext file that he then reads in with a script to generate that huge source block. He's not literally going through it going "okay here's case 1000 umm so msg[0] = ... yep then msg[1] ok now case 1001..."
I'd imagine the switch gets optimized into a jump table so there's no runtime cost either.
this. jesus christ. the text formatting should have been a dead giveaway. I'm not even a professional coder, but if you gave me a movie script .docx and a week, I could write a python script that converts it into game text too.
this board is full of more brainrot than fricking reddit.
>giant switch statement
So what's the alternative? Stuffing the script in a big-ass text file with ID numbers? Not much of an improvement. And then you'd have to add more control codes to deal with stuff like branching. Probably wasn't worth the effort. >a single global variable called 'choice' to indicate the most recent dialog choice
Perfectly fine for a simple dialogue system. The name could be more descriptive, but whatever. >hard-coded array indices
Probably the worst offender. Why didn't he just use iteration?
global.msg[i++]="Line 1/"
global.msg[i++]="Line 2/"
// ...
>Probably the worst offender. Why didn't he just use iteration?
Agreed. If he needed to insert a message later on he'd have to retype all the numbers instead.
I store all my text in a single PHP array that looks something like this
$text = [
"hello" => [
"en" => "hello",
"fr" => "salut",
"de" => "hallo“
],
"bye" => [
"en" => "bye",
"fr" => "au revoir",
"de" => "tschuss“
];
and then call it with
echo $text["hello“][$lang];
How bad is that approach?
What if the json gets too large? Is there a way to just read a certain segment of select data than loading the entire file, or do I need a database for that?
You have the right idea and the principle is fine, but you wanna look for a localization library that helps you deal with this, mostly because you don't want to use strings as keys but something that your IDE can catch if you have a typo (like enums)
That's the obvious approach. Not that much better than a big switch and performs an order of magnitude worse.
"if it works it works" Black folk when they have to change 1 thing retroactively and the whole spaghetti collapses into an incomprehensible mountain of problems that is impossible to debug
Big switch is easier to change, safer and faster than most of the recommendations here like this tard
Pretty much the standard but it should be in an external JSON file
"if it works it works" Black folk when they have to change 1 thing retroactively and the whole spaghetti collapses into an incomprehensible mountain of problems that is impossible to debug
But how would this break?
It's just using a game state counter, which basically every game uses, to trigger global messages when the counter hits certain numbers.
You don't store program code in JSON. Also
It would not be faster during execution.
Isn't converting from json to php just one extra step? I could just put the array in a separate file and include it as is
PHP associative arrays are much faster than parsing json every time someone loads your website. Now for small amounts of text, it doesn't really matter.
Also design and story writing. So basically everything except programming, which is janitorial work that anyone can learn, or anyone who already knows how to do it can just do it.
He probably has all the dialogue in some kind of plaintext file that he then reads in with a script to generate that huge source block. He's not literally going through it going "okay here's case 1000 umm so msg[0] = ... yep then msg[1] ok now case 1001..."
I'd imagine the switch gets optimized into a jump table so there's no runtime cost either.
he's right
i hate worrying about implementing anything because "it might not be the right way to do it"
its much faster to implement things intuitively and fix problems as they arise
especially as a single guy working on a project
What you're supposed to do is write sloppy the first time when you're prototyping, refactor for speed and ease of use when that starts to slow you down. You know, when you start spending an hour doing fricking copy paste monkey work because you decided to add a new line of dialog.
Honestly it isn't that bad. Undertale is a pretty dialogue heavy JRPG so I can't really think of a better way to manage dialogue than a giga sized switch case. Remember, each dialogue instance in Deltarune can be affected by choices you've made, so it's probably the easiest, fastest and most maintainable way to manage the dialogue in the game.
It's not like it has a performance impact, it's just a switch case.
This runs every time a dialogue box opens.
How else would you do it?
It's the same thing as Yandere Sim, it's not going to be an issue regarding performance, but it's going to be incredibly hard to maintain. Unlike Yandere Sim, this is a 2D game with tons of dialog, minimal design and animations, so there isn't too much to render.
>but it's going to be incredibly hard to maintain
It's not though. It's no harder to maintain than any of the alternative approaches in this thread. Stop listening to moronic Clean Code gays.
>bro there's nothing unsustainable by wrangling index pointers to different conversations
Conversation 1 links to conversation 254 which links to conversation 950 which has two branching conversations: 1059 and 2. This strategy is very sustainable.
You can group conversations in a switch just as easily as you can group then in a hashmap or JSON file or whatever other bullshit has been proposed in this thread.
1 week ago
Anonymous
>bro just wrangle the 60,502 switch statement conditions
1 week ago
Anonymous
> bro just wrangle the json file with 60,502 entries
1 week ago
Anonymous
You'd either use a node tree editor or a human editable file format, moron. You know, something that doesn't require you to memorize Conversation IDs or punish you for wanting to change the flow of dialog or adding another message.
1 week ago
Anonymous
A switch doesn't make you memorize conversation IDs moron. You must be a braindead user of dynamically typed programming languages.
1 week ago
Anonymous
A switch DOES make you memorize ids (conditions), moron. Also congratulations, you made your game twice as hard to translate.
1 week ago
Anonymous
It does not. You're moronic and have no idea what you can do with a half decent type system. All of this could be statically typed and a decent approach would ensure that translations are exhaustive.
>bro someone bought a lottery ticket in a gas station and won a million dollars, that must mean buying lottery tickets is smart!!
You're not that person, don't do stupid shit.
1 week ago
Anonymous
So no real arguments against them other than it's not how you would do it. Crab.
Toby Fox is a unconventional artist that was in the right place at the right time, not a remarkable programmer. Still most of his games aren't complex generative dungeon crawlers or anything.
game "devs" are actually worse than indians
that's why modern games are full of bugs and run like shit
you can count on maybe two hands the number of open source games on github that are well programmed
This amount of data is going to get ugly no matter what. Using something like JSON is just trading one ugly for another, and then you'd lose support for inline scripting.
Maybe I'm moronic, but couldn't this be the result of compilation and decompilation?
Code and Data aren't normally stored together in memory, they're usually stored in section for execution and a separate section for data. I can imagine a compiler storing all strings in continuous memory, and a decompiler looking at that as if it were some type of jump table, and then spit out that it's a giant switch case.
I can also see whatever game engine was used tried to optimize them as a lookup table of strings instead of holding the address to the string itself. So it can reference string 0 or string 1 in an attempt to either reuse some bit of code, avoid storing full addresses in memory, or implementing some form of position independant code/data.
But again, maybe I'm just moronic and don't know how computers work.
Shipping is the only thing that matters in life. It doesn't matter if you got a trillion dollar super optimized idea that you're working on, if you never ship it.
Ship it
Ship fast
Ship faster
Ship fastest
Optimize only after you ship it. Optimize conservatively. And then aggressively
>This is unmaintainable.
I really don't see how. >need to add new global messages >add more game state values to the game state counter >add more cases with the messages to the switch case
it is completely unmaintainable. if you decide to stop using a shitty global variable for your msgs then you have to change 10s of thousands of lines of code
big stupids:
I see no problem with it.
Would be a big problem if he did it using IF ELSE statements.
>but it's going to be incredibly hard to maintain
It's not though. It's no harder to maintain than any of the alternative approaches in this thread. Stop listening to moronic Clean Code gays.
Honestly it isn't that bad. Undertale is a pretty dialogue heavy JRPG so I can't really think of a better way to manage dialogue than a giga sized switch case. Remember, each dialogue instance in Deltarune can be affected by choices you've made, so it's probably the easiest, fastest and most maintainable way to manage the dialogue in the game.
It's not like it has a performance impact, it's just a switch case.
This runs every time a dialogue box opens.
How else would you do it?
Simple case of it just works. Switch statements are fast and works. He never meant to change it or expand on it.
If you work at a big corporation, sure, go all design pattern autism on your code. If you need to get shit done, do whatever it takes.
You don't put text messages hardcoded into the source code.
He could have created an XML, with a code column, and a message column.
Then the code would load everything from the XML into the memory.
What if he wants to change the language to spanish. With the current method he has to rewrite everything inside the source code and then recompile.
If it were an external file, all he would have to is load another language file.
It is totally ok to use long case switch, but at least create an enumerator to do so.
>What if he wants to change the language to spanish. With the current method he has to rewrite everything inside the source code and then recompile.
still less gay than dealing with XML
>He could have created an XML, with a code column, and a message column. >Then the code would load everything from the XML into the memory.
There is zero point to this, you're just complicating things for no reason. >What if he wants to change the language to spanish. With the current method he has to rewrite everything inside the source code and then recompile.
Ah yes, I haven't even released my game yet but I'm gonna localize it into Swahili.
In the unlikely case that anyone ever asks for a translation, just copy the file and translate every line. The game is done and you're not going to add any more dialogues anyway.
The fanciest I'd ever get is some Qt-style tr() function, but adding that in after the fact is very easy.
>He could have created an XML, with a code column, and a message column.
I don't see how turning the code into a slurry of XML tags would improve things. Additionally, there'd need to be some way to add conditions, along with whatever else he used inline scripting to accomplish.
>What if he wants to change the language to spanish.
This can be put in another file with its own frick-huge switch statement.
>With the current method he has to rewrite everything inside the source code and then recompile.
Recompiling isn't a big deal, bro. Just press F5. It's not rocket science.
>I don't see how turning the code into a slurry of XML tags would improve things. Additionally, there'd need to be some way to add conditions, along with whatever else he used inline scripting to accomplish.
>What if he wants to change the language to spanish. With the current method he has to rewrite everything inside the source code and then recompile.
still less gay than dealing with XML
>y than dealing with XML
>He could have created an XML, with a code column, and a message column. >Then the code would load everything from the XML into the memory.
There is zero point to this, you're just complicating things for no reason. >What if he wants to change the language to spanish. With the current method he has to rewrite everything inside the source code and then recompile.
Ah yes, I haven't even released my game yet but I'm gonna localize it into Swahili.
In the unlikely case that anyone ever asks for a translation, just copy the file and translate every line. The game is done and you're not going to add any more dialogues anyway.
The fanciest I'd ever get is some Qt-style tr() function, but adding that in after the fact is very easy.
>There is zero point to this, you're just complicating things for no reason.
Wow, so many morons.
You can use any fricking XML editor to change the text.
Whoever is editing the text doesn't even need to be a programmer, you can give the XML file to any translator to get the job done.
Has anyone here ever worked with software development?
>You can use any fricking XML editor to change the text.
great. now we have to waste more cpu time parsing xml Black folkhit. >Has anyone here ever worked with software development?
you haven't.
>I'm going to explain why the code is shit: >recommends making it worse by using xml
weeeew lad. wew.
>He could have created an XML, with a code column, and a message column.
I don't see how turning the code into a slurry of XML tags would improve things. Additionally, there'd need to be some way to add conditions, along with whatever else he used inline scripting to accomplish.
>What if he wants to change the language to spanish.
This can be put in another file with its own frick-huge switch statement.
>With the current method he has to rewrite everything inside the source code and then recompile.
Recompiling isn't a big deal, bro. Just press F5. It's not rocket science.
>I don't see how turning the code into a slurry of XML tags would improve things.
it wouldn't improve anything
It's somewhat innovative, subversive on many layers aka meta, with kind of fun characters, really well written story and cleverly constructed world. Sure you might dislike it because of fan base or cutesy message in the true ending, or the lesbos, but the game still is solid. And I'd even say deep, if you really dive into it.
good code is the enemy of done code
games are disposable just get it done any way you can. though surely other methods would have been easier he didn't know them and still finished it.
I can't tell if this one of those rage bot farms or the morons praising this code are serious and just idiots. they make like 3 logical fallacies in a row to justify this crap.
to the idiots defending this shit, show me YOUR garbage code that makes you millions. ill wait.
IQfy and the internet has a problem with non-programmers thinking theyre programmers. if you've output less than 10,000 lines of code, stop talking about programming. stop posting in language wars threads. stop talking about programming paradigms. you do not, and I repeat this again, you DO NOT KNOW what you're talking about. you ARE an armchair expert with 100% certantity if you have written less than 10k loc. i dont care how many wiki articles youve read and coding streamers youve watched >i can't think of a better way to do it so...
yes, we know. you arent a programmer. we fricking know.
with this approach you will have one in a million successful game, and the rest will be bad games with a lot of bugs and performance problems. not really a good advice.
You can make a function that returns the message based on an argument param with the switch just like your class method. The switch will also be compiled into a perfect jump table which will be far faster than using a Map. The huge JSON file that you conveniently left out is also no more maintainable than the switch and does even less static checking.
1 week ago
Anonymous
places where you're wrong:
- the switch will not get compiled to a jump table, this is game maker not cpp. it will probably be an if-else that checks each and every case each time. the map is probably faster
- json, yml, xml, etc get checked by both your ide and when parsed so there isnt less checking
just stop talking moron you haven't done this before.
1 week ago
Anonymous
> gamemaker
Your fault for using moronic trash. > there isnt less checking
There is less checking. In the JSON file you could replace a string with any random type and it wouldn't complain. It also isn't even parsed until runtime. What your shitty IDE does is completely irrelevant.
1 week ago
Anonymous
>Your fault for using moronic trash.
you mean toby's fault because this thread is about his undertale game maker code? kek you really are clueless and getting angry. >In the JSON file you could replace a string with any random type and it wouldn't complain.
you can write an extra line of code to type check it in the 0.001% chance you wrote the number 4 instead of your string
kek dude just stop posting you're getting desperate
1 week ago
Anonymous
>you can write an extra line of code to type check it
I accept your concession.
1 week ago
Anonymous
coping so hard. also in the toby dogshit code you can have a massive error by getting the indexes wrong and there would be no error even at runtime just silently missing dialogue you could miss. you have no arguments and i have hundreds. you found yourself talking about something you know nothing about with someone who does and now you're fricked kek
1 week ago
Anonymous
>you can have a massive error by getting the indexes wrong
Switches can have a default case. You can easily have the same problem with your frick-huge json file that even you yourself have admitted is less safe and more error prone.
1 week ago
Anonymous
>you can have a massive error by getting the indexes wrong
not talking about that one, talking about the on used to index global.msg
you're so clueless and confused dude. i hope youre a teen because if youre an adult and this stupid.........
1 week ago
Anonymous
You're getting so emotional and have yet to give a single reason why your 10,000 line JSON file is more maintainable even though you've already admitted that it's slower and more error prone. You're pretty much the typical clean code advocate.
1 week ago
Anonymous
nah its faster after parse and far less error prone, you just lost an argument and are now trying to save face by not understanding anything, or are just actually dumb
ok. and to the incels trying to get an own in, i would probably end up changing this as the game went on but the difference between mine and little toby's is that mine can easily be completely changed in a few seconds
class MessageGroup {
static msgDatabase = new Map<number, MessageGroup>
static fromJSON(filename: string): MessageGroup{
//parse from file
}
It needs to handle much more complicated cases than that. The game makes extensive use of inline scripting for dynamic dialogue. If you want feature parity, you'll need to basically re-implement large parts of GML.
Don't believe me? Take a look for yourself. This is the decompiled script:
https://web.archive.org/web/20230126032521/https://github.com/marciniuk/undertale/blob/master/scripts/SCR_TEXT.gml
1 week ago
Anonymous
Inline scripting makes it even more cancer. As has been already been said, you *can* do it this shit way, but he probably spent way too many hours managing the shit show. He likely spent 3x or more time on dialog than he should've which makes me think what compromises he made along the way.
1 week ago
Anonymous
>Inline scripting makes it even more cancer
And what's the alternative? Adding a bunch of extra control codes? That's a lot of extra work just so you can put the script in a text file.
1 week ago
Anonymous
Its been explained. If you can't understand from that, don't talk about programming.
1 week ago
Anonymous
You shouldn't put scripts in a text file. That's amateur hour shit.
1 week ago
Anonymous
have a nice day moron
1 week ago
Anonymous
its fine, any example given can be retrofitted and will work better than toby's shit. and if something really generic is needed you can use a lambda. im not just going to code a full dialogue system for IQfycels, i already rewrote everything posted in this thread better.
1 week ago
Anonymous
You can swap the number map to an array making it as fast as a pointer table to shut the maps-are-slow idiot up but otherwise its good.
>>IQfy shits on YandereDev for using long elseif statements instead of switches
Yanderedev's code is trash but simply using switch statements won't fix it. The biggest issue was that he was encoding states using strings and that wasn't even the main cause of the poor performance, which was actually caused by things like toothbrush models containing the highest polygon counts.
Witnessed == WitnessType.BloodInsanity is 18 times faster than Witnessed == "Blood and Insanity".
1 week ago
Anonymous
and a typo can break your whole program.
>The biggest issue was that he was encoding states using strings
Literally zero problem with that
needs to suicide
1 week ago
Anonymous
not in c#. c# has interned strings and Witnessed == "Blood and Insanity" becomes a comparison of 2 pointers
1 week ago
Anonymous
I didn't know that, but still the compiler won't complain if you've made a typo in the string but it definitely will complain if you've done the same thing with an enum name.
The bad programmers are the ones that follow Clean Code and create horribly abstracted slow bullshit.
1 week ago
Anonymous
nah they've made literal billions of dollars off that code. lets see your shit.
1 week ago
Anonymous
No they haven't. Uncle Bob and his troony followers are poor.
1 week ago
Anonymous
yea dude faang is poor kek
1 week ago
Anonymous
Other than Netflix FAANG companies ignore most of this shit. Spring, RoR and all the clean code nonsense is banned at Google and Meta and Uncle Bob is considered a lolcow.
Casey is right.
1 week ago
Anonymous
Massive, massive cope. corps are the sole source of clean code
1 week ago
Anonymous
There are 10,000 line switches in Google's mono repo.
>https://www.polygon.com/2020/1/13/21064100/vvvvvv-source-code-game-development-terry-cavanagh-release/
Same thing here for the game VVVVVV.
OMG WE BETTER TURN THIS INTO A BUNCH OF SEPARATE CLASSES THAT IMPLEMENT AN INTERFACE AND USE RUNTIME BASED POLYMORPHISM
1 week ago
Anonymous
and there's a 30 deep inheritance hierarchy in one of meta's open sources. your point?
1 week ago
Anonymous
That most web and desktop developers are drooling monkeys and have no room to criticize game devs
The performance problems is because he was doing this bullshit in Update() in Unity and every single entity was basically doing 99% erroneous checks literally every frame instead of having event based checks. In Unity in particular one of the easiest performance boosts is avoiding putting anything in the Update() function.
90s JRPG also didn't had that popularity. Undertale is one of the most popular games in the world.
1 week ago
Anonymous
>didnt have that popularity
You have to account for the differences in scale first with the population being nearly 60% higher in 2015 and the proliferation of easier access to vid game consoles (a SNES game cost $30-50 USD in the early 90s) but even then Earthbound sold less than half a million units by year 2000 outside of Japan.
The quad-game trio of FF6, 7, 8 and 9 sold nearly 10 million units by that same time. Earthbound, again, was bought by far, FAR less than half a million people outside of Japan.
So again, I know you were saying "it's like Earthbound!" as a game, I was saying "it's the 90s JRPG game for Zoomer generation"
All code is shit code. The difference is ones that recognize that there code is shit and those who think there code is the greatest shit ever (its not).
This works but it's mostly just turned out into a data structure and probably isn't optimal or is some sort of compiler optimization. The shit in yandere Sim is something else; it's pedo code.
Ctrl+F: CSV
Not a single reply...
Just do like Unreal Engine 5, and store it on a CSV file.
You can edit the CSV inside Excel.
That's it, the easiest way is using CSV to store.
This whole thread is just Pajeets calling people who don't subscribe to their moronic Pajeet coding trannies. If you think this is acceptable, you are a fricking Jeet and that's the end of the story. This new trend of calling good code "troony" reeks of fricking curry.
idk dude. the anti-clean code movement on IQfy has like 1% good coders advocating for decent code and 99% idiots saying op code is genius because they can actually understand that one with their 2 weeks coding experience
and there's loads of jeets or jeets in spirit going >it works i don't care if its shit and runs like ass if its gets me dat money
but then turn around and complain the modern internet is a laggy buggy crashgrab. huh its almost like quality means something. but hell if it accelerates the collapse of the american empire let the zoomers write the shittiest code imaginable
Instead you should put it in a 100,000 word json file that has basically all the same problems including the fact that it's slower and has even less type checking!
What are you talking about? That would be way better. The gml code in the op is going to be slow as shit with unoptimized switch statement and also there's a lot of benefits and headache savers to putting it in a file.
1 week ago
Anonymous
> unoptimized switch statement
kek
1 week ago
Anonymous
You think gml actually uses jumptables?
1 week ago
Anonymous
GML these days gets converted into C++ and compiled. But either way, it's not a performance issue as far as I'm aware.
1 week ago
Anonymous
>The language's default mode of operation on native platforms is via a stack machine; it can also be source-to-source compiled to C++ via LLVM for higher performance.[26] On HTML5, GML is source-to-source compiled to JavaScript with optimizations and minification applied in non-debug builds.
yea still, i don't think undertale used the llvm mode. js definitely will not use a jump table. it *might* be *fine* if you set it up right, but its going to suck a lot of the time. i can think of 2 ways to do it faster.
anyway performance doesnt matter much with pixel indie shit, the problems with the code are more to do with other things.
1 week ago
Anonymous
And reading through the thread it seems i'm arguing with a pajeet that already got told off earlier multiple times
1 week ago
Anonymous
v8 will convert it to a jump table if all keys are either integers or strings.
Putting the script into an external file would turn dirty code into a dirty file. Just face it. Game scripts are large and messy. There's no way around it. It's never going to be something you can express as a pretty little one-liner.
Inline scripting makes it even more cancer. As has been already been said, you *can* do it this shit way, but he probably spent way too many hours managing the shit show. He likely spent 3x or more time on dialog than he should've which makes me think what compromises he made along the way.
>Inline scripting makes it even more cancer
And what's the alternative? Adding a bunch of extra control codes? That's a lot of extra work just so you can put the script in a text file.
You shouldn't put scripts in a text file. That's amateur hour shit.
The difference is you can have a text file that doesn't mix code with dialog. And even better, you can make a parser that validates and tests your dialog system too so you can ensure there's no dead paths. You know, because you're fricking doing spaghetti string bullshit anyways.
Who cares if its fast and slow when its written this bad? The amount of people who watched that Muratori video and took the wrong takeaway is staggering. i'm starting to hate the guy not because his opinions are bad but because there's a new legion of idiots misunderstanding his ideas and saying the dumbest shit.
Nobody is misunderstanding anything. People are having a laugh because you clean code homosexuals love to claim things are unmaintainable and that your way is better but when pressed you can't substantiate that with evidence or even a remotely decent explanation. You're brainlets that just regurgitate nonsense from people that think RoR garbage is the pinnacle of programming.
Nobody actually gives a shit about this switch case bullshit.
hope jeetcode switch casers aren't laughing, because itt not one of them has provided solid evidence for why using a 1000 long switch case for dialogue is ok. they're total fricking tools. complete idiots
>dialogue is ok
Their evidence is the tens of millions of dollars they made from their game that performs well on a flip phone from 2002.
We're laughing at the people that don't know how to code who watched a casey video and now are convinced switch cases are the savior of the white race and need to come on here to culture war about that.
Nobody cares about the switch moron. The funny part is that you can't actually explain why it's bad.
1 week ago
Anonymous
>Their evidence is the tens of millions of dollars they made from their game that performs well on a flip phone from 2002.
java has clean code-tier principles baked into the lang and also has generated trillions of dollars and actually did run on 2002 phones unlike this >Nobody cares about the switch moron
the entire thread is about the switch. most posts are about the switch. in fact, i care about how bad this specific switch is more than any coding philosophy argument >The funny part is that you can't actually explain why it's bad.
done multiple times:
Inline scripting makes it even more cancer. As has been already been said, you *can* do it this shit way, but he probably spent way too many hours managing the shit show. He likely spent 3x or more time on dialog than he should've which makes me think what compromises he made along the way.
coping so hard. also in the toby dogshit code you can have a massive error by getting the indexes wrong and there would be no error even at runtime just silently missing dialogue you could miss. you have no arguments and i have hundreds. you found yourself talking about something you know nothing about with someone who does and now you're fricked kek
you don't even have to edit source code to maintain one that parses from a file. it is by definition 0 maintenance you are moronic
it is completely unmaintainable. if you decide to stop using a shitty global variable for your msgs then you have to change 10s of thousands of lines of code
big stupids:
We're laughing at the people that don't know how to code who watched a casey video and now are convinced switch cases are the savior of the white race and need to come on here to culture war about that.
are you actually fricking kidding me
is every line of dialog in the entire game just a case in a frickhuge switch statement
apparently 🙂
He used the time of learning programming to actually make a game and make clean exit
there's literally nothing wrong with it
i mean, if it works... doesn't make my head hurt any less though
have a nice day
What's your problem?
he is poor because he fell for code re-usability and extension and forgot to get things done
based shut that cringe shit up. this code is fricking garbage, you can't write code much worse its not possible. javabeanfactorysingleton is miles better
Seriously I want to murder the "dev" with my own bare hands.
The frick is this garbage.
obviously the code is absolute garbage that no comptent dev would ever write, but that's beside the point
the main takeaway here is that what ultimately matters when making works people adore is passion and creativity, not necessarily technical skill, and that sometimes focusing on the wrong thing can take away from the reason you ever even started a project (implying: toby fox would've taken longer to learn to be a competent programmer before working on UT, and might even have lost motivation had he done so)
Nobody cares if you're a competent dev or not. Only other San Francisco transvestites do because their sexuality and code writing ability is what defined their existence. People only care that you deliver what they want in a working state. Take the blackpill.
Well, as /r/3DCG says:
Post your work!
Outside of literally wasting tens or hundreds of hours. It's like saying there's literally nothing wrong with digging a hole with your bare hands when there's a shovel nearby. Spaghetti shit code KILLS projects because refactors become an existential nightmare.
>"Spaghetti shit code KILLS projects"
>project proceeds to net ~$26mil
>survivorship bias
Anon, when a project fails it doesn't even become a game. Undertale is a one in a million game project.
This anon has refactored spaghetti code. That switch statement is dog shit and there are a half dozen ways which are better.
Describe them and exactly why they're better. Be specific.
They will never do this. They're just mindlessly regurgitating propaganda from brainlets like Uncle Bob.
Post the link to your steam game.
https://store.steampowered.com/app/489830/
Now do what was requested.
Sure, but if it works and makes money: Who fricking cares? I got the money, frick off.
>Outside of literally wasting tens or hundreds of hours
Has IQfy never heard of code generators?
Embedding strings in C code is literally faster than any alternative approach.
This is a textbook example of “those who fail, teach.” Only instead of teaching, it’s nitpicking and seething.
You’ve realised early on that you’re actually too neurotic to amount to shit in this life, so the only thing you have is your autistic obsession with source code from better men. All you will ever amount to is criticising those who are better than you, nothing more.
Explains why you’re here too, you’ve given up and are now being a crab about it.
The game you posted was made by two people who had an "autistic obsession with source code from better men"
>zoomer spacing
frick off underage b&
it's as fast as referencing a block of data.
life itself is coded with a bunch of if/else statement, apologize to yandere dev
A Switch is pretty effective for storing dialogue. Using some regex wizardry, you could plug your text into the syntax a lot faster than just typing up raw text and importing it on a case-by-case basis.
There are probably more effective or "elegant" ways to solve that problem, but people seem to forget that simple code takes less time to read and troubleshoot and is a lot harder to frick up.
>is every line of dialog in the entire game just a case in a frickhuge switch statement
No coder detected.
>case 736
>if global.choice
This case is more profitable than combined IQfy codes altogether.
>no code reuse
>not extensible
It's garbage.
>but muh money
Not a property of the code itself
clean code troony triggered
check nearest food bank for help
Looks extensible to me, just add another case.
This is also what peak code reuse looks like. Seriously, think about it.
>extendible
Why do IQfytrannies always screech that games don't come out "finished" like they used to back in the good old days but at the same time they screech if a component of a game is not "extensible"?
Who gives a shit, the game is done and shipped.
Holy shit since when are there so many morons on this board? Kys techlet
/! Don't listen to this guy, he has never shipped anything. I repeat, he has never made a completed game ever.
>he has never shipped anything
Wrong, I'm employed and have several open and closed source projects, all of them well written
>has never made a completed game
I'm not a game dev, moron
>I'm not a game dev, moron
Then don't speak.
Don't worry, whatever skid that wrote the same code 1000 times isn't a game dev either
moron
>Doing things that are bad practice in general in all types of programs
>>Then don't speak.
Why are you this delusional?
He's a nocoder moron/troony shill/troll/etc, either way he should kill himself
>>no code reuse
>>not extensible
Why does that matter? His game is written in gamemaker, he would be better be of rewritting it anyways.
>His game is written in gamemaker
Hahah lmfao frick me
>Hahah lmfao frick me
https://gamemaker.io/en/showcase?title=undertale
Here is if you don't believe me.
I believe you and it's absolutely bonkers
God I hate these non-dev morons
Yet he has more than 240 peak users.
How strange...
>codes
wtf zoomer, leave this board immadiately
Undertale is no different than you going to the gas station and buying a winning lottery ticket and then saying "haha, see, it wasn't a waste of money all along". There's plenty of games on Steam which won't even break $200 partially due to or in whole due to code quality.
He had been a popular composer even before Undertale. He used his connections and established reputation to push his game. He basically did everything right and it paid off. Sure, it doesn't pay off for everyone, but it's pretty far from being a one-off thing. He has been making games, collabs with other musicians, and writing articles ever since, to great success.
Games don't need to be refactored. It's one and done. It's not like he's writing a library.
this single variable might actually be yet more horrid than the entire switch monstrosity it's used in
surely this doesn't imply that all dialogue selections in the game modify the same global variable sequentially? surely not??? i admit, it's not exactly all that fragile as you can't have multiple choices at the same time or anything, but it's spiritually awful on principle
No it probably means there is a big context object being passed around. Nothing wrong with that, most GUIs work that way. Usually it's called a "world" object.
>it's not exactly all that fragile as you can't have multiple choices at the same time or anything, but it's spiritually awful on principle
So basically, it works perfectly fine but you're seething anyway?
You're right, he really should've planned for having a multiplayer version where 800 people can make choices simultaneously, that would've made the code much clearer.
register pattern
If they wrote it correctly then they would have had more time to make it even better.
undertale is perfect as is
more =/= better
Indie devs aren't real developers
then how did the game come into existence, was it just born out of thin air?
most games i know are developed in the warm moist womb of their developer mother (gender neutral)
Enjoy starving while non-real-developers make money and provide real value to real people
>undertale
>goty
lmao
What would you do instead of 1000 line switch statement?
an object for a dialogue message or set of messages. i can forgive nocoders for not coming up with something so obvbious. if you browse here you're brainwashed into thinking objects are evil and you should use 10000 switch cases instead
Let's see all the great things you've built with your superior knowledge.
This is one of my open source projects
https://github.com/shrimpcast/shrimpcast
>1 star
> Battle-tested
XD
You're trolling, don't post someone else's github to humiliate him.
It's my own streaming platform which I made to run a stream and I've peaked at 240 users
>I've peaked at 240 users
pervert
Feet stream when?
>1 star
Who the frick stars githubs?
several things that make money actually. and you haven't built shit because you can't code at all
999 if/else statements
Are you moronic? All resources like text should be loaded from a resource file, and since it seems it's doing the same for every case, you can parse it automatically
Why would the json method be a bad idea, maybe json is not the best format for this but maybe something like yaml or xml or something like it, I'm not a game dev.
Yup, and the resource file is the executable.
Seethe harder homosexual.
Also post your work.
>Yup, and the resource file is the executable.
No it's not, you dumb nocoder.
>Also post your work.
See
Oh wow! An MVC app! Soo complex! THREE controllers? Wow, I kneel.
Try to make a game next time.
It's a streaming platform, it uses sockets, not controllers. Dumb nocoder c**t.
Woah! Full-on SOCKETS?
I kneel.
Post github
>can't see an obvious joke post
>calling anyone else moronic
So this is the power of autism...
several text files (split by level, chapter, etc) with entry markers for each dialog which can be previewed and bound to game objects in the level editor
pros of this approach are that you can get your game profesionally translated with ease, no need to rip the text lines out of code or dialog editor guis
I would listen and thats what no one did.
Put all dialog into some structured file format (JSON or something), load that off disk on startup and map unique dialog names to dialog content in a hashmap. Then when I want to play a piece of dialog I lookup the dialog in the hashmap by name.
Teaching brainlets hashmaps was such a mistake.
Hash map that maps to a function.
Array of char*, simple as
Basically amounts to the same but cleaner
A basic editor that splits out Json file or even just a text file with something like they use for VNs. Game like Undertale that is so heavy in dialogues and cut scenes would work great for that.
No one can explain why this is LE BAD
That's because it isn't.
You may disagree, and that's fair, the game's certainly not to everyone's tastes, but to act as though it didn't have massive appeal and top innumerable people's lists that year is just plain odd
How else would you do this? if statements?
No, to be honest, I think it would have been better if they used json for dialog and a switch-case for languges it would be easier, would make life easier.
It's just odd to see programmers still hardcode shit.
the most profitable company I worked for had the worst codebase I worked in
seems that code quality is inversely correlated to profitability aka you can spend time polishing your code or getting things done, not both
Eh, this one looks fine to me.
The other shit game was bad because a lot of the shit could have been done programmatically instead of with the switch case.
These are all completely independent so can't be programmatically filled like the other shit game.
>repeating the exact same code for over 1000 cases is ok to me
Immediately have a nice day
Is the dialog repeated at all?
So im guessing this game has not been released in a language other than english then?
>So im guessing this game has not been released in a language other than english then?
Why do you think there is 1000+ dialog?
It has. There's an official japanese translation.
Nobody defending this actually has a job in the industry.
ITT full of dumb nocoders who've never written a single line of code
We've all have shipped shitty but 1000+ case, holy shit
>to launch games you NEED bad coding, it's IMPOSSIBLE to be good!
Aspastic moron trying to justify his own mediocrity, hope his twitter friends encourage him in never releasing something successful in his lifetime by supporting this stupid mentality lmfao.
I just hope that him and everyone itt dies a painful death
That's not what he's saying. He's saying that the "dev" got shit done, unlike most professional devs.
Why are you homosexuals seething this much?
he got shit done 3 years delayed, it's moronic to think this is an example unless you want an excuse to be lazy. sure he got shit done, such as pokemon got shit done with a source code so bad they had to rewrite everything from scratch in gold/silver, the coding doens't matter in a medium made for children like videogames. kys.
I am just gonna write the same code 1000 times and that's a totally best practice, yes.
Sometimes code is better than structured data, because code can handle arbitary logic such as the if statements seen in the excerpt.
no, choices should just part of the message system you code in to replace this shite. if you really need something arbitrary for a few spots, let it take a lambda as part of some conditional feature.
The dumb Black person that made this "game" probably doesn't even know what a lambda/callback is
Yet, he made millions $$$
But sure, knowing what's a function pointer is makes you a better person than him.
>he made millions $$$
People make millions doing all kinds of bullshit. It's not an argument you fricking moron.
Kinda is. Took the idea he had, hacked the shittiest code together that works, sold it and made millions.
I've seen some terrible embedded code that just works, is not touched for decades just does what it needs to day in and day out. Money made. No one cares about your paradigms or ensuring clean code, they just want their software to do the thing.
ah yes of course, youre above the realm, you just choose to be poor, fricking larper lol
the logical part isnt tied to simple message choices, dumbass theres actual in game action involved, kys noproduct
ITT wagecuck developers seething
I hope your bosses will appreciate your efforts and give you 3% salary increase this year
ITT MVC codelet seethe that someone can make a better product than he ever will without concerning himself with ~~*aesthetical*~~ bullshit.
>codelet
You're the codelet defending a 1000 case switch
Are you moronic or what?
Also I told you that's just one of my open-source projects, I'm actually employed you troony techlet freak
I don't care how much he made by selling a dumb "game" you couldn't pay me play.
He's a dumb nocoder skid and that remains a fact.
Woah you're employed!! I'm employed too!!! We have so much in common!
Stay with your jealousy, he is in his jacuzzi.
Yeah but you're not SwE so what are you doing here, moron?
No I'm not from Sweden.
Are you from India (・3・) ?
>he doesn't know SwE means software engineering
The absolute state, genuinely have a nice day
you're from India, I knew it.
Good morning sir.
Projecting as usual, rajesh?
>I don't care how much he made by selling a dumb "game" you couldn't pay me play.
>He's a dumb nocoder skid and that remains a fact.
ask yourself the question what the frick is it that you actually do? seriously, what is it? why the frick do you do it? who are you coding for? why are you even coding? to shift product that is useful for other people or to satisfy your personal aesthetics? one of these things has value in society and the other is masturbation. you're shitting on a dude that has acheived more than you have on the basis of taste. because there is actually no final arbiter of code. no one is going to put this Black person in jail for 1000 switch cases. he will not be damned for all eternity for 1000 switch cases. it's literally not fricking important. and we know it's not important because the game is popular and playable and there is no end-user performance issue that can be determined. the important fact was a playable and enjoyable game for profit. he won, you have 240 peak users. just shut the frick up already, or maybe go lay a complaint in federal court or something? lol, lmao even.
this is the problem with autists and trannies, they're literally incapable of understanding what is important and what is not.
>no one is going to put this Black person in jail for 1000 switch cases.
He should be publicly executed
>you have 240 peak users
And you're a dumb nocoder with 0 projects and 0 users
How sure are we that this is human-authored source code and not the output of a decompiler?
this. jesus christ. the text formatting should have been a dead giveaway. I'm not even a professional coder, but if you gave me a movie script .docx and a week, I could write a python script that converts it into game text too.
this board is full of more brainrot than fricking reddit.
furry bait has nothing to do with game code.
have a nice day.
this kid thinks he's owning the cs chuds instead of looking like the biggest moron
>giant switch statement
So what's the alternative? Stuffing the script in a big-ass text file with ID numbers? Not much of an improvement. And then you'd have to add more control codes to deal with stuff like branching. Probably wasn't worth the effort.
>a single global variable called 'choice' to indicate the most recent dialog choice
Perfectly fine for a simple dialogue system. The name could be more descriptive, but whatever.
>hard-coded array indices
Probably the worst offender. Why didn't he just use iteration?
global.msg[i++]="Line 1/"
global.msg[i++]="Line 2/"
// ...
>Probably the worst offender. Why didn't he just use iteration?
Agreed. If he needed to insert a message later on he'd have to retype all the numbers instead.
What's wrong with huge switches and huge if else cases if your game requires it? How can you do it better?
I store all my text in a single PHP array that looks something like this
$text = [
"hello" => [
"en" => "hello",
"fr" => "salut",
"de" => "hallo“
],
"bye" => [
"en" => "bye",
"fr" => "au revoir",
"de" => "tschuss“
];
and then call it with
echo $text["hello“][$lang];
How bad is that approach?
Pretty much the standard but it should be in an external JSON file
Isn't converting from json to php just one extra step? I could just put the array in a separate file and include it as is
Imagine you have a thousand labels, you're not going to hardcode a thousand labels, right?
>Imagine you have a thousand labels, you're not going to hardcode a thousand labels, right?
Why not?
What if the json gets too large? Is there a way to just read a certain segment of select data than loading the entire file, or do I need a database for that?
JSON doesn't allow you to add ad hoc logic in the middle of dialogue.
You have the right idea and the principle is fine, but you wanna look for a localization library that helps you deal with this, mostly because you don't want to use strings as keys but something that your IDE can catch if you have a typo (like enums)
I'll only need ca. 60-80 things in 5 different languages and it felt like installing an extra library just for that would be bloat
That's the obvious approach. Not that much better than a big switch and performs an order of magnitude worse.
Big switch is easier to change, safer and faster than most of the recommendations here like this tard
that wants to use a json file.
>People rediscovering the expression problem discourse.
Nothing ever changes in this shit field full of zoomer fricks.
>dialogue hard coded
no way this code is hand written. this has to be the output of some code generation process.
"if it works it works" Black folk when they have to change 1 thing retroactively and the whole spaghetti collapses into an incomprehensible mountain of problems that is impossible to debug
Kindly explain how this structure makes it hard to change things. Pro tip: you can't.
But how would this break?
It's just using a game state counter, which basically every game uses, to trigger global messages when the counter hits certain numbers.
Can you rephrase this without the n-word please. I want to share this to my company slack. A thousand thank yous in advance sir.
Ashktually using json would be much faster and easier
You don't store program code in JSON. Also
It would not be faster during execution.
PHP associative arrays are much faster than parsing json every time someone loads your website. Now for small amounts of text, it doesn't really matter.
Hit indie games that make their creators millionaires are made by brainlets who are coding only because they have to
This is would be a problem if the game didn’t have ridiculously long turns full of flashy animations.
string comparison is O(1) in lua btw, so this is the same as comparing the values to an enum value
Art and music are the real barriers to vidyamaking.
Also design and story writing. So basically everything except programming, which is janitorial work that anyone can learn, or anyone who already knows how to do it can just do it.
How do you know it's not just generated code?
lmao IQfy seething because someone wrote actually useful code and it's not "clean" or "written in rust" or "functional" or whatever weekly meme
Reading SICP didn't taught them how real life works
sad 🙁
>didn't taught them
esl moron
Pascal is my first one no bully >:(
couldn't have summed it up better
t. print debugger
He probably has all the dialogue in some kind of plaintext file that he then reads in with a script to generate that huge source block. He's not literally going through it going "okay here's case 1000 umm so msg[0] = ... yep then msg[1] ok now case 1001..."
I'd imagine the switch gets optimized into a jump table so there's no runtime cost either.
>poorgays seething
>decompiled code
the best code is the code that ships 😉
he's right
i hate worrying about implementing anything because "it might not be the right way to do it"
its much faster to implement things intuitively and fix problems as they arise
especially as a single guy working on a project
What you're supposed to do is write sloppy the first time when you're prototyping, refactor for speed and ease of use when that starts to slow you down. You know, when you start spending an hour doing fricking copy paste monkey work because you decided to add a new line of dialog.
What's the alternative then, genius?
map?
product over code
every single time
LOL. Well he made it work, good for him, can't be mad about that
Why does discovering something you didn't know was unoptimized is unoptimized suddenly send this board into a frothing fury?
never done game dev.
Definitely would not do this because it seems like a pain in the ass.
What would you do though?
Simple case of it just works. Switch statements are fast and works. He never meant to change it or expand on it.
If you work at a big corporation, sure, go all design pattern autism on your code. If you need to get shit done, do whatever it takes.
I find the lack of aliases disturbing. Those magic numbers makes me feel uneasy.
Other than that? It's fiiiine to some extent.
Yandev is still shit
>like every interesting procedure, it's a case analysis
Honestly it isn't that bad. Undertale is a pretty dialogue heavy JRPG so I can't really think of a better way to manage dialogue than a giga sized switch case. Remember, each dialogue instance in Deltarune can be affected by choices you've made, so it's probably the easiest, fastest and most maintainable way to manage the dialogue in the game.
It's not like it has a performance impact, it's just a switch case.
This runs every time a dialogue box opens.
How else would you do it?
It's the same thing as Yandere Sim, it's not going to be an issue regarding performance, but it's going to be incredibly hard to maintain. Unlike Yandere Sim, this is a 2D game with tons of dialog, minimal design and animations, so there isn't too much to render.
>but it's going to be incredibly hard to maintain
It's not though. It's no harder to maintain than any of the alternative approaches in this thread. Stop listening to moronic Clean Code gays.
>bro there's nothing unsustainable by wrangling index pointers to different conversations
Conversation 1 links to conversation 254 which links to conversation 950 which has two branching conversations: 1059 and 2. This strategy is very sustainable.
You can group conversations in a switch just as easily as you can group then in a hashmap or JSON file or whatever other bullshit has been proposed in this thread.
>bro just wrangle the 60,502 switch statement conditions
> bro just wrangle the json file with 60,502 entries
You'd either use a node tree editor or a human editable file format, moron. You know, something that doesn't require you to memorize Conversation IDs or punish you for wanting to change the flow of dialog or adding another message.
A switch doesn't make you memorize conversation IDs moron. You must be a braindead user of dynamically typed programming languages.
A switch DOES make you memorize ids (conditions), moron. Also congratulations, you made your game twice as hard to translate.
It does not. You're moronic and have no idea what you can do with a half decent type system. All of this could be statically typed and a decent approach would ensure that translations are exhaustive.
You literally can't win in these situations. You either get people going
>haha if else statements for miles
>lol look at this switch case
Almost like hard coding dialog trees is a moronic way to manage dialog in an RPG.
What about
>bro someone bought a lottery ticket in a gas station and won a million dollars, that must mean buying lottery tickets is smart!!
You're not that person, don't do stupid shit.
So no real arguments against them other than it's not how you would do it. Crab.
Toby Fox is a unconventional artist that was in the right place at the right time, not a remarkable programmer. Still most of his games aren't complex generative dungeon crawlers or anything.
>global
Mother of based. I need to suck Toby Fox's dick to get a taste of those coding god genes!
switches are fast, so there is really nothing wrong with this. far better than yanderedev's if-else tree
>it's real
and they say indians can't code, what a fricking moron
game "devs" are actually worse than indians
that's why modern games are full of bugs and run like shit
you can count on maybe two hands the number of open source games on github that are well programmed
This amount of data is going to get ugly no matter what. Using something like JSON is just trading one ugly for another, and then you'd lose support for inline scripting.
Maybe I'm moronic, but couldn't this be the result of compilation and decompilation?
Code and Data aren't normally stored together in memory, they're usually stored in section for execution and a separate section for data. I can imagine a compiler storing all strings in continuous memory, and a decompiler looking at that as if it were some type of jump table, and then spit out that it's a giant switch case.
I can also see whatever game engine was used tried to optimize them as a lookup table of strings instead of holding the address to the string itself. So it can reference string 0 or string 1 in an attempt to either reuse some bit of code, avoid storing full addresses in memory, or implementing some form of position independant code/data.
But again, maybe I'm just moronic and don't know how computers work.
Shipping is the only thing that matters in life. It doesn't matter if you got a trillion dollar super optimized idea that you're working on, if you never ship it.
Ship it
Ship fast
Ship faster
Ship fastest
Optimize only after you ship it. Optimize conservatively. And then aggressively
that's exactly what ChatGPT's code looks like ,but instead of thousands of lines, it has trillions of cases in a single switch statement
This is unmaintainable. But its unlike writing chess or IsItEven in fricking switch statements for every possible input. Now that's moronic
>unmaintainable
>maintains spot as top indie title for years
Skill issue.
>copying earthbound and appealing to furnigs is skill
kys
You will never be successful.
Everyone knows who Toby Fox is.
Nobody knows your name.
Anon.
Nobody knows the israelites influencing your shithole country either.
>you will never be a washed up fotm eceleb that nobody except lgbt autists actually know
thank god
NOOOOOOOOOOOOOO IT DOESNT COUNT!!!
>This is unmaintainable.
I really don't see how.
>need to add new global messages
>add more game state values to the game state counter
>add more cases with the messages to the switch case
I see no problem with it.
Would be a big problem if he did it using IF ELSE statements.
I see no problem with long switch cases.
But wtf is that hardcoded number 736?
I would have used an enumerator.
it is completely unmaintainable. if you decide to stop using a shitty global variable for your msgs then you have to change 10s of thousands of lines of code
big stupids:
I'm going to explain why the code is shit:
You don't put text messages hardcoded into the source code.
He could have created an XML, with a code column, and a message column.
Then the code would load everything from the XML into the memory.
What if he wants to change the language to spanish. With the current method he has to rewrite everything inside the source code and then recompile.
If it were an external file, all he would have to is load another language file.
It is totally ok to use long case switch, but at least create an enumerator to do so.
>What if he wants to change the language to spanish. With the current method he has to rewrite everything inside the source code and then recompile.
still less gay than dealing with XML
>What if he wants to change the language to spanish
switch(language) {
case spanish: /* spanish */
default: /* english */
}
>He could have created an XML, with a code column, and a message column.
>Then the code would load everything from the XML into the memory.
There is zero point to this, you're just complicating things for no reason.
>What if he wants to change the language to spanish. With the current method he has to rewrite everything inside the source code and then recompile.
Ah yes, I haven't even released my game yet but I'm gonna localize it into Swahili.
In the unlikely case that anyone ever asks for a translation, just copy the file and translate every line. The game is done and you're not going to add any more dialogues anyway.
The fanciest I'd ever get is some Qt-style tr() function, but adding that in after the fact is very easy.
>He could have created an XML, with a code column, and a message column.
I don't see how turning the code into a slurry of XML tags would improve things. Additionally, there'd need to be some way to add conditions, along with whatever else he used inline scripting to accomplish.
>What if he wants to change the language to spanish.
This can be put in another file with its own frick-huge switch statement.
>With the current method he has to rewrite everything inside the source code and then recompile.
Recompiling isn't a big deal, bro. Just press F5. It's not rocket science.
>I don't see how turning the code into a slurry of XML tags would improve things. Additionally, there'd need to be some way to add conditions, along with whatever else he used inline scripting to accomplish.
>y than dealing with XML
>There is zero point to this, you're just complicating things for no reason.
Wow, so many morons.
You can use any fricking XML editor to change the text.
Whoever is editing the text doesn't even need to be a programmer, you can give the XML file to any translator to get the job done.
Has anyone here ever worked with software development?
>You can use any fricking XML editor to change the text.
great. now we have to waste more cpu time parsing xml Black folkhit.
>Has anyone here ever worked with software development?
you haven't.
>i don't want to eat shit
>but you can get it from ANY animal's ass!
>I'm going to explain why the code is shit:
>recommends making it worse by using xml
weeeew lad. wew.
>I don't see how turning the code into a slurry of XML tags would improve things.
it wouldn't improve anything
I will never understand the appeal of this homosexual game. You need to be a massively gay moron to enjoy a game like undertale.
It's somewhat innovative, subversive on many layers aka meta, with kind of fun characters, really well written story and cleverly constructed world. Sure you might dislike it because of fan base or cutesy message in the true ending, or the lesbos, but the game still is solid. And I'd even say deep, if you really dive into it.
I don't care about programming or games for poofters, this thread doesn't interest me at all.
The world is simply not fair.
Get over it.
good code is the enemy of done code
games are disposable just get it done any way you can. though surely other methods would have been easier he didn't know them and still finished it.
Undertale sucks ass so it doesn't surprise me that the guy is a technical moron in addition to everything else
I can't tell if this one of those rage bot farms or the morons praising this code are serious and just idiots. they make like 3 logical fallacies in a row to justify this crap.
to the idiots defending this shit, show me YOUR garbage code that makes you millions. ill wait.
IQfy and the internet has a problem with non-programmers thinking theyre programmers. if you've output less than 10,000 lines of code, stop talking about programming. stop posting in language wars threads. stop talking about programming paradigms. you do not, and I repeat this again, you DO NOT KNOW what you're talking about. you ARE an armchair expert with 100% certantity if you have written less than 10k loc. i dont care how many wiki articles youve read and coding streamers youve watched
>i can't think of a better way to do it so...
yes, we know. you arent a programmer. we fricking know.
So... where's your opmitized code that made you millions?
where's your massive switch case that revolutionized the industry?
with this approach you will have one in a million successful game, and the rest will be bad games with a lot of bugs and performance problems. not really a good advice.
sucks to be oblivious to statistics.
> performance problems
With basically any compiler in the last 50 years the switch statement is faster than all other approaches by far.
this 100%. if its badly coded indie shit its le based. iif its a badly coded aaa game it will lag and suddenly its the archnemesis of gamers
>IQfy shits on YandereDev for using long elseif statements instead of switches
>IQfy shits on Undertale for using long switches
So what the frick am I supposed to use in cases like this? I'm learning so please tell me because I want to exercise good practices
Key based file parsing. That's essentially what that is anyway
class MessageGroup {
static msgDatabase = new Map<number, MessageGroup>
static fromJSON(filename: string): MessageGroup{
//parse from file
}
static fromID(id: number): MessageGroup{
return this.msgDatabase.get(id)
}
readonly messages: string[]
constructor(conversationID: number, messages: string[]){
MessageGroup.msgDatabase.set(conversationID, this)
this.messages = messages
}
show(){
//show
}
}
//old
const messageID = 69
switch(messageID){
case 69:
shit.msg[0] = "sneed"
shit.msg[1] = "feed"
//repeat 1000
}
//new
const messageID = 69
const msg = MessageGroup.fromID(messageID)
msg.show()
This isn't any more maintainable and is slow as frick compared to the switch.
wrong on both
You can make a function that returns the message based on an argument param with the switch just like your class method. The switch will also be compiled into a perfect jump table which will be far faster than using a Map. The huge JSON file that you conveniently left out is also no more maintainable than the switch and does even less static checking.
places where you're wrong:
- the switch will not get compiled to a jump table, this is game maker not cpp. it will probably be an if-else that checks each and every case each time. the map is probably faster
- json, yml, xml, etc get checked by both your ide and when parsed so there isnt less checking
just stop talking moron you haven't done this before.
> gamemaker
Your fault for using moronic trash.
> there isnt less checking
There is less checking. In the JSON file you could replace a string with any random type and it wouldn't complain. It also isn't even parsed until runtime. What your shitty IDE does is completely irrelevant.
>Your fault for using moronic trash.
you mean toby's fault because this thread is about his undertale game maker code? kek you really are clueless and getting angry.
>In the JSON file you could replace a string with any random type and it wouldn't complain.
you can write an extra line of code to type check it in the 0.001% chance you wrote the number 4 instead of your string
kek dude just stop posting you're getting desperate
>you can write an extra line of code to type check it
I accept your concession.
coping so hard. also in the toby dogshit code you can have a massive error by getting the indexes wrong and there would be no error even at runtime just silently missing dialogue you could miss. you have no arguments and i have hundreds. you found yourself talking about something you know nothing about with someone who does and now you're fricked kek
>you can have a massive error by getting the indexes wrong
Switches can have a default case. You can easily have the same problem with your frick-huge json file that even you yourself have admitted is less safe and more error prone.
>you can have a massive error by getting the indexes wrong
not talking about that one, talking about the on used to index global.msg
you're so clueless and confused dude. i hope youre a teen because if youre an adult and this stupid.........
You're getting so emotional and have yet to give a single reason why your 10,000 line JSON file is more maintainable even though you've already admitted that it's slower and more error prone. You're pretty much the typical clean code advocate.
nah its faster after parse and far less error prone, you just lost an argument and are now trying to save face by not understanding anything, or are just actually dumb
confession denied.
you don't even have to edit source code to maintain one that parses from a file. it is by definition 0 maintenance you are moronic
Editing source code is not a significant problem moron.
Where is the part where it handles dialogue options?
ok. and to the incels trying to get an own in, i would probably end up changing this as the game went on but the difference between mine and little toby's is that mine can easily be completely changed in a few seconds
class MessageGroup {
static msgDatabase = new Map<number, MessageGroup>
static fromJSON(filename: string): MessageGroup{
//parse from file
}
static fromID(id: number): MessageGroup{
return this.msgDatabase.get(id)
}
readonly messages: string[][]
constructor(conversationID: number, messages: string[][]){
MessageGroup.msgDatabase.set(conversationID, this)
this.messages = messages
}
show(dialogueChoice: number = 0){
//if no dialogue choice, put all messages in 0
const selectedMessages: string[] = this.messages[dialogueChoice]
for (const message of selectedMessages) {
//put it in the dialogue system
}
}
}
//old
const messageID = 69
const dialogueChoice = 3
switch(messageID){
case 69:
if (dialogueChoice == 0) {
//sneed
} else if(dialogueChoice == 1){
//feed
} else if(dialogueChoice == 2){
// this is so garbage
} else if(dialogueChoice == 3){
shit.msg[0] = "sneed"
shit.msg[1] = "feed"
}
//repeat 1000x
}
//new
const messageID = 69
const dialogueChoice = 3
const msg = MessageGroup.fromID(messageID)
msg.show(3)
It needs to handle much more complicated cases than that. The game makes extensive use of inline scripting for dynamic dialogue. If you want feature parity, you'll need to basically re-implement large parts of GML.
Don't believe me? Take a look for yourself. This is the decompiled script:
https://web.archive.org/web/20230126032521/https://github.com/marciniuk/undertale/blob/master/scripts/SCR_TEXT.gml
Inline scripting makes it even more cancer. As has been already been said, you *can* do it this shit way, but he probably spent way too many hours managing the shit show. He likely spent 3x or more time on dialog than he should've which makes me think what compromises he made along the way.
>Inline scripting makes it even more cancer
And what's the alternative? Adding a bunch of extra control codes? That's a lot of extra work just so you can put the script in a text file.
Its been explained. If you can't understand from that, don't talk about programming.
You shouldn't put scripts in a text file. That's amateur hour shit.
have a nice day moron
its fine, any example given can be retrofitted and will work better than toby's shit. and if something really generic is needed you can use a lambda. im not just going to code a full dialogue system for IQfycels, i already rewrote everything posted in this thread better.
You can swap the number map to an array making it as fast as a pointer table to shut the maps-are-slow idiot up but otherwise its good.
It's gamedev. You don't do best practices, you hammer shit out until it compiles and stops stuttering at runtime.
>>IQfy shits on YandereDev for using long elseif statements instead of switches
Yanderedev's code is trash but simply using switch statements won't fix it. The biggest issue was that he was encoding states using strings and that wasn't even the main cause of the poor performance, which was actually caused by things like toothbrush models containing the highest polygon counts.
>The biggest issue was that he was encoding states using strings
Literally zero problem with that
Witnessed == WitnessType.BloodInsanity is 18 times faster than Witnessed == "Blood and Insanity".
and a typo can break your whole program.
needs to suicide
not in c#. c# has interned strings and Witnessed == "Blood and Insanity" becomes a comparison of 2 pointers
I didn't know that, but still the compiler won't complain if you've made a typo in the string but it definitely will complain if you've done the same thing with an enum name.
It used to be a joke making fun of bad programmers but now that's 99% of IQfy its just gotten absurd as you can see
The bad programmers are the ones that follow Clean Code and create horribly abstracted slow bullshit.
nah they've made literal billions of dollars off that code. lets see your shit.
No they haven't. Uncle Bob and his troony followers are poor.
yea dude faang is poor kek
Other than Netflix FAANG companies ignore most of this shit. Spring, RoR and all the clean code nonsense is banned at Google and Meta and Uncle Bob is considered a lolcow.
Casey is right.
Massive, massive cope. corps are the sole source of clean code
There are 10,000 line switches in Google's mono repo.
OMG WE BETTER TURN THIS INTO A BUNCH OF SEPARATE CLASSES THAT IMPLEMENT AN INTERFACE AND USE RUNTIME BASED POLYMORPHISM
and there's a 30 deep inheritance hierarchy in one of meta's open sources. your point?
That most web and desktop developers are drooling monkeys and have no room to criticize game devs
The performance problems is because he was doing this bullshit in Update() in Unity and every single entity was basically doing 99% erroneous checks literally every frame instead of having event based checks. In Unity in particular one of the easiest performance boosts is avoiding putting anything in the Update() function.
>it's unmaintainable
Who needs to maintain it? It's a game that isn't going to change.
Oh, I get it. You can't modify it to ride his coat tails.
Somehow I doubt it.
If this is disassembly it literally means nothing. The case statements being immediates is sussy as hell.
so is undertale the Zoomergen's 90s JRPG equivalent or something I never got the appeal
seems like a lot of weird trans shit imagery in there.
It's zoomer earthbound pretty much.
earthbound never really had that popularity, so I'll say it again it's like zoomergen's 90s JRPG
90s JRPG also didn't had that popularity. Undertale is one of the most popular games in the world.
>didnt have that popularity
You have to account for the differences in scale first with the population being nearly 60% higher in 2015 and the proliferation of easier access to vid game consoles (a SNES game cost $30-50 USD in the early 90s) but even then Earthbound sold less than half a million units by year 2000 outside of Japan.
The quad-game trio of FF6, 7, 8 and 9 sold nearly 10 million units by that same time. Earthbound, again, was bought by far, FAR less than half a million people outside of Japan.
So again, I know you were saying "it's like Earthbound!" as a game, I was saying "it's the 90s JRPG game for Zoomer generation"
All code is shit code. The difference is ones that recognize that there code is shit and those who think there code is the greatest shit ever (its not).
This works but it's mostly just turned out into a data structure and probably isn't optimal or is some sort of compiler optimization. The shit in yandere Sim is something else; it's pedo code.
>https://www.polygon.com/2020/1/13/21064100/vvvvvv-source-code-game-development-terry-cavanagh-release/
Same thing here for the game VVVVVV.
that one's different and ok its basically a state machine
It's the same thing, just at an earlier stage.
no its called a state machine you fricking jeet. op code is just being too moronic to have a real lookup table
That is because it was originally a flash game and it was easier to do this monstrosity than rewrite the whole thing
Either you're a competent developer or you have a soul
The price for being a good developer is having your soul sucked into oblivion, which would have rendered toby fox incapable of finishing undertale
Ctrl+F: CSV
Not a single reply...
Just do like Unreal Engine 5, and store it on a CSV file.
You can edit the CSV inside Excel.
That's it, the easiest way is using CSV to store.
Any other way is for noobs.
~~*Game of the year*~~
meme all you want about GNOME and wayland etc, but everyone knows that ElementaryOS is the biggest meme in linux. Seriously who uses this shit?
>replies with no context off-topic
This whole thread is just Pajeets calling people who don't subscribe to their moronic Pajeet coding trannies. If you think this is acceptable, you are a fricking Jeet and that's the end of the story. This new trend of calling good code "troony" reeks of fricking curry.
Yes, it's insane, if wonder if it's all the same pajeet seething about clean code.
idk dude. the anti-clean code movement on IQfy has like 1% good coders advocating for decent code and 99% idiots saying op code is genius because they can actually understand that one with their 2 weeks coding experience
Jeets refuse to use switch statements and use maps for everything despite how terrible they are for performance.
USE THE BLOODI SWITCH STATEMENT SAARS
MAAM YOU CLEAN IT UP WHY YOU DO THIS? WHY DO YOU THIS? MAAM. MAAM WHY YOU BLOODI DO THIS?
and there's loads of jeets or jeets in spirit going >it works i don't care if its shit and runs like ass if its gets me dat money
but then turn around and complain the modern internet is a laggy buggy crashgrab. huh its almost like quality means something. but hell if it accelerates the collapse of the american empire let the zoomers write the shittiest code imaginable
There's nothing "clean code" about telling you you're fricking moron hard coding your dialog tree of 100,000 words as a switch statement.
Instead you should put it in a 100,000 word json file that has basically all the same problems including the fact that it's slower and has even less type checking!
What are you talking about? That would be way better. The gml code in the op is going to be slow as shit with unoptimized switch statement and also there's a lot of benefits and headache savers to putting it in a file.
> unoptimized switch statement
kek
You think gml actually uses jumptables?
GML these days gets converted into C++ and compiled. But either way, it's not a performance issue as far as I'm aware.
>The language's default mode of operation on native platforms is via a stack machine; it can also be source-to-source compiled to C++ via LLVM for higher performance.[26] On HTML5, GML is source-to-source compiled to JavaScript with optimizations and minification applied in non-debug builds.
yea still, i don't think undertale used the llvm mode. js definitely will not use a jump table. it *might* be *fine* if you set it up right, but its going to suck a lot of the time. i can think of 2 ways to do it faster.
anyway performance doesnt matter much with pixel indie shit, the problems with the code are more to do with other things.
And reading through the thread it seems i'm arguing with a pajeet that already got told off earlier multiple times
v8 will convert it to a jump table if all keys are either integers or strings.
i use troonyfox
YEAH ANON JSON IS THE ONLY WAY TO SAVE TEXT AS A MANAGED HUMAN READABLE FILE
Putting the script into an external file would turn dirty code into a dirty file. Just face it. Game scripts are large and messy. There's no way around it. It's never going to be something you can express as a pretty little one-liner.
see
your switch statement will never be good toby
The difference is you can have a text file that doesn't mix code with dialog. And even better, you can make a parser that validates and tests your dialog system too so you can ensure there's no dead paths. You know, because you're fricking doing spaghetti string bullshit anyways.
what am I reading. toby fox doesn't even code he just used rpg maker
Who cares if its fast and slow when its written this bad? The amount of people who watched that Muratori video and took the wrong takeaway is staggering. i'm starting to hate the guy not because his opinions are bad but because there's a new legion of idiots misunderstanding his ideas and saying the dumbest shit.
Nobody is misunderstanding anything. People are having a laugh because you clean code homosexuals love to claim things are unmaintainable and that your way is better but when pressed you can't substantiate that with evidence or even a remotely decent explanation. You're brainlets that just regurgitate nonsense from people that think RoR garbage is the pinnacle of programming.
Nobody actually gives a shit about this switch case bullshit.
hope jeetcode switch casers aren't laughing, because itt not one of them has provided solid evidence for why using a 1000 long switch case for dialogue is ok. they're total fricking tools. complete idiots
>they
It's literally all one jeet, probably OP
>dialogue is ok
Their evidence is the tens of millions of dollars they made from their game that performs well on a flip phone from 2002.
Nobody cares about the switch moron. The funny part is that you can't actually explain why it's bad.
>Their evidence is the tens of millions of dollars they made from their game that performs well on a flip phone from 2002.
java has clean code-tier principles baked into the lang and also has generated trillions of dollars and actually did run on 2002 phones unlike this
>Nobody cares about the switch moron
the entire thread is about the switch. most posts are about the switch. in fact, i care about how bad this specific switch is more than any coding philosophy argument
>The funny part is that you can't actually explain why it's bad.
done multiple times:
how bad faith are you lmfao
We're laughing at the people that don't know how to code who watched a casey video and now are convinced switch cases are the savior of the white race and need to come on here to culture war about that.
Not nitpicking and just doing it is a valuable skill
I am trying my hardest to learn it. Perfectionism is unironically my biggest problem.