HNNewShowAskJobs
Built with Tanstack Start
Codex, Opus, Gemini try to build Counter Strike(instantdb.com)
229 points by stopachka 4 days ago | 73 comments
  • BearOso3 days ago

    I tried to find some code that wasn't minified to assess the quality of this, and I found some shader code for the sky in the gemini version. The whole shader looks like it was regurgitated verbatim. This wouldn't hold up to licensing scrutiny. Here's a snippet from it:

      // wavelength of used primaries, according to preetham
      const vec3 lambda = vec3( 680E-9, 550E-9, 450E-9 );
      // this pre-calcuation replaces older TotalRayleigh(vec3 lambda) function:
      // (8.0 * pow(pi, 3.0) * pow(pow(n, 2.0) - 1.0, 2.0) * (6.0 + 3.0 * pn)) / (3.0 * N * pow(lambda, vec3(4.0)) * (6.0 - 7.0 * pn))
    
    Who's Preetham? Probably one of the copyright holders on this code.
    • nineteen9997 hours ago |parent

      Preetham is the author of the paper that defines this algorithm from 1999:

        https://tommyhinks.com/2009/02/10/preetham-sky-model/
      
        https://tommyhinks.com/wp-content/uploads/2012/02/1999_a_practical_analytic_model_for_daylight.pdf
      
      Rather than stolen from Mr. Preetham, it's much more likely this fragment is generated from a large number of Preetham algorithm implementations out there, eg. I know at least Blender and Unreal implement it and probably heaps of others was well.

      Nobody is going to sue you for using their implementation of a skybox algorithm from 1999, give us break. It's so generic you can probably really only write it in a couple of different ways.

      If youre worried about it you can always spend a day with Claude, ChatGPT and yourself looking for license infringements and clean up your code.

      • bilekas4 hours ago |parent

        > Nobody is going to sue you for using their implementation of a skybox algorithm from 1999, give us break.

        For personal use maybe not, but that's not the point, the point is it's spitting out licensed code and not even letting you know. Now if you're a business who hire exclusively "vibe" coders with zero experience with enterprise software, now you're on the hook and most likely will be sued.

        • mgraczyk2 hours ago |parent

          Do you have any evidence that it is spitting out licensed code? Did you locate an original that it was copied from?

          • bilekas2 hours ago |parent

            This particular case appears to me to be a straight derivative at best but I'm by no means an expert on copyright laws.

            That's not to say there hasn't already been more direct cases with set examples [1], from an author directly who would have a better right to claim than I [2], it's not even a stretch to see how it can happen.

            [1] https://arxiv.org/html/2408.02487v3

            [2] https://x.com/DocSparse/status/1581461734665367554

      • rusk3 hours ago |parent

        > implementation of a skybox algorithm from 1999

        How would you know? Do you have another AI scan for copyright violations? In terms of a false negative how are disputes resolved?

        Seems like a massive attack surface for copyright trolls.

        • nineteen9992 hours ago |parent

          > Seems like a massive attack surface for copyright trolls.

          If you think any court system in the world has the capacity to deal with the sheer amount an LLM code can emit in an hour and audit for alleged copyright infringements ... I think we're trying to close the barn door now that the horse is already on a ship that has sailed.

          • Quarrelan hour ago |parent

            This is a terrible argument, just because of the way the legal system works.

            If MegaCorp has massive $$$$, but everyone else has small $, then MegaCorp can sue anyone else for using "their" code, that was supposedly generated by an LLM. Most of the time, it won't even get to court. The repo, the program, the whatever-they-want will get taken down way before that.

            Courts don't work by saying, "oh, but everyone is doing it! Not much we can do now."

            Someone brings a case and they, very laboriously, start to address it on its merits. Even before that, costs are accumulating on both sides.

            Copyright trolls are mostly not MegaCorps, but they are abusers of the legal system. They won't target Google, but you, with your repo that does something that minorly annoys them? You are fair game.

    • toat3 days ago |parent

      No. A J Preetham: https://www.researchgate.net/publication/220720443_A_Practic...

    • speedgoose6 hours ago |parent

      I also noticed that AI agents commit many copyright infringements with the work of Mr Dijkstra.

      • georgefrownyan hour ago |parent

        Messrs Newton and Raphson would like to join this class-action.

      • pwatsonwailes2 hours ago |parent

        That's a stellar observation right there.

    • stopachka3 days ago |parent

      If you're curious about the source, here's the snapshot:

      Codex: https://github.com/stopachka/cscodex Gemini: https://github.com/stopachka/csgemini Claude: https://github.com/stopachka/csclaude

      • BearOso2 days ago |parent

        Thanks. Turns out that shader is a builtin of three.js.

      • wahnfrieden13 hours ago |parent

        Please try again with Codex on High or Extra High. 5.1-Max nerfed it a bit if you don't use higher thinking.

        • rusk3 hours ago |parent

          This is overparameterisation

    • petterroea6 hours ago |parent

      A lot of computer graphics algorithms are named after their authors

    • fbrncci6 hours ago |parent

      The idea that someone could hold copyright over such a tiny snippet of code is just as stupid as LLMs regurgitating them.

      • spacedoutman5 hours ago |parent

        Personally i find it absurd that code can be copyrighted at all.

        • NitpickLawyer5 hours ago |parent

          Copyright is so-so. At the end of the day you can say that the complete work (not just snippets) is something copyrightable. But the most bananas thing for me is that one can patent the concept of one click purchasing. That's insane on many levels.

          • simultsop2 hours ago |parent

            Why bananas? That is the biggest invention after edisons bulb.

    • 20k9 hours ago |parent

      I always find it amazing that people are wiling to use AI beacuse of stuff like this, its been illegally trained on code that it does not have the license to use, and constantly willy nilly regurgitates entire snippets completely violating the terms of use

      Edit:

      https://github.com/vorg/pragmatic-pbr/blob/master/local_modu...

      https://github.com/vorg/pragmatic-pbr/blob/master/local_modu...

      This looks like where the source code was stolen from: this repository is unlicensed, and this is copyright infringement as a result

      • gpm6 hours ago |parent

        As discussed in this thread before you posted this comment, this code wasn't generated from an LLM at all, but simply included in a dependency: https://news.ycombinator.com/item?id=46092904

        Unlike your results which aren't exact match, or likely even a close enough match to be copyright infringment if the LLM was inspired by them (consider that copyright doesn't protect functional elements), an exact match of the code is here (and I assume from the comment I linked above this is a dependency of three.js, though I didn't track that down myself): https://github.com/GPUOpen-LibrariesAndSDKs/Cauldron/blob/b9...

        Edit: Actually on further thought the date on the copyright header vs the git dates suggests the file in that repo was copied from somewhere else... anyways I think we can be reasonably confident that a version of this file is in the dependency. Again I didn't look at the three.js code myself to track down how its included.

        If there's any copyright infringment here it would be because bog standard web tools fail to comply with the licenses of their dependencies and include a copy of the license, not because of LLMs. I think that is actually the case for many of them? I didn't investigate the to check if licenses are included in the network traffic.

        • pastagean hour ago |parent

          There are several cases where copyright law is not only about exact copy but also derivatives. So finding an exact match is not necessary.. Not sure it matters in this case eitherway.

      • vintermann5 hours ago |parent

        I have been trained on code I don't have the license to use myself. I'm not like these Creators, who suck wisdom from the cosmos directly, apparently.

        Sure. It's a problem that corporations run by more or less insane people are the ones monetizing and controlling access to these tools. But the solution to that can't be even more extended private monopolistic property claims to thought-stuff. Such claims are usually the way those crazy people got where they are.

        You think in a world where Elsevier didn't just own the papers, but rights to a share in everything learned from them, would be better for you?

      • bryanhogan8 hours ago |parent

        It's fascinating that people care very much about this when it's visual arts, but when it comes to code almost no one does.

        E.g. the latest Anno game (117) received a lot of hate for using AI generated loading screen backgrounds, while I have never heard of a single person caring about code, which probably was heavily AI generated.

      • conradev3 hours ago |parent

        I believe it is MIT-licensed code from three.js: https://github.com/mrdoob/three.js/blob/55b4bbb7ef7e29b214b9...

      • nerdponx9 hours ago |parent

        You presume that people care about things like this. A lot of people don't.

        • 20k8 hours ago |parent

          Companies should. Its a business risk, you open yourself up to legal action

          • nineteen9997 hours ago |parent

            "Claude - rewrite this apparently copyrighted code that can be found online here <http://...> in a way that makes it a unique implementation." <- probably will work.

      • adastra226 hours ago |parent

        The courts have ruled that generated output is not infringing.

        • lukas0996 hours ago |parent

          If I say, “output the contents of X verbatim” and then use the output, am I free from liability?

          • adastra224 hours ago |parent

            If the generated code in TFA contained the actual Counter-Strike source code, then you (well, Valve) would have a defensible claim. But the prompt was to make something like Counter-Strike, and it came up with something different. That's fair game.

      • staticassertion7 hours ago |parent

        Is it copyright infringement? It's a fundamental algorithm.

    • jstummbillig5 hours ago |parent

      If only this particular regurgitation engine took a minute to check their work.

  • gs1713 hours ago

    Claude's has a funny bug where if you keep shooting a dead player before they respawn, you rack up kills fast. I thought I was doing so well until I realized. Impressive that they can get this far now.

    • abrookewood13 hours ago |parent

      hah ... I think you were killing me!

  • andai8 hours ago

    I thought this would be about getting the actual Counter Strike to build, which is something they are also pretty good at. I had Claude debug an old C project of mine the other day and get it up and running.

    Furthermore, if you have it sandboxed, you can also ask it to also install any necessary dependencies or toolchains, which is really nice.

  • vpShane4 days ago

    Wow, that makes me want to check it out more thoroughly (if I had the time)

    I remember when CS Pro Mod was being made between the transition of CS 1.6, Source, the 1.6 community didn't want to move over to Source, before GO/CS2 came around.

    Cool to see what's basically Quake1/doom style but this is a far fetch away from counter-strike. Although if netcode could be imagined and implemented I don't see why making a lower tier Counter-Strike wouldn't be doable. I'd play it if it were the quake style old-graphics version of CS that allowed for skill gaps.

    Great article, love the nostalgic feeling.

    • reactordev13 hours ago |parent

      Source had some insane rag doll. CS players weren’t ready for the physics and honestly, Valve spent a hell of a lot of effort to refine the physics for CS:GO to make it feel like CS1. Kudos to the dev teams.

      I’d also love a Battle-bits CS version. (Battle-bits was a fun Battlefield low poly spoof).

    • stopachka4 days ago |parent

      Thank you for the kind words : )

  • parasec5 hours ago

    That's great!

    Now show us the cost, the time it took, and how much babysit... sorry, "human supervision" was necessary.

    • parasec4 hours ago |parent

      Anthropic shared some approximate numbers on their Smart Contracts post. A 5h research assignment currently has an API cost of ~3.500USD.

      • SkinTaco2 hours ago |parent

        What does 3.500USD mean? Are we bringing back the half-penny?

        • credditan hour ago |parent

          He’s European and uses a “.” instead of a “,”

          • 4gotunameagain26 minutes ago |parent

            Varies by country in Europe.

  • mnau2 hours ago

    This makes me depressed. LLMs will take the most enjoyable part of my job and I will be stuck reviewing or fixing bugs in their "it-compiles" codebase.

    • mgraczyk2 hours ago |parent

      On the contrary, coding for me has become more fun than ever since Opus 4.5. I'm working more and genuinely enjoying it a lot more, haven't had this much fum building software in years. (I work at Anthropic but have also tried Gemini, it's also fun)

      • mnau2 hours ago |parent

        Yes, lived experiences differ from person to person.

  • james_marks2 hours ago

    Nice article-as-ad for their DB product. The product itself reminds me of MeteorJS, which seemed like it could take over in ~2016, and then... didn't.

  • camgunz2 hours ago

    This is the kind of thing that's so impressive that if you're not an (experienced) SWE you think "man LLMs are the future, and I am making some major decisions based on this". But you look at the code, and it's essentially gluing three.js and some DB stuff together. There's no lobby, no real interaction logic, no physics apart from what you get from three.js, chatting, commands, map editing, game modes.

    In other words, this is slop. We know these new models can generate slop images, text, videos, and code. Sometimes slop can be useful; maybe you can shape it into something useful, maybe you can slop a slopper. But we're learning it's not economical--this is some of the costliest slop we've ever made.

    • XzAeRoshoan hour ago |parent

      This is the job a junior developer may deliver in their first weeks at a new job, so this is the way it should be treated as: good intentions, not really good quality.

      AI coding needs someone behind to steer it to do better, and in some cases, it does. But still hasn't left the junior phase, and while that doesn't happen, there's still the need for a good developer to deliver good results.

  • behnamoh13 hours ago

    Yeah, AI is not going to replace programmers any time soon!

    • weatherlite3 hours ago |parent

      I'm impressed by this. You know in the beginning I was like hey why doesn't this look like counterstrike ? yeah I had the exepectation this things can one shot an industry leading computer game. Of course that's not yet possible. But still, this is pretty damn impressive for me.

      • Ragnarork2 hours ago |parent

        In a way, they really condensed perfectly a lot of what's silly currently around AI.

        > Codex, Opus, Gemini try to build Counter Strike

        Even though the prompt mentions Counter Strike, it actually asks to build the basics of a generic FPS, and with a few iterations ends up with some sort of minecraft-looking generic FPS with code that would never make it to prod anywhere sane.

        It's technically impressive. But functionally very dubious (and not at all anything remotely close to Counter-Strike besides "being an FPS").

        Fitting.

    • Madmallard10 hours ago |parent

      look at the actual code output lol

      • DaiPlusPlus7 hours ago |parent

        For the benefit of those of us who don’t work in browser-based frontends, how bad could it be?

        • Madmallard5 hours ago |parent

          i mean it's the most bare-bones implementation without any engineering considerations

          it's not something that would ever work industrially

          people with code-generators they've made could do this just as fast as the AI except their generators could have engineering considerations built-in to them as well so it'd be even better

  • kenjackson12 hours ago

    This is very impressive. That said, 1st person shooters seem like the less interesting type of game to create with an LLM nowadays. I'd much rather see a large world mystery game, for example. Think something like "All Her Fault", where you're the mom and you show up to pick up your kid and the game starts there -- and you need to find your kid. I would fine a game like that something that we probably couldn't do well w/o AI, but now, I think it might be doable.

    • sagarm6 hours ago |parent

      The most impressive thing about this wave of AI is the speed of the goal posts.

      • kortilla40 minutes ago |parent

        It failed to make counter strike, moving on to something that can actually take advantage of AI.

      • brazukadev2 hours ago |parent

        The initial goalpost was "create a bad clone of a famous game"?

      • Madmallardan hour ago |parent

        how exactly are the goal posts moving?

        the code and output is literal slop

        it's not known how much editing and debugging was done by the team either

        you could have done this in 2022 with not that much debugging as well

  • aurareturn3 days ago

    Damn this is cool. Imagine an LLM trained extremely well on something like Unreal Engine.

  • vunderba3 days ago

    Neat. FYI all the images on the site are TINY - might be a good idea to make add an interactive lightbox to them so we can see them without right-clicking and opening in a new tab.

    • stopachka3 days ago |parent

      Good idea! Added the PR for it here:

      https://github.com/instantdb/instant/pull/2010

      Once this lands lightbox should be up. Thank you!

      • stopachka11 hours ago |parent

        Update: fixed!

  • WhyOhWhyQ8 hours ago

    Whoever was insta-killing me in the gemini version over and over.... FUUUU!!!!

  • wormpilled4 days ago

    That's really cool, makes me want to try building a 3d game myself. I've only made 2d ones so far. Personally prefer the gemini version.

  • syntaxing13 hours ago

    I forgot what site it was but there used to be an online and browser playable CS 1.6. I don’t know if it was open source or not but there’s definitely code out their for this stuff so wouldn’t be surprised the models were trained on it.

    • Lammy13 hours ago |parent

      https://play-cs.com/en/servers

  • jakebasile7 hours ago

    Can't wait to see this at the Game Awards in a week or so.

  • flipflopsrawr12 hours ago

    Plagiarism is ugly after-all