Earlier quoted context omitted.
That's not an example of copying from an existing Space Invaders implementation. That's an LLM using a CSS animation pattern - one that it's seen thousands (probably millions) of times in the training data. That's what I expect these things to do: they break down Space Invaders into the components they need to build, then mix and match thousands of different coding patterns (like "animation: glow 2s ease-in-out infin…
I think LLMs are adapting higher level concepts. For example, the following JavaScript code generated by GLM ( https://github.com/simonw/tools/blob/9e04fd9895fae1aa9ac78b8... ) is clearly inspired by this C++ code ( https://github.com/portapack-mayhem/mayhem-firmware/blob/28e... ), but it is not an exact copy.
That code certainly looks similar, but I have trouble imagining how else you would implement very basic collision detection between a projectile and a player object in a game of this nature.