[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: 1702281445589812.png (767 KB, 1669x1031)
767 KB
767 KB PNG
Yesterday on /g/, there was a thread where a large number of people were not only defending but encouraging the use of a giant 1000+ switch case statement for a dialogue system, and some even said it was the best way.
>>100157238
This calls into question the issue of the "no-coder" which is a person with little to no programming experience but nevertheless frequently engages in and poses as an expert in online programming discussion.
In recent years it has gotten so bad that sometimes there are more no-coders than programmers in discussions. This could lead to a future where programming languages features are basically entirely influenced by memes.

How do we fix this?
>>
Common no-coder behaviors:
>language wars, often arguing about only memes and syntax because they don't know anything else
>parroting internet programmer personalities (i watched a clean code video where i learned switch cases are based + rp and now i must repeat this)
>bringing up american politics
>shuffling all tech into 'based' and 'not based' camps (linux and c le based because uh...!)
What did I miss?
>>
>>100182454
is he just using it to map numbers to dialogues? that's not too bad, is this C or C++?
t. programmer since 12 y/o
>>
>>100182504
programmer since 12 and you think that might be c? fuck off
>>
IIRC undertale code is decompiled shit, good chance whatever game engine compiler they used could have transformed it like that, like how C compilers change some if statements into jump tables
>>
>>100182486
>rambling about "correctness"
>rambling about "memory correctness"
>watches lain once, learns lisp
>something about a "c replacement"

>>100182514
i didnt exactly look closely, its not using strcpy
anyway thanks for your input nigger
>>
>>100182486
>performance is the most important thing, because the ubishit game they pirated ran like ass and now we must microoptimize everything
>>
>>100182454
the 1000 line long switch statement is fine, most programs nowadays use 30 dynamic libraries, loading 2 new lines of instructions everytime a character speaks isnt a problem, a switch statement is also just neat.

>the global variable
also a non-issue, the guy's data section is hot in cache all the time because all of the dialog lines are in there and characters speak a lot.

>but this isnt the fastest way
it is fast enough and when writing an actual big project simplicity trumps +5% optimization.
>>
This isn't even that retarded, relatively speaking. Game dev has extremely low standards for code quality.
>>
>>100182454
>large number of people
*1 pajeet samefagging
But yes, this board is full of nocoders and morons
>>
>>100182555
So Hoare and Dijkstra would be classed as "nocoders"?
>>
>>100182486
>>100182577
>>100182555
you're describing cargo culting LARPing goy nigger golem normaloid cuckaloid faggaloid faggot maggot mystery meat pigmutt pork NPCs, bro.
>>
>>100182614
yea aka nocoders
>>
>>100182604
you probably think stallman wrote unix.
>>
>>100182581
Exactly how retarded do you think it can get

>>100182632
isn't stallman just a fatfuck that does computer politics and eats toe fungus
>>
>>100157535
point and laugh.
>>
>>100182632
No? Stallman doesn't even like Unix. He worked at MIT's AI lab and liked lisp mschines better than Unix. He only made a Unix clone because it was more popular at the time (and probably easier to copy than a lisp machine although he doesn't say it).
>>
>>100182454
It's absolutely fucking awful.
>but his game was a success!
One has nothing to do with the other.
>but you need to ship not be perfect!
Doing it right would have saved time.
>but i'm too stupid to understand any solution other than a switch statement!
Obvious from the thread yesterday.
>>
>>100182672
at a good solution?
>>
>>100182578
>the 1000 line long switch statement is fine
For a solo project. The original thread was a twitter screencap where some 90-IQ person was saying "See? Programming is not so hard!"

We do not want to encourage this kind of behaviour. I do not want to work with a 1000-line switch statement written by someone else.
>>
File: 1712097665310887.jpg (159 KB, 1024x1024)
159 KB
159 KB JPG
>>100182454
Tfw I'm 95% sure I coined "nocoder" as well as responding "unemployed" to retard posts like the ones you described. Feels good to be a /g/ thot leader. Too bad I'm still a retard stuck at mid-level 5 years into my dev job.

>How do we fix this?
Hyperbullying, rangeban the Arab/Hindu world, have jannies implement permanent dunce caps that show up on all your posts if you get caught saying something megatarded.

>>100182486
Either being retarded pro oop or calling it the devil with 0 argumentation for either position
"X is all you need"
"Databases are bloat"
Eceleb bullshit in general

Also a hilarious number of them get completely filtered by memes and obvious jokes. I saw one have an aneurysm in response to "diamond dozen."

>>100182599
I was briefly in the g Telegram chat and it was nothing but snarky Muslims and trannies larping (with 0 code to show for it) as bell labs people. First time in my life I've ever had to leave a group chat from second hand embarrassment.
>>
>>100182723
based oldchad
>>
>>100182454
>technology is only for developers!!!1!
>everyone who thinks getting shit done is better than mental masturbation over coding processes is not a developer
Kill you'reself, you fucking faggot!
>>
>>100182736
Those meme words you like to use like "nocoder", "tarded", "filtered" etc. encourage shit flinging and low IQ behavior.
>>
>>100182486
>x is bad because trans people use it
>>
File: 1714090034305.jpg (301 KB, 1080x1350)
301 KB
301 KB JPG
>>100182454
I don't see the issue
>>
>>100182824
Not necessarily, but good. Accelerate the decay and let this shithole finally die. I already poison twg with bad advice.
>>
>>100182514
Do you even know what a decompiler and pseudocode are?
>>
>>100182824
They started it with "three-month-bootcamp = coder = hire me for a programming position".
>>
>>100182845
You are the problem, find a new /qa/ in stead of shitting up other Anons' havens.
>>
>>100182769
>noooo he got shit done!
A correct solution would take less time and effort you fucking nocoder.
>>
>>100182851
stand back, the expert has entered
>>
>>100182871
So you're asking for a hug box where no one can use memes or bad words? Aren't there other sites for that?
>>
>>100182834
name? does she have a penis
>>
>>100182851
This better be bait
>>
File: 1714094185316.jpg (293 KB, 750x1000)
293 KB
293 KB JPG
>>100182900
What a fucking newfag
>>
So uh, how should this be done exactly then? How would (You) implement a dialogue like that?
>>
>>100182896
>i give bad advice on purpose
>what are you, a snowflake?
I know that back in the day when moderators cared I would have spent a higher percentage of the time banned than free to post but if that is what it'd take for retards like you to be permabanned then I would make the trade.
>>
>>100182908
no penis no interest
>>
>>100182913
Just ban the student jeettards honestly. It's not that hard, unless the jannies themselves are incompetent.
>>
>>100182939
Sorry, forgot to clarify. I meant the switch statement.
>>100182913
>>
>>100182930
Genuinely: Wtf are you talking about? Do you not remember the funny crystals prank or the aplay "cool music generation" command that still gets posted here? This place has never been a hugbox and it's already way too much of one.
>>
File: Nibbler(7).png (165 KB, 400x400)
165 KB
165 KB PNG
>>100182486
Yes I do all of this.
>>
>>100182958
I was not even here back then, I first visited in 2022 (reddit refugee) but I have screencaps of Moot and others banning people for what today are the average-quality post and I have seen that other chans are still stringent with their rules.
>>
>>100182454
Like I said in the last thread, is this real source code or is this a disassembly?
If it's the latter, there is nothing to discuss.
>>
*have seen
>>
File: 1712034115088938.jpg (114 KB, 1131x622)
114 KB
114 KB JPG
>>100182988
That's what I thought. Fuck off and never come back. Nice Hitler trips though.
>>
>>100182887
arguing against demonstrated results is obviously unconvincing. the proof of the pudding is in the eating.
>>
>>100182997
wtf do you tards think this could have been that disassembles into a massive switch statement? its real
>>
>>100183009
>but muh results!!!
Low IQ nocoder employing fallacy of irrelevance. Game success had nothing to do with this, and doing it correctly would have been more productive.
>>
>>100183010
Compilers are a hell of a drug. The literal numbers and the global object thing looks sussy as hell.
>>
>>100182454
dialog_identifier:
condition:
has_aids:
* That spark in your eyes.../
* You're really eager to& die^1, aren't you?./%%
has_herpes:
* .../%%


There are people in this thread who actually hard code dialog in a switch statement because they hate life.
>>
>>100183033
too retarded a troll to even be fun to argue with, kys
>>
>>100182893
>>100182905
what's the issue here, retards?
quick, name the most popular decompiler out there
>>
>>100183055
wait did you mean pseudocode is related to decompilers?
>>
>>100183055
Ida Pro
Second most popular Ghidra
Third most popular radare2
>>
>>100183034
literal nums and globals means either decompiler or dogshit programmer and its hard to tell
>>
>>100183043
i think they larp about it but have never actually written a single switch statement or any program really
>>
>>100183071
are you fucking kidding me? do you really think you can decompile C code and get working code? do you think they will be able to give you give the name of enum members? kek
>>
If it works, then it's valid. If you want to stop people from doing it, make a language that's more strict than doesn't allow for it. Good luck making people use it however.
>>
>>100183135
>write a language that makes a key feature of programming unusable
Thank you genius.
>>
>>100183135
fucking chud. you are such a fucking chud
>>
>>100182614
Wow. Are you trying to hit buzzword bingo?
>>
>>100182555
>watches lain once, learns lisp
that one hurt...
>>
>>100183135
Yes anon, tech debt is "working" code.
>>
>>100183173
>>100183151
Or keep crying over a dude making bank doing something a compiler or interpreter thinks is a-ok and valid code, knowing you will never be successful. But hey, at least you're writing memory safe, readable code!
>>100183244
We're talking about a game, a piece of software most people shit out and don't maintain. "Technical debt" doesn't exist if you never visit that code base again
>>
>>100183194
I invented those terms.
>>
File: 467548568.gif (2.48 MB, 498x203)
2.48 MB
2.48 MB GIF
>Retards still arguing about a code churned out by Gamemarker and then decompiled by another fuckwit
This picture means nothing. Your discussion means nothing. The guy that created this game didn't write a single line of code. The code you are looking at comes from a decompiler.

How is it possible that you retards have spent two days arguing about something that isn't even real?
>>
>>100182454
>This calls into question the issue of the "no-coder" which is a person with little to no programming experience
Actually I think the problem is that these kids do have programming experience, as in they've followed tutorials or picked it up through trial-and-error, and know the basics, but unfortunately haven't learned the proper fundamentals. This is what leads them to writing/defending garbage code, because they simply don't have a proper frame of reference.

>How do we fix this?
You can't. It's best to just call them out and discourage them from stinking up the programming community even further.
>>
>>100183264
Retard if you have to change that spaghetti code dialog (which you will) you'll end up paying compounding tech debt. Every single line of dialog you add to the massive piece of turd makes everything more unmanageable. Changes that should take 60 seconds will instead take 4 hours because you have to disentangle everything. Hope you don't have to make any major dialog changes :^)
>>
>>100183268
It doesn't change the fact there are people who think this is a correct way to write the code.
>>
>>100182454
The biggest problem was that no one could actually give a coherent reason WHY this switch case was bad, just general appeals to maintainability.
>>
>>100183264
I will be the greatest engineer to have ever lived in all tech fields, suck my dick and swallow bitch.
>>
>>100183281
What makes them no coders is that anyone who has written real code would know first hand why doing it this way is a mistake. It makes it really obvious that they have no production experience because anyone who has done a real project will know what a pain shitty code is to refactor. Double so with games because it's not unexpected to have to make major changes to your code as you go along because you need to add or change features. Like if you were doing the dumbass switch dialog system, if you realized halfway through you'd need to add hooks or actions to the dialog system, you'd probably want to kill yourself refactoring it.
>>
>>100183295
>Retard if you have to change that spaghetti code dialog (which you will)
I don't have to change shit, it's not my project. And I doubt the dudes changing much on a single project he already shipped and made all the money off of years ago. I doubt the kid opened that repo in years. It's not my problem, most likely not his problem anymore, and only seems to be your problem. Which is weird because I don't think you have any kind of investment in that project. But you go ahead be mad about something that doesn't affect you that happened a long time ago I guess.
>>
>>100182504
Games often use a game state counter to track your progress and when to do things like unlock areas or display world messages.
That would appear to be what is going on here.
>>
>>100183327
Yes anon, maintainability is extremely important. Doing the switch is bad because you're literally wasting hours maintaining it and the longer it becomes the more time it takes it maintain it. And believe it or not, we don't have infinite time or patience.
>>
>>100183366
Wow anon you're really taking the high road replying to comments about a random game that happened years ago. Take your own advice, retard.
>>
>>100183268
that's worse, because people are defending code nobody wrote
>>
>>100183327
that's the thing. no coders don't think maintainability is important because they've never maintained code. they think speed is most important because they're pissed they're mom won't buy them a 4090 and they want the new borderlands to run better
>>
>>100183380
>>100183406
But HOW is this difficult to maintain?
>>
>>100183414
Here, I'll give you a 5000 line switch statement and tell you you need to change the order of it by hand.
>>
>>100183391
I'm replying to your comment that happened a few seconds ago, because (you) keep replying to me. Im just commenting how funny it is how angry it makes people on this board to the point that it has gone on for two(2) threads. And the dude that everyone's mad at that wrote the code probably hasn't lost a single minute of sleep over any of the decisions he's made.
>>
>>100183436
Ok, I change the numbers around accordingly.
>>
>>100183455
No you didn't and you're just outing yourself as a no coder. You've never worked on anything that couldn't be shat out by ChatGPT.
>>
>>100183414
you don't code, you knowing does not matter
>>
>>100183460
Do you even know how a switch case works?
Are you even aware of game state counters?
If you want the text to appear at a different time in the game, you just change the number.
>>
>>100183414
https://en.wikipedia.org/wiki/Spaghetti_code

If you are not a programmer, then you will find no issues with a 1000-line switch statement. In this exact case, where the code is written and maintained by a solo dev, there is no issue. The rest of us work in teams, and we have "best practices" for that reason.

https://en.wikipedia.org/wiki/Coding_best_practices
Note "maintainability".
>>
>>100183499
Anon, I know you're a no coder, but you might want to use your brain and realize those numbers might conflict with each other and you can easily override or otherwise mess up your game state, and good fucking look tracking down where you transposed some numbers accidentally. All because you're too stupid to use a maintainable system that not only is faster to work with but doesn't have this problem at all.
>>
>>100183503
It's still a problem with a solo dev because anyone who has worked on a large project -- especially a game -- would know that changes happen, a lot. Even something as simple as dialog might need a massive change if halfway through the project you realize you need to change big parts of the story around.
>>
>>100183454
some of us enjoy debating and aren't angry
>>
>>100183511
Thank you for finally saying a coherent argument against it.
See, it wasn't that hard.
>>
>>100183526
I agree with you. Even solo, you might come back to your own code 2 years down the line and wish for a time-machine in order to give your younger self a very tight slap.

...but when you are in a team, and your code is trash, your own teammates might want to give you that tight slap, without the 2 year wait.
>>
>>100183545
I shouldn't have to point out the obvious.
>>
>>100183564
Obvious for one is not obvious for all.
You could have saved yourself a number of posts in this, and probably last, thread by saying that instead "switch case bad because you spend hours maintaining it".
>>
>>100183499
one point of failure is the index of global.msg[index]. when you write a new line of dialogue you have to write the correct number. if you remove one line, you have to edit all the ones that came after it to fix it. on top of taking more man hours, if you make any mistake, content will go missing from the game without an error message or any indication that it happened. then your shit appears in a did you know gaming video 10 years later where they talk about your bugged dialogue
>>
>>100183603
Anon you will never be a programmer if you need people to spoonfeed you and you can't sit down and use your brain in self-contemplation. You are and will always be a no coder. You don't have the brain for it.
>>
This is also leaving out the possibility that this is a generated file that is never directly modified.
>>
>>100183622
Toby Fox was a literal nocoder before he started this project, he basically learned as he went. So he probably didn't figure out how to do that reliably.
>>
>>100183618
Oh, no I worked that out before you said it. I'm just making people state the actual problems rather than hand waving at general areas complaint.
Also, I never want to be employeed as a programmer. That'd ruin all the fun of it.
>>
>>100183642
>I was only pretending to be retarded for your sake
>I always knew the answer, was just making sure you knew the answer
Haha sure buddy haha you're funny. You're one of *those* guys. Just so you know, people hate people like you.
>>
>>100183526
If it's a solo dev writing retarded code then I don't care since it will never be my problem, but if I'm in the same team, you couldn't pay me enough to continue working with this shit.
>>
it's the learn to code shit that was spammed on /pol/ from 2016-2019 nonstop. massive retard influx not only online but the whole industry
>>
>>100183656
I know. I hate people like people who hate people like me, too.
>>
File: 655ccc7c267e6.jpg (68 KB, 782x960)
68 KB
68 KB JPG
>>100182454
>a person with little to no experience but nevertheless frequently engages in and poses as an expert in online discussion.
>In recent years it has gotten so bad that sometimes there are more no-coders than programmers in discussions. This could lead to a future where ____ are basically entirely influenced by memes.
This problem applies to every board. II's shitposters, bad actors from other websites and normies who use memes to build their education on the subject at hand. Most of the oldfags who actually knew how to do things have left and the new people only care about farming (You)s and "put me in the screencap"
>>
>>100182454
The form doesn't matter.
If your dialog system is best representable as a table with some conditions, you can store it as such. Be it a giant switch statement or a giant data file - doesn't matter, as both have the same level of maintainability.
If you want it to be easier, you can write an editor program and it can either work with data file directly or it can generate source code with switch statement.
>>
File: 1700981063664121.png (357 KB, 381x410)
357 KB
357 KB PNG
>>100183819
Oldfags are now rich and have groups of supermodels that pay for suckysucky and fuckyfucky. The only "people" that still post here are... normalturds. Clogged may their throtes be by Andy Sixx's logs.
>>
>>100183609
Anon, languages have enums. Compiler will reassign values automatically.
>>
>>100183635
What if he started out hand coding the switch case, realized after a while how annoying it was to maintain but also how difficult it would be to rewrite the code incorporating it and so then wrote code to generate it?
>>
>>100183916
ok?
>>
>>100183927
He's right, you know.
>>
>>100183916
you stupid? the op code has hardcoded ints, you can fuck them up easily. you nocoders think compilers are magic now?
>>
the real problem here is the fact people are getting mad without knowing anything about the snippet
>>
>>100183976
The code has clearely been decompiled, you midwit. The original likely usee enums.
>>
>>100183922
Maybe. But blunderfail does a lot of wonky things under the hood, so he probably just wanted to get the game working and ready instead of doing things correctly.
>>
>>100183976
>cschizo takes time out of raging about the existence of C... only to be clueless in other ways
>>
>>100183999
>The code has clearely been decompiled
kek you're a retard bro
>>
>>100184023
let's see the not-decompiled source code, then
>>
>>100184017
0 evidence enums were used. even if they were, you're extremely stupid. you think its like
global.msg[enum.first] = ""
global.msg[enum.second] = ""

its still garbage lmfaoi
>>
>>100184043
in op
>>
>>100184047
>>100184060
absolute mong
>>
>ITS NOT DECOMPED BRO
>can't even come up with a design that would get compiled into this
>>
File: yandere.jpg (509 KB, 1009x1009)
509 KB
509 KB JPG
>>100182454
mmmh the god class with dubious boolean logic is not really the problem, ok?
>>
>>100184065
i accept your concession
>>
>>100182931
>no interest
based anti-usury anon
>>
>>100184047
No one's talking about the array indices, you zoomer retard.
>>
>>100184070
>uses GUI editor that visualizes dialog system
>generates giant switch statements
>makes nocoders seethe
>>
>>100184070
anyone who thinks its decompiled from some magic god code is a fucking no-coder through and through. add this one to the list of no-coderisms:
>thinks compilers make incredible optimizations 100% of the time
>>
>>100184087
i am, you two are the retards that are no-coder enough to misunderstand my post and think i was talking about the switch and not the code inside it.
>>
>>100184094
This has nothing to do with optimizations. Decompiler shows that the original had a giant switch statement, but it doesn't mean it used hardcoded it's or that it was even written by a human.
>>
>>100184088
any proof other than cope that such a thing was made and used here?
>>
>>100184109
You have a proof of the opposite?
>>
>>100184100
So your problem is the assignment of sequences of dialogue to consecutive indices of global.msg. How would you write it? Provide an example.
>>
>>100184116
yea, occam's razor
>>
>>100184117
how no coder are you? even using a simple .push or .add method on the array instead of hardcoding indices would fix this. you must seriously be bad if you've never encountered this. what i love about no-coders is how they out themselves without realizing it
>>
>>100184141
Occam's razor doesn't proof anything. Any code generated by RAD tools looks like this. With your logic we must assume they were all handwritten.
>>
https://github.com/fachinformatiker/undertale/blob/master/scripts/scr_papcall.gml
this is clearly decompiled and the original source code is probably emitted by a branching dialogue system

>(Someone said its most likely decompiled)
surprise
>>
>>100184185
That makes it funnier because people are defending decompiled code
>>
>>100184192
actually, people are trying to explain why that particular code is so ugly. you still think it's hand-typed, though, being the utter noob that you are.
>>
>>100184216
nah you were just telling me enums would fix it all you're no-coder as fuck and btw, you still have no proof of your outrageous claim
>>
>>100184244
That was me, not him. And I successfully debunked your argument that indexes need to be remapped. Using enums to represent a list of states is a common thing and people do changes you described just fine.
>>
>>100184304
you haven't debunked anything considering you still think i'm talking about the switches
>>
>>100182486
- Focusing on the appearance frameworks and languages rather than the underlying algorithms and performances on various workloads that differentiate them
- Vehemently hating some codebase or derivatives because of politics, makes sure to sperg out any time its mentioned
- Can fizzbuzz in 20 memelangs but cant implement a hash table in a single one
>>
>>100182604
yes, they are better than coders, they're mathematicians
>>
This is worse.
>>
>>100184372
All very true. and you see it on here daily.
>>
>>100184397
dood its autogenerateed. all the game logic le auto generated by a tool nobody can find
>>
>>100182454
the older I get the more I realize nothing that we used to say is bad practice matters anymore, we have so much memory, if you don't deliberately leak memory it all should be fine who cares if it's 1000 long switch statement, it's just manual labour your PC won't allow down. becomes it's long.
>>
>>100184397
switch would fix this.
>>
It is legitimately funnier if its autogenerated because of the people who thought it was genius code from the mind of a master coder, and the way it should be written. When not even the nigga that made it wanted to write it.
>>
>>100182454
I remember a thread where a nocoder wrote essay after essay arguing how a simple pair search was O(n log(n)), but never once showed it mathematically. Another poster showed it's O(n^2) with mathematical proof, but that wasn't enough for our brainlet poster.
>>
>a giant 1000+ switch case statement for a dialogue system
Yeah it's hard to maintain, but it's quick to write and it works.
I still hate it though.
>>100182913
A much cleaner, more modular way to implement an FSM is to use function pointers/closures/etc. (FP-style) or a State class (OOP-style.)
>>
>>100182454
the end user doesn't care about how something is programmed if the performance is good. If you want to ship a game you need to work fast
>>
ridiculing code from working products based on misconceptions is definitely nocode behavior, and doubly so if your ridicule is borrowed from some youtuber or twitter personality
>>
>>100184648
/thread
>>
>>100182454
>undertale
This is written on an engine that even Toby disliked in the end.
>proceed to write deltarune on it
kek

>>100183819
>he only browses one website
>in 2024
>>
File: 1713627020005506.png (18 KB, 282x424)
18 KB
18 KB PNG
>>100182454
The best code is code that WORKS
OP absolutely seething
>>
90% of you should never have been taught to read, holy fuck
>>
>>100184514
whats pair search? like is there a pair in an array? its clearly n log n
>>
>>100184884
g is just cniles who have never written a functioning program.
>>
File: das it mayne.jpg (264 KB, 640x466)
264 KB
264 KB JPG
>>100184827
>he only browses one website
How did you draw that conclusion you midwit?
>>
>>100182454
>In recent years it has gotten so bad that sometimes there are more no-coders than programmers in discussions
>sometimes
have you seen /g/
>>
>>100184648
also unlike real programming in vidya you rarely care about maintainability or future development
>>
>>100185343
for one-off event scripts like a custcene script sure but some parts like the gameplay systems will get worked on a lot and probably carried over to the next game the studio makes
>>
>>100182514
Egg blew back on your face. It is in fact valid use of string literals in C, retard.
>>
>>100185360
& assuming this was the real code he wrote he has to deal with it TO THIS DAY with deltarune unless he finally bit the bullet and rewrote it all
>>
>>100183268
>How is it possible that you retards have spent two days arguing about something that isn't even real?
First week on the site?
90% of threads is just deliberately misrepresenting something to seem completely outlandish in order to farm (you)'s from perseverating autists.
>>
>>100183268
how is it not a problem that chuds on here are calling decompiled garbage 'kino'
>>
>>100182887
>A correct solution would take less time and effort you fucking nocoder.
You kind of unmasked yourself as a no coder by saying this. The correct solution often takes more time and effort than the incorrect solution. The correct solution usually is something that is able to adapt to changes and easy to maintain. The fast solution usually works, but sets you up for failure later on. The correct way to do this would have been to develop some format in order to load dialogue and have a generalized way of retrieving it from a file. This would have probably required developing a method to load files in, parse the custom format, and a method for uniformly marking dialogue so that it can be algorithmically retrieved. That entire process would take way longer than just using a switch. It would pay for itself in the long run, but if you are not planning to make dlc or change dialogue it makes more sense to use the fast solution.
>>
File: 1707389931786025.png (4 KB, 248x55)
4 KB
4 KB PNG
>>100185494
shush
>>
>>100182454
Better than a 1000 long if else statement
>>
>>100185503
now you admit it's decompiled
>>
>>100182486
You forgot
>anything I don't like
Since I'm the original author of the word I get to make these decisions
>>
it's afraid of llms lol
>>
>>100182626
Who cares about your nuWords though
>>
>>100183313
>T-there could be people that think this way
But you aren't arguing about them, are you? You use a made up imaginary enemy to yell at. Getting riled up for nothing
>>
>>100183392
Are they though? Have you any inkling of the amount of people who will 'defend' or 'attack' anything on a given thread? Taking things on 4chan seriously at face value will hurt you in real life
>>
>>100182454
This works for undertale boss fights though because there is different dialogue each time you retry
So it makes sense to have case 827 and case 183 in a switch statement I don't see what else would be better
>>
>>100183535
You forget that I just added a picture of a wojak depicting you as very angry
>>
>>100182486
>shuffling all tech into 'based' and 'not based' camps (linux and c le based because uh...!)
you are on 4chan
95% of posters split the entire world into a based/cringe dichotomy
>>
>>100182644
>Exactly how retarded do you think it can get
DA, but I've seen worse.
>>
>>100182454
>How do we fix this?
We are much to stupid to fix anything.
>>
File: 1690394387895511.png (29 KB, 474x289)
29 KB
29 KB PNG
>>100185525
Lower you're tone when talking to me.
>>
>>100183268
>hurr durr its decompiled bro!!!!
>>
>>100182454
while the switch statement (and all the global state) is retarded, it's not that bad. It has a few special properties that might be nice. Firstly, it is a central place to add new dialogue, should be very fast to get new dialogue, offers a centralized mapping of magic numbers to dialogue, etc. Stupid, but not the worst thing in existence
>>
File: 1711730191811501.png (10 KB, 81x116)
10 KB
10 KB PNG
>>100185912
>DEWD ACHCHYUALLY UR SUPPOSED TO USE A BIG ARRAY NOT A SWITCH STATEMENT
gyat...
>>
>>100182454
well if it works for pythons cpython
>>
>>100185912
ohnononono


How fucking hard is it for people itt to say, YES THIS CODE IS SHIT
>first it's actually good code
>then, well it doesn't matter because its decompiled
>finally there were people saying that it was decompiled code but thats fine its still good code

JUST ADMIT DEFEAT FUCKING PIECES OF HUMAN TRASH
>>
>>100186019
relax
>>
>>100182454
how would you do it?
>>
File: 1697234770823433.gif (2.96 MB, 375x224)
2.96 MB
2.96 MB GIF
>>100185912
switchcase niggas............................
>>
>>100186074
fuck you're right. after 70 years of computer science nobody has come up with a better way to show rpg text at the right time. fuck you're so right dude this is the best way.
>>
>>100186100
how would you do it?
>>
No coder:
>I don't see anything wrong with the switch statement!
Midwit coder:
>Holy fuck, that switch statement is terrible. How the fuck are these people working on best-selling games? The West has fallen
Smart coder:
>Factoring it out to a data file would be better but if it works it works
>>
>>100186019
Are you ok little buddy? Still waiting for your optimized code that made you millions. You could have spent all the time getting baited in both threads on something else you know?
>>
Who cares, they shipped. Programming is the means not the ends, you idiot nerds.
>>
>>100182504
>>100182514
>>100182555
>>100185367
Toby Fox used YoYo GameMaker and whatever scripting lang that came with
>>
>>100183268
>>100185912
So is it real or not real? I thought it was real
>>
>1 dev
>$90m revenue
between money and cs masturbation will take the money
>>
For those that don't get it, the problem is not that the switch statement is slow. And it's also not a big problem, modern bloated software has worse problems.

HOWEVER giant if/switch statements like this show that you have very, very skill and can't even use lists/arrays. This is common to see with total beginners, often kids.

For a problem like mapping numbers to strings, instead of having a big if/switch statement you should use a list, array or whatever such a structure is called in your language.

// This is bad:
if (n === 0 ) {
string = "zero"
} else if ( n === 1) {
string = "one"
}
...

//This is what you should do:
const numberStrings = ["zero", "one", ...]
const string = numberStrings[n]



This is much easier to work with, and the code is much shorter. Easier to let other people work on as well. And it's ready to take in the list of string from another source as well, such as if you refactor or add translations to another language.
>>
I don't care about the switch statement but I hate that it uses numbers as the cases
>>
>>100187456
Dude is no coder and produced something most pro coders here can only dream of.
>>
>>100187519
Undertale got big because of its SOVL, not because it was some outstanding game with outstanding mechanics or whatever the fuck
>>
>>100182486
>Drooling over worthless optimizations
I don't care if a list is slower than a fucking hash map when all there ever will be in it is like 100 entries and the CPU deciding to boost like 5 MHZ higher that day is an order of magnitude more difference.
>>
>>100187442
Completely irrelevant for previous anons egged face.
>>
>>100183265
Hello mr cancer of /g/. Would you please kys
>>
>>100182486
And yet you will USE the epithet simply on anyone who doesn't agree with you.
t. coded for 30 years+
>>
>>100184088
That seems most likely to me, how would you as a human ever even keep track of a fucking switch with 1000 cases and actually know where which dialogue/choice braches to?
>>
>>100187519
Survivorship bias, for every Undertale there is 10,000 indie projects which essentially bankrupted the no coder.
>>
>>100182454
> literal no coder fucking retard tries to create a thread for a second time
..
> gets BTFO. again.
ahahahahaha. i love this board.

>>100188514
> indie projects
> bankrupting anyone
> ever
LMAO. the absolute state of nocoders of this board. post face and hands. i'm most certain you shit in the street and squat under cows, waiting for them to piss so you can have a shower before you go to work at the "paypal/amazon/irs" scam call center.
>>
File: 1697022650200997.gif (3.18 MB, 498x375)
3.18 MB
3.18 MB GIF
>>100182454
>all this seething about what's probably a decompilation artifact in an incredibly succesful and fairly bug-free piece of software
M8 you're not ready for real enterprise©® software: dozen billions dollars in yearly revenue depend on a tool that works almost entirely through global state stored by creating and dropping sql tables on the prod db.
>>
>>100188554
Anon, if you work full time on a project for two years and it makes you $500, it bankrupted you.
>>
>>100188561
not how it works, nigger.
>>
>>100188569
Pretty much is unless mommy and daddy are subsidizing you. Anyways doesn't matter, you think because some lottery tickets win it must mean buying lottery tickets is smart.
>>
File: 1713973801341219.png (321 KB, 860x400)
321 KB
321 KB PNG
>>100182632
gnu is not unix thoughoweverbeit
>>
>lazy people making things harder on themselves spending hours navigating their hard-coded resource catalogue instead of taking 15 minutes to learn any form of basic resource management
you'd have better luck trying to fix homelessness than self-destructive laziness
>>
>write shit code for a game
>make millions of dollars
>pay /g/ chuds some peanuts to refactor if needed
BASED
>>
>>100182454
Replace the /g/ captcha with programming exercises instead, let the user choose the language and they have to write a short program to do something like print a fibonachi sequence with some sort of random spin on it. Trivial for someone that actually programs but filters no-coders.
>>
>>100187487
>instead of drinking piss, you should eat shit!
Thanks, ChatGPT.



[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.