• SGG@lemmy.world
    link
    fedilink
    English
    arrow-up
    60
    ·
    28 days ago

    Honestly back when I was a kid this is how I thought games were made, every possible image of a game was already saved and according to your input it just loaded the next image.

    I stopped thinking that with 3d games

    • 0ops@lemm.ee
      link
      fedilink
      arrow-up
      21
      ·
      28 days ago

      I thought that they were managing that stuff on a per-pixel basis, no engine, assets, or other abstractions, just raw-dogging pixel colors.

      And before I even played video games at all I was watching somebody play some assassin’s creed game I think and I thought the player had to control every single limb qwop-style.

      • DogWater@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        27 days ago

        Apparently ai is learning to do that first thing you said about pure pixel management. It’s crazy that it works at all

    • papalonian@lemmy.world
      link
      fedilink
      arrow-up
      6
      ·
      28 days ago

      I remember having a thought one day as a young kid while interacting with a DVD main menu (the kind that had clips from the movie playing in the background, and would play a specific clip depending on what menu you went in to).

      “This is basically how video games work, there’s a bunch of options you can choose from and depending on what you do it shows you something. Videogames are just DVD menus with way more options.”

      I grew up to not be a programmer.

    • Scoopta@programming.dev
      link
      fedilink
      arrow-up
      5
      ·
      28 days ago

      Even with 2D games that’s basically impossible. Only time it could work is with turn based games and then…you end up with this post lol.

    • TheTechnician27@lemmy.world
      cake
      link
      fedilink
      English
      arrow-up
      1
      ·
      28 days ago

      I remember speculating as a (small) kid that the AI soldiers in Battlefront II’s local multiplayer might be real people employed by the developer. Not the brightest child was I.

  • Lovable Sidekick@lemmy.world
    link
    fedilink
    English
    arrow-up
    10
    ·
    27 days ago

    This reminds me of one of my very first programs, a tic-tac-toe game I wrote in high school. It displayed hardcoded grids of Xs and Os and blanks very similar to what’s shown here. This approach worked because of the much more limited move possibilities. The program could always win if it made the first move, and always win or tie if the human moved first, depending on if the human made mistakes. I wish I still had the code.

  • the16bitgamer@programming.dev
    link
    fedilink
    arrow-up
    3
    ·
    edit-2
    27 days ago

    They are doing it dumb. You can text output chess but you just need to keep track of where the pieces are in code, then when you are ready to output, place the characters. Saves so much time. /s

  • wewbull@feddit.uk
    link
    fedilink
    English
    arrow-up
    1
    ·
    27 days ago

    At university I had an introductory C course where one assignment was to write a program that searched a 4x4 array of booleans for groups of cells set to true. Groups had to be rectangles, powers of 2 in width and height, and could wrap (i.e. they could go off the right edge and back on the left edge). We had to submit our programs by e-mail and printed form one week later. The prof. marked the paper versions and the TA ran and tested the digital. One slight problem, if you used the university owned printers, they charged for print outs. A few pence per page to cover costs and stop people abusing the rather nice high quality printers the computer faculty had.

    I’d always enjoyed programming and whilst C was new to me, using another language wasn’t a big problem. As I worked on it I realised the problem wasn’t as straightforward as I first thought, but I spent a few hours on it that evening and had a solution I was happy with.

    Penny was a student on the course whose approach to academia was memorization. She didn’t consume, process, and apply concepts. She just remembered them. Her favourite subject was maths. While the rest of us were struggling to derive some formula, she’d have just committed the process to memory.

    Penny was complaining a lot on this programming assignment. She didn’t understand why the assignment was so hard for an introductory class. I didn’t judge. I know some people find programming hard, but I didn’t feel I could help her much without jeopardising my own mark. There’s only so much uniqueness in a small program and if she just copied my solution we’d both get penalised for plagiarism. I did mention to her the cases I’d found tricky to get right was when two groups overlapped. If one group completely covered a smaller one you’d only report the bigger one, but if not you’d report both groups.

    I heard, through her boyfriend, that that week had involved many long evenings working on this assignment, but she turned up at the next class solution in hand. Obviously stressed, she carried a pile of paper of several hundred pages. She had written a program that consisted of an if-statement for every possible group size and location. About a hundred different possible groups. Each condition written with constant value indices into the array. To cope with the overlapping groups problem, checks for smaller groups also checked that no larger group also covered this area. No loops. No search algorithm. Just a linear program of if-statements.

    Apparently debugging this has been a nightmare. Cut and paste errors everywhere, but when I’d told her about overlapping groups aspect it had blown her mind. There always seemed to be a combination she hadn’t accounted for. Multiple times she thought she was done, only to find a corner case she’d missed. And just to kick her when she was down, she’d paid for multiple printouts, each one costing about £10 only to find a problem afterwards.

    This consistent A grade student who sailed through everything by relying on her memory had been broken by being asked to create an algorithm rather than remember one. She got credit for submitting a solution that compiled and solved some cases, but I doubt the professor got past the first page of that huge printout.

    Penny had worked really hard for that D.

  • Anomalocaris@lemm.ee
    link
    fedilink
    arrow-up
    1
    ·
    27 days ago

    not to get epistemological,

    but I hate that technically there’s only a limited number of moves in chess, and therefore the best move is there, maybe there’s a strategic where white will always win, but we’ll never know because the number of variations likely is larger than atoms in the universe.

    • NιƙƙιDιɱҽʂ@lemmy.world
      link
      fedilink
      arrow-up
      5
      ·
      27 days ago

      On the lower end of estimates, the number of unique chess board configurations is 10^120, often referred to as the Shannon number. The universe doesn’t stand a chance.

    • expr@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      27 days ago

      In modern chess, engines have gotten good enough that we generally do know the top moves and humans can’t beat them. We can even numerically assess someone’s chess play with a computer, which we call “accuracy”. Obviously they can always be improved further, and there are a handful of situations where they might misevaluate, but it’s still pretty incredible.

      Engines have only made chess more exciting as they have shattered a lot of old theory and helped people find a lot of new and innovative ideas. They are an incredible aid in analysis and tournament prep.

      • Anomalocaris@lemm.ee
        link
        fedilink
        arrow-up
        2
        ·
        27 days ago

        yhea, but engines still act as if it is an unsolved game.

        while in theory, given that the number of moves is limited, in theory one colour would always win.

        • Eatspancakes84@lemmy.world
          link
          fedilink
          arrow-up
          1
          ·
          27 days ago

          The solution to chess is almost certainly a draw, since this is what all top engine chess converges to. Otherwise you are completely correct: chess is unsolved and will likely never be solved.