[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: g_btfo.jpg (152 KB, 1170x1418)
152 KB
152 KB JPG
/g/ BTFO
>>
are you actually fucking kidding me
is every line of dialog in the entire game just a case in a fuckhuge switch statement
>>
>>100157258
apparently :)
>>
>>100157258
He used the time of learning programming to actually make a game and make clean exit
>>
>>100157258
there's literally nothing wrong with it
>>
File: 1704292621964951.jpg (64 KB, 1024x768)
64 KB
64 KB JPG
>case 736
>if global.choice
>>
>>100157276
>>100157273
>>100157271
i mean, if it works... doesn't make my head hurt any less though
>>
>>100157278
This case is more profitable than combined /g/ codes altogether.
>>
>>100157287
>no code reuse
>not extensible
It's garbage.
>but muh money
Not a property of the code itself
>>
If they wrote it correctly then they would have had more time to make it even better.
>>
undertale is perfect as is
more =/= better
>>
>>100157287
>codes
wtf zoomer, leave this board immadiately
>>
>>100157308
clean code tranny triggered
check nearest food bank for help
>>
>>100157308
Looks extensible to me, just add another case.
This is also what peak code reuse looks like. Seriously, think about it.
>>
>>100157276
>>100157287
>>100157353
>>100157397
>>100157400
Kill yourself
>>
>>100157405
What's your problem?
>>
>>100157409
he is poor because he fell for code re-usability and extension and forgot to get things done
>>
>>100157405
based shut that cringe shit up. this code is fucking garbage, you can't write code much worse its not possible. javabeanfactorysingleton is miles better
>>
Indie devs aren't real developers
>>
>>100157440
Seriously I want to murder the "dev" with my own bare hands.
The fuck is this garbage.
>>
>>100157445
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)
>>
>undertale
>goty
lmao
>>
File: 1713954737265.jpg (66 KB, 951x1029)
66 KB
66 KB JPG
What would you do instead of 1000 line switch statement?
>>
No one can explain why this is LE BAD
>>
>>100157445
>>100157440
>>100157457
Enjoy starving while non-real-developers make money and provide real value to real people
>>
>>100157405
>>100157440
Well, as /r/3DCG says:
Post your work!
>>
>>100157457
>>100157440
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)
>>
>>100157475
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
>>
>>100157498
Let's see all the great things you've built with your superior knowledge.
>>
>>100157497
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.
>>
>>100157475
999 if/else statements
>>
>>100157485
That's because it isn't.
>>100157471
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
>>
>>100157238
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.
>>
>>100157510
This is one of my open source projects
https://github.com/shrimpcast/shrimpcast
>>
>>100157510
several things that make money actually. and you haven't built shit because you can't code at all
>>
>>100157512
>>100157519
Are you retarded? 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
>>
>>100157535
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.
>>
>>100157238
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
>>
>>100157535
Yup, and the resource file is the executable.
Seethe harder faggot.

Also post your work.
>>
>>100157238
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.
>>
>>100157278
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
>>
>>100157573
>Yup, and the resource file is the executable.
No it's not, you dumb nocoder.
>Also post your work.
See >>100157522
>>
>>100157577
>repeating the exact same code for over 1000 cases is ok to me
Immediately kill yourself
>>
>>100157585
Oh wow! An MVC app! Soo complex! THREE controllers? Wow, I kneel.
Try to make a game next time.
>>
>>100157475
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
>>
>>100157535
>can't see an obvious joke post
>calling anyone else retarded
So this is the power of autism...
>>
>>100157522
>1 star
> Battle-tested
XD

You're trolling, don't post someone else's github to humiliate him.
>>
>>100157595
Is the dialog repeated at all?
>>
>>100157238
So im guessing this game has not been released in a language other than english then?
>>
>>100157612
It's a streaming platform, it uses sockets, not controllers. Dumb nocoder cunt.
>>
>>100157630
It's my own streaming platform which I made to run a stream and I've peaked at 240 users
>>
File: 1686455930231807.png (17 KB, 994x499)
17 KB
17 KB PNG
Nobody defending this actually has a job in the industry.
>>
>>100157637
Woah! Full-on SOCKETS?
I kneel.
>>
this tumblrtale cunt seething lmfao
>>
>>100157648
ITT full of dumb nocoders who've never written a single line of code
>>
>>100157238
>to launch games you NEED bad coding, it's IMPOSSIBLE to be good!
Aspastic retard 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.
>>
>>100157655
Post github
>>
>>100157670
I just hope that him and everyone itt dies a painful death
>>
>>100157635
>So im guessing this game has not been released in a language other than english then?
Why do you think there is 1000+ dialog?
>>
>>100157308
>extendible
Why do /g/trannies 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.
>>
>>100157715
Holy shit since when are there so many retards on this board? Kys techlet
>>
>>100157635
It has. There's an official japanese translation.
>>
I am just gonna write the same code 1000 times and that's a totally best practice, yes.
>>
>>100157308
>>no code reuse
>>not extensible
Why does that matter? His game is written in gamemaker, he would be better be of rewritting it anyways.
>>
>>100157238
Sometimes code is better than structured data, because code can handle arbitary logic such as the if statements seen in the excerpt.
>>
>>100157722
/!\ Don't listen to this guy, he has never shipped anything. I repeat, he has never made a completed game ever.
>>
>>100157740
>His game is written in gamemaker
Hahah lmfao fuck me
>>
>>100157748
>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, retard
>>
>>100157750
>Hahah lmfao fuck me
https://gamemaker.io/en/showcase?title=undertale
Here is if you don't believe me.
>>
>>100157764
>I'm not a game dev, retard
Then don't speak.
>>
>>100157769
I believe you and it's absolutely bonkers
God I hate these non-dev retards
>>
>>100157741
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.
>>
>>100157775
Don't worry, whatever skid that wrote the same code 1000 times isn't a game dev either
>>100157741
Retard
>>
ITT wagecuck developers seething
I hope your bosses will appreciate your efforts and give you 3% salary increase this year
>>
>>100157777
Yet he has more than 240 peak users.
How strange...
>>
How sure are we that this is human-authored source code and not the output of a decompiler?
>>
>>100157775
>Doing things that are bad practice in general in all types of programs
>>Then don't speak.
Why are you this delusional?
>>
>>100157783
The dumb nigger that made this "game" probably doesn't even know what a lambda/callback is
>>
>>100157810
He's a nocoder retard/tranny shill/troll/etc, either way he should kill himself
>>
>>100157794
ITT MVC codelet seethe that someone can make a better product than he ever will without concerning himself with (((aesthetical))) bullshit.
>>
>>100157829
>codelet
You're the codelet defending a 1000 case switch
Are you retarded or what?
>>
>>100157811
Yet, he made millions $$$
But sure, knowing what's a function pointer is makes you a better person than him.
>>
>>100157829
Also I told you that's just one of my open-source projects, I'm actually employed you tranny techlet freak
>>100157838
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.
>>
>>100157848
Woah you're employed!! I'm employed too!!! We have so much in common!
Stay with your jealousy, he is in his jacuzzi.
>>
>>100157238
furry bait has nothing to do with game code.
Kill yourself.
>>
>>100157865
Yeah but you're not SwE so what are you doing here, retard?
>>
this kid thinks he's owning the cs chuds instead of looking like the biggest retard
>>
>>100157838
>he made millions $$$
People make millions doing all kinds of bullshit. It's not an argument you fucking retard.
>>
>>100157879
No I'm not from Sweden.
Are you from India (・3・) ?
>>
>>100157911
>he doesn't know SwE means software engineering
The absolute state, genuinely kill yourself
>>
>>100157579
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.
>>
>>100157919
you're from India, I knew it.
Good morning sir.
>>
>>100157935
Projecting as usual, rajesh?
>>
>>100157899
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.
>>
>>100157238
>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/"
// ...
>>
File: one_file.jpg (256 KB, 1536x2048)
256 KB
256 KB JPG
>>100157238
What's wrong with huge switches and huge if else cases if your game requires it? How can you do it better?
>>
>>100157238
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?
>>
>>100157954
>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.
>>
>>100158060
Pretty much the standard but it should be in an external JSON file
>>
>>100158060
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)
>>
>>100158109
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
>>
>>100158131
Imagine you have a thousand labels, you're not going to hardcode a thousand labels, right?
>>
>>100157238
>People rediscovering the expression problem discourse.
Nothing ever changes in this shit field full of zoomer fucks.
>>
>>100158109
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?
>>
>>100158127
>>100158140
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
>>
>dialogue hard coded
no way this code is hand written. this has to be the output of some code generation process.
>>
File: 1694754251737916.jpg (30 KB, 500x601)
30 KB
30 KB JPG
>>100157238
"if it works it works" niggers when they have to change 1 thing retroactively and the whole spaghetti collapses into an incomprehensible mountain of problems that is impossible to debug
>>
>>100157238
Ashktually using json would be much faster and easier
>>
File: 20240423_222059.jpg (292 KB, 1080x1926)
292 KB
292 KB JPG
>>100157238
Hit indie games that make their creators millionaires are made by brainlets who are coding only because they have to
>>
>>100158488
Kindly explain how this structure makes it hard to change things. Pro tip: you can't.
>>
>>100158594
This is would be a problem if the game didn’t have ridiculously long turns full of flashy animations.
>>
File: IMG_1184.jpg (52 KB, 842x477)
52 KB
52 KB JPG
>>100157238
>>100157258
>>100157405
>>100157440
>>100157445

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.
>>
>>100158488
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.
>>
>>100158668
The game you posted was made by two people who had an "autistic obsession with source code from better men"
>>
Kinda based tho
>>
How do you know it's not just generated code?
>>
lmao /g/ seething because someone wrote actually useful code and it's not "clean" or "written in rust" or "functional" or whatever weekly meme
>>
>>100159144
Reading SICP didn't taught them how real life works
sad :(
>>
>>100159144
couldn't have summed it up better
t. print debugger
>>
>>100158577
You don't store program code in JSON. Also
It would not be faster during execution.
>>100158131
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.
>>
>>100159412
>didn't taught them
esl retard
>>
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.
>>
>poorfags seething
>>
File: 1713721229676476.gif (835 KB, 280x280)
835 KB
835 KB GIF
>>100157809
>>100161067
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 fucking reddit.
>>
>>100157238
>decompiled code
>>
>>100158594
string comparison is O(1) in lua btw, so this is the same as comparing the values to an enum value
>>
the best code is the code that ships ;)
>>
>>100157276
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.
>>
>>100157287
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.
>>
>>100157238
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
>>
>>100161336
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 fucking copy paste monkey work because you decided to add a new line of dialog.
>>
>>100160995
Pascal is my first one no bully >:(
>>
>>100161334
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.
>>
>>100157644
>I've peaked at 240 users
pervert
>>
>>100157644
Feet stream when?
>>
>>100158594
Art and music are the real barriers to vidyamaking.
>>
>>100157238
What's the alternative then, genius?
>>
>>100157238
product over code
every single time
>>
>>100161519
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.
>>
>>100161540
map?
>>
>>100157238
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?
>>
>>100157579
>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.
>>
>>100157475
I would listen and thats what no one did.
>>
>>100157475
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.
>>
>>100158060
That's the obvious approach. Not that much better than a big switch and performs an order of magnitude worse.
>>100158488
Big switch is easier to change, safer and faster than most of the recommendations here like this tard >>100158109 that wants to use a json file.
>>
>>100161992
Teaching brainlets hashmaps was such a mistake.
>>
>>100161287
>"Spaghetti shit code KILLS projects"
>project proceeds to net ~$26mil
>>
>>100157238
never done game dev.
Definitely would not do this because it seems like a pain in the ass.
What would you do though?
>>
>>100157238
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.
>>
>>100157238
I find the lack of aliases disturbing. Those magic numbers makes me feel uneasy.
Other than that? It's fiiiine to some extent.
>>
>>100157238
Yandev is still shit
>>
File: gjs.jpg (14 KB, 206x300)
14 KB
14 KB JPG
>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?
>>
>>100158109
JSON doesn't allow you to add ad hoc logic in the middle of dialogue.
>>
>>100158140
>Imagine you have a thousand labels, you're not going to hardcode a thousand labels, right?
Why not?
>>
>>100158668
>zoomer spacing
fuck off underage b&
>>
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.
>>
>>100164462
>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 retarded Clean Code fags.
>>
>>100162127
>survivorship bias
Anon, when a project fails it doesn't even become a game. Undertale is a one in a million game project.
>>
>>100164550
>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 literally can't win in these situations. You either get people going
>haha if else statements for miles
>lol look at this switch case
>>
>>100164627
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.
>>
>>100164767
>bro just wrangle the 60,502 switch statement conditions
>>
>>100164760
Almost like hard coding dialog trees is a retarded way to manage dialog in an RPG.
>>
>>100157238
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.
>>
>>100164888
What about >>100158594
>>
>>100164852
> bro just wrangle the json file with 60,502 entries
>>
>>100164926
You'd either use a node tree editor or a human editable file format, retard. 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.
>>
>>100164921
>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.
>>
>>100164946
A switch doesn't make you memorize conversation IDs retard. You must be a braindead user of dynamically typed programming languages.
>>
>>100164964
A switch DOES make you memorize ids (conditions), retard. Also congratulations, you made your game twice as hard to translate.
>>
>>100157238
>global
Mother of based. I need to suck Toby Fox's dick to get a taste of those coding god genes!
>>
>>100164975
It does not. You're retarded 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.
>>
>>100157238
switches are fast, so there is really nothing wrong with this. far better than yanderedev's if-else tree
>>
>>100161287
This anon has refactored spaghetti code. That switch statement is dog shit and there are a half dozen ways which are better.
>>
>>100157258
it's as fast as referencing a block of data.
>>
>>100157308
>>100157339
>>100157440
>>100157457
>>100162621
>>100164462
great where's your game of the year?

>>100157522
HAHAHAHAHAHAHAHHAHA

cleancode chuddites posting their well documented perfectly architected 1 star repos seething and coping ITT
>>
>>100165049
Describe them and exactly why they're better. Be specific.
>>
>>100157238
>it's real
and they say indians can't code, what a fucking retard
>>
>>100157238
>learnt
Kek
>>
>>100165084
They will never do this. They're just mindlessly regurgitating propaganda from brainlets like Uncle Bob.
>>
>>100165110
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
>>
>>100165182
Post the link to your steam game.
>>
>>100165222
https://store.steampowered.com/app/489830/

Now do what was requested.
>>
>>100164955
So no real arguments against them other than it's not how you would do it. Crab.
>>
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.
>>
>>100161287
>Outside of literally wasting tens or hundreds of hours
Has /g/ never heard of code generators?
Embedding strings in C code is literally faster than any alternative approach.
>>
>>100161334
Games don't need to be refactored. It's one and done. It's not like he's writing a library.
>>
Maybe I'm retarded, 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 retarded and don't know how computers work.
>>
>>100157238
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
>>
>>100157238
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
>>
>>100157579
register pattern
>>
>>100157238
This is unmaintainable. But its unlike writing chess or IsItEven in fucking switch statements for every possible input. Now that's retarded
>>
>>100165570
>unmaintainable
>maintains spot as top indie title for years
Skill issue.
>>
>>100157238
I see no problem with it.

Would be a big problem if he did it using IF ELSE statements.
>>
>>100165636
>copying earthbound and appealing to furnigs is skill
kys
>>
>>100157648
We've all have shipped shitty but 1000+ case, holy shit
>>
>>100157238
I see no problem with long switch cases.
But wtf is that hardcoded number 736?
I would have used an enumerator.
>>
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.
>>
>>100157238
I will never understand the appeal of this faggot game. You need to be a massively gay retard to enjoy a game like undertale.
>>
>>100165699
You will never be successful.
Everyone knows who Toby Fox is.
Nobody knows your name.
Anon.
>>
>>100165879
>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
>>
>>100165879
>What if he wants to change the language to spanish
switch(language) {
case spanish: /* spanish */
default: /* english */
}
>>
>>100165883
Nobody knows the jews influencing your shithole country either.
>>
>>100165570
>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
>>
>>100157238
I don't care about programming or games for poofters, this thread doesn't interest me at all.
>>
>>100165879
>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.
>>
>>100165049
Sure, but if it works and makes money: Who fucking cares? I got the money, fuck off.
>>
>>100165883
>you will never be a washed up fotm eceleb that nobody except lgbt autists actually know
thank god
>>
>>100157238
The world is simply not fair.
Get over it.
>>
>>100157258
life itself is coded with a bunch of if/else statement, apologize to yandere dev
>>
>>100157238
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.
>>
>>100165879
>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 fuck-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.
>>
>>100157238
Undertale sucks ass so it doesn't surprise me that the guy is a technical retard in addition to everything else
>>
I can't tell if this one of those rage bot farms or the retards 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.
/g/ 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 fucking know.
>>
>>100158488
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.
>>
>>100165879
>I'm going to explain why the code is shit:
>recommends making it worse by using xml
weeeew lad. wew.

>>100166417
>I don't see how turning the code into a slurry of XML tags would improve things.
it wouldn't improve anything
>>
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:
>>100165791
>>100165640
>>100164550
>>100163342
>>100162243
>>100161540
>>
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.
>>
>>100166746
> performance problems
With basically any compiler in the last 50 years the switch statement is faster than all other approaches by far.
>>
>>100157238
>/g/ shits on YandereDev for using long elseif statements instead of switches
>/g/ shits on Undertale for using long switches

So what the fuck am I supposed to use in cases like this? [spoiler]I'm learning so please tell me because I want to exercise good practices[/spoiler]
>>
>>100166746
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
>>
>>100157258
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 fuck up.
>>
>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.
>>
>>100166873
Key based file parsing. That's essentially what that is anyway
>>
>>100166873
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()
>>
>>100166957
This isn't any more maintainable and is slow as fuck compared to the switch.
>>
>>100157630

>1 star
Who the fuck stars githubs?
>>
>>100166992
wrong on both
>>
>>100166873
It's gamedev. You don't do best practices, you hammer shit out until it compiles and stops stuttering at runtime.
>>
>>100166957
Where is the part where it handles dialogue options?
>>
>>100166992
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 retarded
>>
>>100166998
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.
>>
>>100167031
Editing source code is not a significant problem retard.
>>
File: xhLuMnS-3958901135.png (149 KB, 828x801)
149 KB
149 KB PNG
>>100166873
>>/g/ 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.
>>
>>100157238
Somehow I doubt it.
>>
>>100167021
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)
>>
>>100167066
>The biggest issue was that he was encoding states using strings
Literally zero problem with that
>>
>>100157238
If this is disassembly it literally means nothing. The case statements being immediates is sussy as hell.
>>
>>100167066
It used to be a joke making fun of bad programmers but now that's 99% of /g/ its just gotten absurd as you can see
>>
>>100157783
the logical part isnt tied to simple message choices, dumbass theres actual in game action involved, kys noproduct
>>
>>100167092
Witnessed == WitnessType.BloodInsanity is 18 times faster than Witnessed == "Blood and Insanity".
>>
>>100157899
ah yes of course, youre above the realm, you just choose to be poor, fucking larper lol
>>
>>100167116
and a typo can break your whole program. >>100167092 needs to suicide
>>
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.
>>
>>100167103
The bad programmers are the ones that follow Clean Code and create horribly abstracted slow bullshit.
>>
>>100167134
nah they've made literal billions of dollars off that code. lets see your shit.
>>
>>100157238
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).
>>
>>100165881
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.
>>
>>100167142
No they haven't. Uncle Bob and his tranny followers are poor.
>>
>>100167129
It's zoomer earthbound pretty much.
>>
File: izt7vpmepge41.jpg (95 KB, 1200x1200)
95 KB
95 KB JPG
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.
>>
>>100167151
yea dude faang is poor kek
>>
>>100157475
Hash map that maps to a function.
>>
>>100167163
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.

https://www.youtube.com/watch?v=tD5NrevFtbU
>>
>>100167049
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 retard you haven't done this before.
>>
>>100167156
earthbound never really had that popularity, so I'll say it again it's like zoomergen's 90s JRPG
>>
>>100167211
Massive, massive cope. corps are the sole source of clean code
>>
File: EN-D3NNU4AE88sa.jpg (46 KB, 636x680)
46 KB
46 KB JPG
>https://www.polygon.com/2020/1/13/21064100/vvvvvv-source-code-game-development-terry-cavanagh-release/
Same thing here for the game VVVVVV.
>>
>>100167244
that one's different and ok its basically a state machine
>>
>>100167228
> gamemaker
Your fault for using retarded 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.
>>
>>100167253
It's the same thing, just at an earlier stage.
>>
>>100167243
There are 10,000 line switches in Google's mono repo.
>>100167244
OMG WE BETTER TURN THIS INTO A BUNCH OF SEPARATE CLASSES THAT IMPLEMENT AN INTERFACE AND USE RUNTIME BASED POLYMORPHISM
>>
>>100167116
not in c#. c# has interned strings and Witnessed == "Blood and Insanity" becomes a comparison of 2 pointers
>>
>>100167264
>Your fault for using retarded 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
>>
>>100157238
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
>>
>>100166417
>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.

>>100165905
>y than dealing with XML

>>100166113
>There is zero point to this, you're just complicating things for no reason.

Wow, so many retards.
You can use any fucking 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?
>>
>>100167287
and there's a 30 deep inheritance hierarchy in one of meta's open sources. your point?
>>
>>100167303
>you can write an extra line of code to type check it
I accept your concession.
>>
>>100167299
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.
>>
>>100167312
>You can use any fucking XML editor to change the text.
great. now we have to waste more cpu time parsing xml niggershit.
>Has anyone here ever worked with software development?
you haven't.
>>
>>100167238
90s JRPG also didn't had that popularity. Undertale is one of the most popular games in the world.
>>
>>100167319
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 fucked kek
>>
>>100157475
Array of char*, simple as
Basically amounts to the same but cleaner
>>
>>100167357
>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 fuck-huge json file that even you yourself have admitted is less safe and more error prone.
>>
>>100157475
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.
>>
>>100167415
>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.........
>>
>>100157670
That's not what he's saying. He's saying that the "dev" got shit done, unlike most professional devs.
Why are you faggots seething this much?
>>
>>100167313
That most web and desktop developers are drooling monkeys and have no room to criticize game devs
>>
>>100167312
>i don't want to eat shit
>but you can get it from ANY animal's ass!
>>
>>100167085
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
>>
>>100167436
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.
>>
>>100157490
this
>>
>>100167473
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
>>
>>100167470
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.
>>
>>100167470
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 /g/cels, i already rewrote everything posted in this thread better.
>>
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.
>>
>>100167066
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.
>>
>>100167502
>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.
>>
>>100167527
Its been explained. If you can't understand from that, don't talk about programming.
>>
>>100167527
You shouldn't put scripts in a text file. That's amateur hour shit.
>>
>>100167319
confession denied.
>>
>>100157258
>is every line of dialog in the entire game just a case in a fuckhuge switch statement
No coder detected.
>>
>>100167527
Kill yourself retard
>>
(((Game of the year)))
>>
>>100161274
/thread
>>
>>100166671
So... where's your opmitized code that made you millions?
>>
>>100167634
where's your massive switch case that revolutionized the industry?
>>
>>100157848
>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 fuck is it that you actually do? seriously, what is it? why the fuck 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 nigger in jail for 1000 switch cases. he will not be damned for all eternity for 1000 switch cases. it's literally not fucking 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 fuck 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.
>>
>>100167355
>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"
>>
File: Capture.png (108 KB, 397x525)
108 KB
108 KB PNG
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?
>>
This whole thread is just Pajeets calling people who don't subscribe to their retarded Pajeet coding trannies. If you think this is acceptable, you are a fucking Jeet and that's the end of the story. This new trend of calling good code "tranny" reeks of fucking curry.
>>
File: Capture.png (278 KB, 782x604)
278 KB
278 KB PNG
>>100167828
>replies with no context off-topic
>>
>>100167760
>no one is going to put this nigger 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
>>
>>100167830
Yes, it's insane, if wonder if it's all the same pajeet seething about clean code.
>>
>>100165636
NOOOOOOOOOOOOOO IT DOESNT COUNT!!!
>>
>>100167830
based + rp
>>
>>100167830
Jeets refuse to use switch statements and use maps for everything despite how terrible they are for performance.
>>
>>100167860
idk dude. the anti-clean code movement on /g/ 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
>>
>>100167830
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?
>>
>>100167244
That is because it was originally a flash game and it was easier to do this monstrosity than rewrite the whole thing
>>
>>100167286
no its called a state machine you fucking jeet. op code is just being too retarded to have a real lookup table
>>
>>100167830
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
>>
>>100167830
There's nothing "clean code" about telling you you're fucking retard hard coding your dialog tree of 100,000 words as a switch statement.
>>
>>100168286
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!
>>
>>100167445
he got shit done 3 years delayed, it's retarded 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.
>>
>>100168286
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.
>>
>>100168347
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.
>>
>>100168381
> unoptimized switch statement
kek
>>
>>100168377
see >>100167502 >>100167527 >>100167545
your switch statement will never be good toby
>>
>>100168391
You think gml actually uses jumptables?
>>
>>100168381
GML these days gets converted into C++ and compiled. But either way, it's not a performance issue as far as I'm aware.
>>
what am I reading. toby fox doesn't even code he just used rpg maker
>>
>>100168427
>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.
>>
>>100168467
And reading through the thread it seems i'm arguing with a pajeet that already got told off earlier multiple times
>>
>>100168467
v8 will convert it to a jump table if all keys are either integers or strings.
>>
>>100168531
i use trannyfox
>>
>>100167085
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.
>>
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.
>>
>>100168675
Nobody is misunderstanding anything. People are having a laugh because you clean code faggots 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.
>>
>>100168792
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 fucking tools. complete idiots
>>
>>100168804
>they
It's literally all one jeet, probably OP
>>
>>100168792
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.
>>
>>100168804
>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.
>>100168834
Nobody cares about the switch retard. The funny part is that you can't actually explain why it's bad.
>>
>>100157238
Not nitpicking and just doing it is a valuable skill
I am trying my hardest to learn it. Perfectionism is unironically my biggest problem.
>>
>>100168866
>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 retard
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:
>>100167502
>>100167357
>>100167031
>>100166721

how bad faith are you lmfao
>>
>>100168347
YEAH ANON JSON IS THE ONLY WAY TO SAVE TEXT AS A MANAGED HUMAN READABLE FILE
>>
>>100168377
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 fucking doing spaghetti string bullshit anyways.



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.