BTFO

IQfy BTFO

Thalidomide Vintage Ad Shirt $22.14

Black Rifle Cuck Company, Conservative Humor Shirt $21.68

Thalidomide Vintage Ad Shirt $22.14

  1. 2 months ago
    Anonymous

    are you actually fricking kidding me
    is every line of dialog in the entire game just a case in a frickhuge switch statement

    • 2 months ago
      Anonymous

      apparently 🙂

    • 2 months ago
      Anonymous

      He used the time of learning programming to actually make a game and make clean exit

    • 2 months ago
      Anonymous

      there's literally nothing wrong with it

      • 2 months ago
        Anonymous

        He used the time of learning programming to actually make a game and make clean exit

        apparently 🙂

        i mean, if it works... doesn't make my head hurt any less though

      • 2 months ago
        Anonymous

        This case is more profitable than combined IQfy codes altogether.

        undertale is perfect as is
        more =/= better

        clean code troony triggered
        check nearest food bank for help

        Looks extensible to me, just add another case.
        This is also what peak code reuse looks like. Seriously, think about it.

        have a nice day

        • 2 months ago
          Anonymous

          What's your problem?

          • 2 months ago
            Anonymous

            he is poor because he fell for code re-usability and extension and forgot to get things done

        • 2 months ago
          Anonymous

          based shut that cringe shit up. this code is fricking garbage, you can't write code much worse its not possible. javabeanfactorysingleton is miles better

          • 2 months ago
            Anonymous

            Seriously I want to murder the "dev" with my own bare hands.
            The frick is this garbage.

          • 2 months ago
            Anonymous

            based shut that cringe shit up. this code is fricking garbage, you can't write code much worse its not possible. javabeanfactorysingleton is miles better

            obviously the code is absolute garbage that no comptent dev would ever write, but that's beside the point
            the main takeaway here is that what ultimately matters when making works people adore is passion and creativity, not necessarily technical skill, and that sometimes focusing on the wrong thing can take away from the reason you ever even started a project (implying: toby fox would've taken longer to learn to be a competent programmer before working on UT, and might even have lost motivation had he done so)

          • 2 months ago
            Anonymous

            Nobody cares if you're a competent dev or not. Only other San Francisco transvestites do because their sexuality and code writing ability is what defined their existence. People only care that you deliver what they want in a working state. Take the blackpill.

        • 2 months ago
          Anonymous

          based shut that cringe shit up. this code is fricking garbage, you can't write code much worse its not possible. javabeanfactorysingleton is miles better

          Well, as /r/3DCG says:
          Post your work!

      • 2 months ago
        Anonymous

        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.

        • 2 months ago
          Anonymous

          >"Spaghetti shit code KILLS projects"
          >project proceeds to net ~$26mil

          • 2 months ago
            Anonymous

            >survivorship bias
            Anon, when a project fails it doesn't even become a game. Undertale is a one in a million game project.

        • 2 months ago
          Anonymous

          This anon has refactored spaghetti code. That switch statement is dog shit and there are a half dozen ways which are better.

          • 2 months ago
            Anonymous

            Describe them and exactly why they're better. Be specific.

          • 2 months ago
            Anonymous

            They will never do this. They're just mindlessly regurgitating propaganda from brainlets like Uncle Bob.

          • 2 months ago
            Anonymous

            Post the link to your steam game.

          • 2 months ago
            Anonymous

            https://store.steampowered.com/app/489830/

            Now do what was requested.

          • 2 months ago
            Anonymous

            Sure, but if it works and makes money: Who fricking cares? I got the money, frick off.

        • 2 months ago
          Anonymous

          >Outside of literally wasting tens or hundreds of hours
          Has IQfy never heard of code generators?
          Embedding strings in C code is literally faster than any alternative approach.

    • 2 months ago
      Anonymous

      [...]
      [...]
      [...]
      [...]
      have a nice day

      based shut that cringe shit up. this code is fricking garbage, you can't write code much worse its not possible. javabeanfactorysingleton is miles better

      Indie devs aren't real developers

      This is a textbook example of “those who fail, teach.” Only instead of teaching, it’s nitpicking and seething.

      You’ve realised early on that you’re actually too neurotic to amount to shit in this life, so the only thing you have is your autistic obsession with source code from better men. All you will ever amount to is criticising those who are better than you, nothing more.

      Explains why you’re here too, you’ve given up and are now being a crab about it.

      • 2 months ago
        Anonymous

        The game you posted was made by two people who had an "autistic obsession with source code from better men"

      • 2 months ago
        Anonymous

        >zoomer spacing
        frick off underage b&

    • 2 months ago
      Anonymous

      it's as fast as referencing a block of data.

    • 2 months ago
      Anonymous

      life itself is coded with a bunch of if/else statement, apologize to yandere dev

    • 2 months ago
      Anonymous

      A Switch is pretty effective for storing dialogue. Using some regex wizardry, you could plug your text into the syntax a lot faster than just typing up raw text and importing it on a case-by-case basis.

      There are probably more effective or "elegant" ways to solve that problem, but people seem to forget that simple code takes less time to read and troubleshoot and is a lot harder to frick up.

    • 2 months ago
      Anonymous

      >is every line of dialog in the entire game just a case in a frickhuge switch statement
      No coder detected.

  2. 2 months ago
    Anonymous

    >case 736
    >if global.choice

    • 2 months ago
      Anonymous

      This case is more profitable than combined IQfy codes altogether.

      • 2 months ago
        Anonymous

        >no code reuse
        >not extensible
        It's garbage.
        >but muh money
        Not a property of the code itself

        • 2 months ago
          Anonymous

          clean code troony triggered
          check nearest food bank for help

        • 2 months ago
          Anonymous

          Looks extensible to me, just add another case.
          This is also what peak code reuse looks like. Seriously, think about it.

        • 2 months ago
          Anonymous

          >extendible
          Why do IQfytrannies always screech that games don't come out "finished" like they used to back in the good old days but at the same time they screech if a component of a game is not "extensible"?
          Who gives a shit, the game is done and shipped.

          • 2 months ago
            Anonymous

            Holy shit since when are there so many morons on this board? Kys techlet

          • 2 months ago
            Anonymous

            /! Don't listen to this guy, he has never shipped anything. I repeat, he has never made a completed game ever.

          • 2 months ago
            Anonymous

            >he has never shipped anything
            Wrong, I'm employed and have several open and closed source projects, all of them well written
            >has never made a completed game
            I'm not a game dev, moron

          • 2 months ago
            Anonymous

            >I'm not a game dev, moron
            Then don't speak.

          • 2 months ago
            Anonymous

            Don't worry, whatever skid that wrote the same code 1000 times isn't a game dev either

            Sometimes code is better than structured data, because code can handle arbitary logic such as the if statements seen in the excerpt.

            moron

          • 2 months ago
            not him

            >Doing things that are bad practice in general in all types of programs
            >>Then don't speak.
            Why are you this delusional?

          • 2 months ago
            Anonymous

            He's a nocoder moron/troony shill/troll/etc, either way he should kill himself

        • 2 months ago
          Anonymous

          >>no code reuse
          >>not extensible
          Why does that matter? His game is written in gamemaker, he would be better be of rewritting it anyways.

          • 2 months ago
            Anonymous

            >His game is written in gamemaker
            Hahah lmfao frick me

          • 2 months ago
            Anonymous

            >Hahah lmfao frick me
            https://gamemaker.io/en/showcase?title=undertale
            Here is if you don't believe me.

          • 2 months ago
            Anonymous

            I believe you and it's absolutely bonkers
            God I hate these non-dev morons

          • 2 months ago
            Anonymous

            Yet he has more than 240 peak users.
            How strange...

      • 2 months ago
        Anonymous

        >codes
        wtf zoomer, leave this board immadiately

      • 2 months ago
        Anonymous

        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.

        • 2 months ago
          Anonymous

          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.

        • 2 months ago
          Anonymous

          Games don't need to be refactored. It's one and done. It's not like he's writing a library.

    • 2 months ago
      Anonymous

      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

      • 2 months ago
        Anonymous

        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.

      • 2 months ago
        Anonymous

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

      • 2 months ago
        Anonymous

        register pattern

  3. 2 months ago
    Anonymous

    If they wrote it correctly then they would have had more time to make it even better.

  4. 2 months ago
    Anonymous

    undertale is perfect as is
    more =/= better

  5. 2 months ago
    Anonymous

    Indie devs aren't real developers

    • 2 months ago
      Anonymous

      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)

    • 2 months ago
      Anonymous

      based shut that cringe shit up. this code is fricking garbage, you can't write code much worse its not possible. javabeanfactorysingleton is miles better

      Seriously I want to murder the "dev" with my own bare hands.
      The frick is this garbage.

      Enjoy starving while non-real-developers make money and provide real value to real people

  6. 2 months ago
    Anonymous

    >undertale
    >goty
    lmao

  7. 2 months ago
    Anonymous

    What would you do instead of 1000 line switch statement?

    • 2 months ago
      Anonymous

      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

      • 2 months ago
        Anonymous

        Let's see all the great things you've built with your superior knowledge.

        • 2 months ago
          Anonymous

          This is one of my open source projects
          https://github.com/shrimpcast/shrimpcast

          • 2 months ago
            Anonymous

            >1 star
            > Battle-tested
            XD

            You're trolling, don't post someone else's github to humiliate him.

          • 2 months ago
            Anonymous

            It's my own streaming platform which I made to run a stream and I've peaked at 240 users

          • 2 months ago
            Anonymous

            >I've peaked at 240 users
            pervert

          • 2 months ago
            Anonymous

            Feet stream when?

          • 2 months ago
            Anonymous

            >1 star
            Who the frick stars githubs?

        • 2 months ago
          Anonymous

          several things that make money actually. and you haven't built shit because you can't code at all

    • 2 months ago
      Anonymous

      999 if/else statements

      • 2 months ago
        Anonymous

        How else would you do this? if statements?
        No, to be honest, I think it would have been better if they used json for dialog and a switch-case for languges it would be easier, would make life easier.
        It's just odd to see programmers still hardcode shit.

        Are you moronic? All resources like text should be loaded from a resource file, and since it seems it's doing the same for every case, you can parse it automatically

        • 2 months ago
          Anonymous

          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.

        • 2 months ago
          Anonymous

          Yup, and the resource file is the executable.
          Seethe harder homosexual.

          Also post your work.

          • 2 months ago
            Anonymous

            >Yup, and the resource file is the executable.
            No it's not, you dumb nocoder.
            >Also post your work.
            See

            This is one of my open source projects
            https://github.com/shrimpcast/shrimpcast

          • 2 months ago
            Anonymous

            Oh wow! An MVC app! Soo complex! THREE controllers? Wow, I kneel.
            Try to make a game next time.

          • 2 months ago
            Anonymous

            It's a streaming platform, it uses sockets, not controllers. Dumb nocoder c**t.

          • 2 months ago
            Anonymous

            Woah! Full-on SOCKETS?
            I kneel.

          • 2 months ago
            Anonymous

            Post github

        • 2 months ago
          Anonymous

          >can't see an obvious joke post
          >calling anyone else moronic
          So this is the power of autism...

    • 2 months ago
      Anonymous

      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

    • 2 months ago
      Anonymous

      I would listen and thats what no one did.

    • 2 months ago
      Anonymous

      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.

      • 2 months ago
        Anonymous

        Teaching brainlets hashmaps was such a mistake.

    • 2 months ago
      Anonymous

      Hash map that maps to a function.

    • 2 months ago
      Anonymous

      Array of char*, simple as
      Basically amounts to the same but cleaner

    • 2 months ago
      Anonymous

      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.

  8. 2 months ago
    Anonymous

    No one can explain why this is LE BAD

    • 2 months ago
      Anonymous

      That's because it isn't.

      >undertale
      >goty
      lmao

      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

  9. 2 months ago
    Anonymous

    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.

  10. 2 months ago
    Anonymous

    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

  11. 2 months ago
    Anonymous

    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.

    • 2 months ago
      Anonymous

      >repeating the exact same code for over 1000 cases is ok to me
      Immediately have a nice day

      • 2 months ago
        Anonymous

        Is the dialog repeated at all?

  12. 2 months ago
    Anonymous

    So im guessing this game has not been released in a language other than english then?

    • 2 months ago
      Anonymous

      >So im guessing this game has not been released in a language other than english then?
      Why do you think there is 1000+ dialog?

    • 2 months ago
      Anonymous

      It has. There's an official japanese translation.

  13. 2 months ago
    Anonymous

    Nobody defending this actually has a job in the industry.

    • 2 months ago
      Anonymous

      ITT full of dumb nocoders who've never written a single line of code

    • 2 months ago
      Anonymous

      We've all have shipped shitty but 1000+ case, holy shit

  14. 2 months ago
    Anonymous

    >to launch games you NEED bad coding, it's IMPOSSIBLE to be good!
    Aspastic moron trying to justify his own mediocrity, hope his twitter friends encourage him in never releasing something successful in his lifetime by supporting this stupid mentality lmfao.

    • 2 months ago
      Anonymous

      I just hope that him and everyone itt dies a painful death

    • 2 months ago
      Anonymous

      That's not what he's saying. He's saying that the "dev" got shit done, unlike most professional devs.
      Why are you homosexuals seething this much?

      • 2 months ago
        Anonymous

        he got shit done 3 years delayed, it's moronic to think this is an example unless you want an excuse to be lazy. sure he got shit done, such as pokemon got shit done with a source code so bad they had to rewrite everything from scratch in gold/silver, the coding doens't matter in a medium made for children like videogames. kys.

  15. 2 months ago
    Anonymous

    I am just gonna write the same code 1000 times and that's a totally best practice, yes.

  16. 2 months ago
    Anonymous

    Sometimes code is better than structured data, because code can handle arbitary logic such as the if statements seen in the excerpt.

    • 2 months ago
      Anonymous

      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.

      • 2 months ago
        Anonymous

        The dumb Black person that made this "game" probably doesn't even know what a lambda/callback is

        • 2 months ago
          Anonymous

          Yet, he made millions $$$
          But sure, knowing what's a function pointer is makes you a better person than him.

          • 2 months ago
            Anonymous

            >he made millions $$$
            People make millions doing all kinds of bullshit. It's not an argument you fricking moron.

          • 2 months ago
            Anonymous

            Kinda is. Took the idea he had, hacked the shittiest code together that works, sold it and made millions.

            I've seen some terrible embedded code that just works, is not touched for decades just does what it needs to day in and day out. Money made. No one cares about your paradigms or ensuring clean code, they just want their software to do the thing.

          • 2 months ago
            Anonymous

            ah yes of course, youre above the realm, you just choose to be poor, fricking larper lol

      • 2 months ago
        Anonymous

        the logical part isnt tied to simple message choices, dumbass theres actual in game action involved, kys noproduct

  17. 2 months ago
    Anonymous

    ITT wagecuck developers seething
    I hope your bosses will appreciate your efforts and give you 3% salary increase this year

    • 2 months ago
      Anonymous

      ITT MVC codelet seethe that someone can make a better product than he ever will without concerning himself with ~~*aesthetical*~~ bullshit.

      • 2 months ago
        Anonymous

        >codelet
        You're the codelet defending a 1000 case switch
        Are you moronic or what?

      • 2 months ago
        Anonymous

        Also I told you that's just one of my open-source projects, I'm actually employed you troony techlet freak

        Yet, he made millions $$$
        But sure, knowing what's a function pointer is makes you a better person than him.

        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.

        • 2 months ago
          Anonymous

          Woah you're employed!! I'm employed too!!! We have so much in common!
          Stay with your jealousy, he is in his jacuzzi.

          • 2 months ago
            Anonymous

            Yeah but you're not SwE so what are you doing here, moron?

          • 2 months ago
            Anonymous

            No I'm not from Sweden.
            Are you from India (・3・) ?

          • 2 months ago
            Anonymous

            >he doesn't know SwE means software engineering
            The absolute state, genuinely have a nice day

          • 2 months ago
            Anonymous

            you're from India, I knew it.
            Good morning sir.

          • 2 months ago
            Anonymous

            Projecting as usual, rajesh?

        • 2 months ago
          Anonymous

          >I don't care how much he made by selling a dumb "game" you couldn't pay me play.
          >He's a dumb nocoder skid and that remains a fact.
          ask yourself the question what the frick is it that you actually do? seriously, what is it? why the frick do you do it? who are you coding for? why are you even coding? to shift product that is useful for other people or to satisfy your personal aesthetics? one of these things has value in society and the other is masturbation. you're shitting on a dude that has acheived more than you have on the basis of taste. because there is actually no final arbiter of code. no one is going to put this Black person in jail for 1000 switch cases. he will not be damned for all eternity for 1000 switch cases. it's literally not fricking important. and we know it's not important because the game is popular and playable and there is no end-user performance issue that can be determined. the important fact was a playable and enjoyable game for profit. he won, you have 240 peak users. just shut the frick up already, or maybe go lay a complaint in federal court or something? lol, lmao even.

          this is the problem with autists and trannies, they're literally incapable of understanding what is important and what is not.

          • 2 months ago
            Anonymous

            >no one is going to put this Black person in jail for 1000 switch cases.
            He should be publicly executed
            >you have 240 peak users
            And you're a dumb nocoder with 0 projects and 0 users

  18. 2 months ago
    Anonymous

    How sure are we that this is human-authored source code and not the output of a decompiler?

    • 2 months ago
      Anonymous

      He probably has all the dialogue in some kind of plaintext file that he then reads in with a script to generate that huge source block. He's not literally going through it going "okay here's case 1000 umm so msg[0] = ... yep then msg[1] ok now case 1001..."

      I'd imagine the switch gets optimized into a jump table so there's no runtime cost either.

      this. jesus christ. the text formatting should have been a dead giveaway. I'm not even a professional coder, but if you gave me a movie script .docx and a week, I could write a python script that converts it into game text too.

      this board is full of more brainrot than fricking reddit.

  19. 2 months ago
    Anonymous

    furry bait has nothing to do with game code.
    have a nice day.

  20. 2 months ago
    Anonymous

    this kid thinks he's owning the cs chuds instead of looking like the biggest moron

  21. 2 months ago
    Anonymous

    >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/"
    // ...

    • 2 months ago
      Anonymous

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

  22. 2 months ago
    Anonymous

    What's wrong with huge switches and huge if else cases if your game requires it? How can you do it better?

  23. 2 months ago
    Anonymous

    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?

    • 2 months ago
      Anonymous

      Pretty much the standard but it should be in an external JSON file

      • 2 months ago
        Anonymous

        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

        • 2 months ago
          Anonymous

          Imagine you have a thousand labels, you're not going to hardcode a thousand labels, right?

          • 2 months ago
            Anonymous

            >Imagine you have a thousand labels, you're not going to hardcode a thousand labels, right?
            Why not?

      • 2 months ago
        Anonymous

        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?

      • 2 months ago
        Anonymous

        JSON doesn't allow you to add ad hoc logic in the middle of dialogue.

    • 2 months ago
      Anonymous

      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)

      • 2 months ago
        Anonymous

        Imagine you have a thousand labels, you're not going to hardcode a thousand labels, right?

        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

    • 2 months ago
      Anonymous

      That's the obvious approach. Not that much better than a big switch and performs an order of magnitude worse.

      "if it works it works" Black folk when they have to change 1 thing retroactively and the whole spaghetti collapses into an incomprehensible mountain of problems that is impossible to debug

      Big switch is easier to change, safer and faster than most of the recommendations here like this tard

      Pretty much the standard but it should be in an external JSON file

      that wants to use a json file.

  24. 2 months ago
    Anonymous

    >People rediscovering the expression problem discourse.
    Nothing ever changes in this shit field full of zoomer fricks.

  25. 2 months ago
    Anonymous

    >dialogue hard coded
    no way this code is hand written. this has to be the output of some code generation process.

  26. 2 months ago
    Anonymous

    "if it works it works" Black folk when they have to change 1 thing retroactively and the whole spaghetti collapses into an incomprehensible mountain of problems that is impossible to debug

    • 2 months ago
      Anonymous

      Kindly explain how this structure makes it hard to change things. Pro tip: you can't.

    • 2 months ago
      Anonymous

      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.

    • 2 months ago
      Anonymous

      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.

  27. 2 months ago
    Anonymous

    Ashktually using json would be much faster and easier

    • 2 months ago
      Anonymous

      You don't store program code in JSON. Also
      It would not be faster during execution.

      Isn't converting from json to php just one extra step? I could just put the array in a separate file and include it as is

      PHP associative arrays are much faster than parsing json every time someone loads your website. Now for small amounts of text, it doesn't really matter.

  28. 2 months ago
    Anonymous

    Hit indie games that make their creators millionaires are made by brainlets who are coding only because they have to

    • 2 months ago
      Anonymous

      This is would be a problem if the game didn’t have ridiculously long turns full of flashy animations.

    • 2 months ago
      Anonymous

      string comparison is O(1) in lua btw, so this is the same as comparing the values to an enum value

    • 2 months ago
      Anonymous

      Art and music are the real barriers to vidyamaking.

      • 2 months ago
        Anonymous

        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.

  29. 2 months ago
    Anonymous

    How do you know it's not just generated code?

  30. 2 months ago
    Anonymous

    lmao IQfy seething because someone wrote actually useful code and it's not "clean" or "written in rust" or "functional" or whatever weekly meme

    • 2 months ago
      Anonymous

      Reading SICP didn't taught them how real life works
      sad 🙁

      • 2 months ago
        Anonymous

        >didn't taught them
        esl moron

        • 2 months ago
          Anonymous

          Pascal is my first one no bully >:(

    • 2 months ago
      Anonymous

      couldn't have summed it up better
      t. print debugger

  31. 2 months ago
    Anonymous

    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.

  32. 2 months ago
    Anonymous

    >poorgays seething

  33. 2 months ago
    Anonymous

    >decompiled code

  34. 2 months ago
    Anonymous

    the best code is the code that ships 😉

  35. 2 months ago
    Anonymous

    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

    • 2 months ago
      Anonymous

      What you're supposed to do is write sloppy the first time when you're prototyping, refactor for speed and ease of use when that starts to slow you down. You know, when you start spending an hour doing fricking copy paste monkey work because you decided to add a new line of dialog.

  36. 2 months ago
    Anonymous

    What's the alternative then, genius?

    • 2 months ago
      Anonymous

      map?

  37. 2 months ago
    Anonymous

    product over code
    every single time

  38. 2 months ago
    Anonymous

    LOL. Well he made it work, good for him, can't be mad about that

  39. 2 months ago
    Anonymous

    Why does discovering something you didn't know was unoptimized is unoptimized suddenly send this board into a frothing fury?

  40. 2 months ago
    Anonymous

    never done game dev.
    Definitely would not do this because it seems like a pain in the ass.
    What would you do though?

  41. 2 months ago
    Anonymous

    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.

  42. 2 months ago
    Anonymous

    I find the lack of aliases disturbing. Those magic numbers makes me feel uneasy.
    Other than that? It's fiiiine to some extent.

  43. 2 months ago
    Anonymous

    Yandev is still shit

  44. 2 months ago
    Anonymous

    >like every interesting procedure, it's a case analysis

  45. 2 months ago
    Anonymous

    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?

  46. 2 months ago
    Anonymous

    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.

    • 2 months ago
      Anonymous

      >but it's going to be incredibly hard to maintain
      It's not though. It's no harder to maintain than any of the alternative approaches in this thread. Stop listening to moronic Clean Code gays.

      • 2 months ago
        Anonymous

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

        • 2 months ago
          Anonymous

          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.

          • 2 months ago
            Anonymous

            >bro just wrangle the 60,502 switch statement conditions

          • 2 months ago
            Anonymous

            > bro just wrangle the json file with 60,502 entries

          • 2 months ago
            Anonymous

            You'd either use a node tree editor or a human editable file format, moron. You know, something that doesn't require you to memorize Conversation IDs or punish you for wanting to change the flow of dialog or adding another message.

          • 2 months ago
            Anonymous

            A switch doesn't make you memorize conversation IDs moron. You must be a braindead user of dynamically typed programming languages.

          • 2 months ago
            Anonymous

            A switch DOES make you memorize ids (conditions), moron. Also congratulations, you made your game twice as hard to translate.

          • 2 months ago
            Anonymous

            It does not. You're moronic and have no idea what you can do with a half decent type system. All of this could be statically typed and a decent approach would ensure that translations are exhaustive.

  47. 2 months ago
    Anonymous

    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

    • 2 months ago
      Anonymous

      Almost like hard coding dialog trees is a moronic way to manage dialog in an RPG.

      • 2 months ago
        Anonymous

        What about

        Hit indie games that make their creators millionaires are made by brainlets who are coding only because they have to

        • 2 months ago
          Anonymous

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

          • 2 months ago
            Anonymous

            So no real arguments against them other than it's not how you would do it. Crab.

  48. 2 months ago
    Anonymous

    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.

  49. 2 months ago
    Anonymous

    >global
    Mother of based. I need to suck Toby Fox's dick to get a taste of those coding god genes!

  50. 2 months ago
    Anonymous

    switches are fast, so there is really nothing wrong with this. far better than yanderedev's if-else tree

  51. 2 months ago
    Anonymous

    >it's real
    and they say indians can't code, what a fricking moron

    • 2 months ago
      Anonymous

      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

  52. 2 months ago
    Anonymous

    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.

  53. 2 months ago
    Anonymous

    Maybe I'm moronic, but couldn't this be the result of compilation and decompilation?

    Code and Data aren't normally stored together in memory, they're usually stored in section for execution and a separate section for data. I can imagine a compiler storing all strings in continuous memory, and a decompiler looking at that as if it were some type of jump table, and then spit out that it's a giant switch case.

    I can also see whatever game engine was used tried to optimize them as a lookup table of strings instead of holding the address to the string itself. So it can reference string 0 or string 1 in an attempt to either reuse some bit of code, avoid storing full addresses in memory, or implementing some form of position independant code/data.

    But again, maybe I'm just moronic and don't know how computers work.

  54. 2 months ago
    Anonymous

    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

  55. 2 months ago
    Anonymous

    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

  56. 2 months ago
    Anonymous

    This is unmaintainable. But its unlike writing chess or IsItEven in fricking switch statements for every possible input. Now that's moronic

    • 2 months ago
      Anonymous

      >unmaintainable
      >maintains spot as top indie title for years
      Skill issue.

      • 2 months ago
        Anonymous

        >copying earthbound and appealing to furnigs is skill
        kys

        • 2 months ago
          Anonymous

          You will never be successful.
          Everyone knows who Toby Fox is.
          Nobody knows your name.
          Anon.

          • 2 months ago
            Anonymous

            Nobody knows the israelites influencing your shithole country either.

          • 2 months ago
            Anonymous

            >you will never be a washed up fotm eceleb that nobody except lgbt autists actually know
            thank god

      • 2 months ago
        Anonymous

        NOOOOOOOOOOOOOO IT DOESNT COUNT!!!

    • 2 months ago
      Anonymous

      >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

  57. 2 months ago
    Anonymous

    I see no problem with it.

    Would be a big problem if he did it using IF ELSE statements.

  58. 2 months ago
    Anonymous

    I see no problem with long switch cases.
    But wtf is that hardcoded number 736?
    I would have used an enumerator.

    • 2 months ago
      Anonymous

      it is completely unmaintainable. if you decide to stop using a shitty global variable for your msgs then you have to change 10s of thousands of lines of code
      big stupids:

      I see no problem with it.

      Would be a big problem if he did it using IF ELSE statements.

      >but it's going to be incredibly hard to maintain
      It's not though. It's no harder to maintain than any of the alternative approaches in this thread. Stop listening to moronic Clean Code gays.

      Honestly it isn't that bad. Undertale is a pretty dialogue heavy JRPG so I can't really think of a better way to manage dialogue than a giga sized switch case. Remember, each dialogue instance in Deltarune can be affected by choices you've made, so it's probably the easiest, fastest and most maintainable way to manage the dialogue in the game.
      It's not like it has a performance impact, it's just a switch case.
      This runs every time a dialogue box opens.
      How else would you do it?

      Simple case of it just works. Switch statements are fast and works. He never meant to change it or expand on it.

      If you work at a big corporation, sure, go all design pattern autism on your code. If you need to get shit done, do whatever it takes.

      What's the alternative then, genius?

  59. 2 months ago
    Anonymous

    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.

    • 2 months ago
      Anonymous

      >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

    • 2 months ago
      Anonymous

      >What if he wants to change the language to spanish
      switch(language) {
      case spanish: /* spanish */
      default: /* english */
      }

    • 2 months ago
      Anonymous

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

    • 2 months ago
      Anonymous

      >He could have created an XML, with a code column, and a message column.
      I don't see how turning the code into a slurry of XML tags would improve things. Additionally, there'd need to be some way to add conditions, along with whatever else he used inline scripting to accomplish.

      >What if he wants to change the language to spanish.
      This can be put in another file with its own frick-huge switch statement.

      >With the current method he has to rewrite everything inside the source code and then recompile.
      Recompiling isn't a big deal, bro. Just press F5. It's not rocket science.

      • 2 months ago
        Anonymous

        >I don't see how turning the code into a slurry of XML tags would improve things. Additionally, there'd need to be some way to add conditions, along with whatever else he used inline scripting to accomplish.

        >What if he wants to change the language to spanish. With the current method he has to rewrite everything inside the source code and then recompile.
        still less gay than dealing with XML

        >y than dealing with XML

        >He could have created an XML, with a code column, and a message column.
        >Then the code would load everything from the XML into the memory.
        There is zero point to this, you're just complicating things for no reason.
        >What if he wants to change the language to spanish. With the current method he has to rewrite everything inside the source code and then recompile.
        Ah yes, I haven't even released my game yet but I'm gonna localize it into Swahili.
        In the unlikely case that anyone ever asks for a translation, just copy the file and translate every line. The game is done and you're not going to add any more dialogues anyway.
        The fanciest I'd ever get is some Qt-style tr() function, but adding that in after the fact is very easy.

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

        Wow, so many morons.
        You can use any fricking XML editor to change the text.
        Whoever is editing the text doesn't even need to be a programmer, you can give the XML file to any translator to get the job done.

        Has anyone here ever worked with software development?

        • 2 months ago
          Anonymous

          >You can use any fricking XML editor to change the text.
          great. now we have to waste more cpu time parsing xml Black folkhit.
          >Has anyone here ever worked with software development?
          you haven't.

        • 2 months ago
          Anonymous

          >i don't want to eat shit
          >but you can get it from ANY animal's ass!

    • 2 months ago
      Anonymous

      >I'm going to explain why the code is shit:
      >recommends making it worse by using xml
      weeeew lad. wew.

      >He could have created an XML, with a code column, and a message column.
      I don't see how turning the code into a slurry of XML tags would improve things. Additionally, there'd need to be some way to add conditions, along with whatever else he used inline scripting to accomplish.

      >What if he wants to change the language to spanish.
      This can be put in another file with its own frick-huge switch statement.

      >With the current method he has to rewrite everything inside the source code and then recompile.
      Recompiling isn't a big deal, bro. Just press F5. It's not rocket science.

      >I don't see how turning the code into a slurry of XML tags would improve things.
      it wouldn't improve anything

  60. 2 months ago
    Anonymous

    I will never understand the appeal of this homosexual game. You need to be a massively gay moron to enjoy a game like undertale.

    • 2 months ago
      Anonymous

      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.

  61. 2 months ago
    Anonymous

    I don't care about programming or games for poofters, this thread doesn't interest me at all.

  62. 2 months ago
    Anonymous

    The world is simply not fair.
    Get over it.

  63. 2 months ago
    Anonymous

    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.

  64. 2 months ago
    Anonymous

    Undertale sucks ass so it doesn't surprise me that the guy is a technical moron in addition to everything else

  65. 2 months ago
    Anonymous

    I can't tell if this one of those rage bot farms or the morons praising this code are serious and just idiots. they make like 3 logical fallacies in a row to justify this crap.
    to the idiots defending this shit, show me YOUR garbage code that makes you millions. ill wait.
    IQfy and the internet has a problem with non-programmers thinking theyre programmers. if you've output less than 10,000 lines of code, stop talking about programming. stop posting in language wars threads. stop talking about programming paradigms. you do not, and I repeat this again, you DO NOT KNOW what you're talking about. you ARE an armchair expert with 100% certantity if you have written less than 10k loc. i dont care how many wiki articles youve read and coding streamers youve watched
    >i can't think of a better way to do it so...
    yes, we know. you arent a programmer. we fricking know.

    • 2 months ago
      Anonymous

      So... where's your opmitized code that made you millions?

      • 2 months ago
        Anonymous

        where's your massive switch case that revolutionized the industry?

  66. 2 months ago
    Anonymous

    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.

    • 2 months ago
      Anonymous

      > performance problems
      With basically any compiler in the last 50 years the switch statement is faster than all other approaches by far.

    • 2 months ago
      Anonymous

      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

  67. 2 months ago
    Anonymous

    >IQfy shits on YandereDev for using long elseif statements instead of switches
    >IQfy shits on Undertale for using long switches

    So what the frick am I supposed to use in cases like this? I'm learning so please tell me because I want to exercise good practices

    • 2 months ago
      Anonymous

      Key based file parsing. That's essentially what that is anyway

    • 2 months ago
      Anonymous

      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()

      • 2 months ago
        Anonymous

        This isn't any more maintainable and is slow as frick compared to the switch.

        • 2 months ago
          Anonymous

          wrong on both

          • 2 months ago
            Anonymous

            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.

          • 2 months ago
            Anonymous

            places where you're wrong:
            - the switch will not get compiled to a jump table, this is game maker not cpp. it will probably be an if-else that checks each and every case each time. the map is probably faster
            - json, yml, xml, etc get checked by both your ide and when parsed so there isnt less checking

            just stop talking moron you haven't done this before.

          • 2 months ago
            Anonymous

            > gamemaker
            Your fault for using moronic trash.
            > there isnt less checking
            There is less checking. In the JSON file you could replace a string with any random type and it wouldn't complain. It also isn't even parsed until runtime. What your shitty IDE does is completely irrelevant.

          • 2 months ago
            Anonymous

            >Your fault for using moronic trash.
            you mean toby's fault because this thread is about his undertale game maker code? kek you really are clueless and getting angry.
            >In the JSON file you could replace a string with any random type and it wouldn't complain.
            you can write an extra line of code to type check it in the 0.001% chance you wrote the number 4 instead of your string
            kek dude just stop posting you're getting desperate

          • 2 months ago
            Anonymous

            >you can write an extra line of code to type check it
            I accept your concession.

          • 2 months ago
            Anonymous

            coping so hard. also in the toby dogshit code you can have a massive error by getting the indexes wrong and there would be no error even at runtime just silently missing dialogue you could miss. you have no arguments and i have hundreds. you found yourself talking about something you know nothing about with someone who does and now you're fricked kek

          • 2 months ago
            Anonymous

            >you can have a massive error by getting the indexes wrong
            Switches can have a default case. You can easily have the same problem with your frick-huge json file that even you yourself have admitted is less safe and more error prone.

          • 2 months ago
            Anonymous

            >you can have a massive error by getting the indexes wrong
            not talking about that one, talking about the on used to index global.msg
            you're so clueless and confused dude. i hope youre a teen because if youre an adult and this stupid.........

          • 2 months ago
            Anonymous

            You're getting so emotional and have yet to give a single reason why your 10,000 line JSON file is more maintainable even though you've already admitted that it's slower and more error prone. You're pretty much the typical clean code advocate.

          • 2 months ago
            Anonymous

            nah its faster after parse and far less error prone, you just lost an argument and are now trying to save face by not understanding anything, or are just actually dumb

          • 2 months ago
            Anonymous

            confession denied.

        • 2 months ago
          Anonymous

          you don't even have to edit source code to maintain one that parses from a file. it is by definition 0 maintenance you are moronic

          • 2 months ago
            Anonymous

            Editing source code is not a significant problem moron.

      • 2 months ago
        Anonymous

        Where is the part where it handles dialogue options?

        • 2 months ago
          Anonymous

          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)

          • 2 months ago
            Anonymous

            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

          • 2 months ago
            Anonymous

            Inline scripting makes it even more cancer. As has been already been said, you *can* do it this shit way, but he probably spent way too many hours managing the shit show. He likely spent 3x or more time on dialog than he should've which makes me think what compromises he made along the way.

          • 2 months ago
            Anonymous

            >Inline scripting makes it even more cancer
            And what's the alternative? Adding a bunch of extra control codes? That's a lot of extra work just so you can put the script in a text file.

          • 2 months ago
            Anonymous

            Its been explained. If you can't understand from that, don't talk about programming.

          • 2 months ago
            Anonymous

            You shouldn't put scripts in a text file. That's amateur hour shit.

          • 2 months ago
            Anonymous

            have a nice day moron

          • 2 months ago
            Anonymous

            its fine, any example given can be retrofitted and will work better than toby's shit. and if something really generic is needed you can use a lambda. im not just going to code a full dialogue system for IQfycels, i already rewrote everything posted in this thread better.

          • 2 months ago
            Anonymous

            You can swap the number map to an array making it as fast as a pointer table to shut the maps-are-slow idiot up but otherwise its good.

    • 2 months ago
      Anonymous

      It's gamedev. You don't do best practices, you hammer shit out until it compiles and stops stuttering at runtime.

    • 2 months ago
      Anonymous

      >>IQfy shits on YandereDev for using long elseif statements instead of switches
      Yanderedev's code is trash but simply using switch statements won't fix it. The biggest issue was that he was encoding states using strings and that wasn't even the main cause of the poor performance, which was actually caused by things like toothbrush models containing the highest polygon counts.

      • 2 months ago
        Anonymous

        >The biggest issue was that he was encoding states using strings
        Literally zero problem with that

        • 2 months ago
          Anonymous

          Witnessed == WitnessType.BloodInsanity is 18 times faster than Witnessed == "Blood and Insanity".

          • 2 months ago
            Anonymous

            and a typo can break your whole program.

            >The biggest issue was that he was encoding states using strings
            Literally zero problem with that

            needs to suicide

          • 2 months ago
            Anonymous

            not in c#. c# has interned strings and Witnessed == "Blood and Insanity" becomes a comparison of 2 pointers

          • 2 months ago
            Anonymous

            I didn't know that, but still the compiler won't complain if you've made a typo in the string but it definitely will complain if you've done the same thing with an enum name.

      • 2 months ago
        Anonymous

        It used to be a joke making fun of bad programmers but now that's 99% of IQfy its just gotten absurd as you can see

        • 2 months ago
          Anonymous

          The bad programmers are the ones that follow Clean Code and create horribly abstracted slow bullshit.

          • 2 months ago
            Anonymous

            nah they've made literal billions of dollars off that code. lets see your shit.

          • 2 months ago
            Anonymous

            No they haven't. Uncle Bob and his troony followers are poor.

          • 2 months ago
            Anonymous

            yea dude faang is poor kek

          • 2 months ago
            Anonymous

            Other than Netflix FAANG companies ignore most of this shit. Spring, RoR and all the clean code nonsense is banned at Google and Meta and Uncle Bob is considered a lolcow.

            Casey is right.

          • 2 months ago
            Anonymous

            Massive, massive cope. corps are the sole source of clean code

          • 2 months ago
            Anonymous

            There are 10,000 line switches in Google's mono repo.

            >https://www.polygon.com/2020/1/13/21064100/vvvvvv-source-code-game-development-terry-cavanagh-release/
            Same thing here for the game VVVVVV.

            OMG WE BETTER TURN THIS INTO A BUNCH OF SEPARATE CLASSES THAT IMPLEMENT AN INTERFACE AND USE RUNTIME BASED POLYMORPHISM

          • 2 months ago
            Anonymous

            and there's a 30 deep inheritance hierarchy in one of meta's open sources. your point?

          • 2 months ago
            Anonymous

            That most web and desktop developers are drooling monkeys and have no room to criticize game devs

      • 2 months ago
        Anonymous

        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.

  68. 2 months ago
    Anonymous

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

  69. 2 months ago
    Anonymous

    Somehow I doubt it.

  70. 2 months ago
    Anonymous

    If this is disassembly it literally means nothing. The case statements being immediates is sussy as hell.

  71. 2 months ago
    Anonymous

    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.

    • 2 months ago
      Anonymous

      It's zoomer earthbound pretty much.

      • 2 months ago
        Anonymous

        earthbound never really had that popularity, so I'll say it again it's like zoomergen's 90s JRPG

        • 2 months ago
          Anonymous

          90s JRPG also didn't had that popularity. Undertale is one of the most popular games in the world.

          • 2 months ago
            Anonymous

            >didnt have that popularity
            You have to account for the differences in scale first with the population being nearly 60% higher in 2015 and the proliferation of easier access to vid game consoles (a SNES game cost $30-50 USD in the early 90s) but even then Earthbound sold less than half a million units by year 2000 outside of Japan.
            The quad-game trio of FF6, 7, 8 and 9 sold nearly 10 million units by that same time. Earthbound, again, was bought by far, FAR less than half a million people outside of Japan.

            So again, I know you were saying "it's like Earthbound!" as a game, I was saying "it's the 90s JRPG game for Zoomer generation"

  72. 2 months ago
    Anonymous

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

  73. 2 months ago
    Anonymous

    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.

  74. 2 months ago
    Anonymous

    >https://www.polygon.com/2020/1/13/21064100/vvvvvv-source-code-game-development-terry-cavanagh-release/
    Same thing here for the game VVVVVV.

    • 2 months ago
      Anonymous

      that one's different and ok its basically a state machine

      • 2 months ago
        Anonymous

        It's the same thing, just at an earlier stage.

        • 2 months ago
          Anonymous

          no its called a state machine you fricking jeet. op code is just being too moronic to have a real lookup table

    • 2 months ago
      Anonymous

      That is because it was originally a flash game and it was easier to do this monstrosity than rewrite the whole thing

  75. 2 months ago
    Anonymous

    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

  76. 2 months ago
    Anonymous

    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.

  77. 2 months ago
    Anonymous

    ~~*Game of the year*~~

  78. 2 months ago
    Anonymous

    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?

    • 2 months ago
      Anonymous

      >replies with no context off-topic

  79. 2 months ago
    Anonymous

    This whole thread is just Pajeets calling people who don't subscribe to their moronic Pajeet coding trannies. If you think this is acceptable, you are a fricking Jeet and that's the end of the story. This new trend of calling good code "troony" reeks of fricking curry.

    • 2 months ago
      Anonymous

      Yes, it's insane, if wonder if it's all the same pajeet seething about clean code.

      • 2 months ago
        Anonymous

        idk dude. the anti-clean code movement on IQfy has like 1% good coders advocating for decent code and 99% idiots saying op code is genius because they can actually understand that one with their 2 weeks coding experience

    • 2 months ago
      Anonymous

      Jeets refuse to use switch statements and use maps for everything despite how terrible they are for performance.

    • 2 months ago
      Anonymous

      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?

    • 2 months ago
      Anonymous

      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

    • 2 months ago
      Anonymous

      There's nothing "clean code" about telling you you're fricking moron hard coding your dialog tree of 100,000 words as a switch statement.

      • 2 months ago
        Anonymous

        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!

        • 2 months ago
          Anonymous

          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.

          • 2 months ago
            Anonymous

            > unoptimized switch statement
            kek

          • 2 months ago
            Anonymous

            You think gml actually uses jumptables?

          • 2 months ago
            Anonymous

            GML these days gets converted into C++ and compiled. But either way, it's not a performance issue as far as I'm aware.

          • 2 months ago
            Anonymous

            >The language's default mode of operation on native platforms is via a stack machine; it can also be source-to-source compiled to C++ via LLVM for higher performance.[26] On HTML5, GML is source-to-source compiled to JavaScript with optimizations and minification applied in non-debug builds.
            yea still, i don't think undertale used the llvm mode. js definitely will not use a jump table. it *might* be *fine* if you set it up right, but its going to suck a lot of the time. i can think of 2 ways to do it faster.
            anyway performance doesnt matter much with pixel indie shit, the problems with the code are more to do with other things.

          • 2 months ago
            Anonymous

            And reading through the thread it seems i'm arguing with a pajeet that already got told off earlier multiple times

          • 2 months ago
            Anonymous

            v8 will convert it to a jump table if all keys are either integers or strings.

          • 2 months ago
            Anonymous

            i use troonyfox

        • 2 months ago
          Anonymous

          YEAH ANON JSON IS THE ONLY WAY TO SAVE TEXT AS A MANAGED HUMAN READABLE FILE

      • 2 months ago
        Anonymous

        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.

        • 2 months ago
          Anonymous

          see

          Inline scripting makes it even more cancer. As has been already been said, you *can* do it this shit way, but he probably spent way too many hours managing the shit show. He likely spent 3x or more time on dialog than he should've which makes me think what compromises he made along the way.

          >Inline scripting makes it even more cancer
          And what's the alternative? Adding a bunch of extra control codes? That's a lot of extra work just so you can put the script in a text file.

          You shouldn't put scripts in a text file. That's amateur hour shit.

          your switch statement will never be good toby

        • 2 months ago
          Anonymous

          The difference is you can have a text file that doesn't mix code with dialog. And even better, you can make a parser that validates and tests your dialog system too so you can ensure there's no dead paths. You know, because you're fricking doing spaghetti string bullshit anyways.

  80. 2 months ago
    Anonymous

    what am I reading. toby fox doesn't even code he just used rpg maker

  81. 2 months ago
    Anonymous

    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.

    • 2 months ago
      Anonymous

      Nobody is misunderstanding anything. People are having a laugh because you clean code homosexuals love to claim things are unmaintainable and that your way is better but when pressed you can't substantiate that with evidence or even a remotely decent explanation. You're brainlets that just regurgitate nonsense from people that think RoR garbage is the pinnacle of programming.

      Nobody actually gives a shit about this switch case bullshit.

      • 2 months ago
        Anonymous

        hope jeetcode switch casers aren't laughing, because itt not one of them has provided solid evidence for why using a 1000 long switch case for dialogue is ok. they're total fricking tools. complete idiots

        • 2 months ago
          Anonymous

          >they
          It's literally all one jeet, probably OP

        • 2 months ago
          Anonymous

          >dialogue is ok
          Their evidence is the tens of millions of dollars they made from their game that performs well on a flip phone from 2002.

          We're laughing at the people that don't know how to code who watched a casey video and now are convinced switch cases are the savior of the white race and need to come on here to culture war about that.

          Nobody cares about the switch moron. The funny part is that you can't actually explain why it's bad.

          • 2 months ago
            Anonymous

            >Their evidence is the tens of millions of dollars they made from their game that performs well on a flip phone from 2002.
            java has clean code-tier principles baked into the lang and also has generated trillions of dollars and actually did run on 2002 phones unlike this
            >Nobody cares about the switch moron
            the entire thread is about the switch. most posts are about the switch. in fact, i care about how bad this specific switch is more than any coding philosophy argument
            >The funny part is that you can't actually explain why it's bad.
            done multiple times:

            Inline scripting makes it even more cancer. As has been already been said, you *can* do it this shit way, but he probably spent way too many hours managing the shit show. He likely spent 3x or more time on dialog than he should've which makes me think what compromises he made along the way.

            coping so hard. also in the toby dogshit code you can have a massive error by getting the indexes wrong and there would be no error even at runtime just silently missing dialogue you could miss. you have no arguments and i have hundreds. you found yourself talking about something you know nothing about with someone who does and now you're fricked kek

            you don't even have to edit source code to maintain one that parses from a file. it is by definition 0 maintenance you are moronic

            it is completely unmaintainable. if you decide to stop using a shitty global variable for your msgs then you have to change 10s of thousands of lines of code
            big stupids:

            [...]
            [...]
            [...]
            [...]
            [...]

            how bad faith are you lmfao

      • 2 months ago
        Anonymous

        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.

  82. 2 months ago
    Anonymous

    Not nitpicking and just doing it is a valuable skill
    I am trying my hardest to learn it. Perfectionism is unironically my biggest problem.

Your email address will not be published. Required fields are marked *