His web desktop showcasing his generative stuff https://generative.3d2k.com/
He makes lots of tiny code demos like this and shares on twitter every once in a while https://twitter.com/KilledByAPixel
His dwitter work https://www.dwitter.net/u/KilledByAPixel/top
His games https://killedbyapixel.newgrounds.com/games
His blogposts https://frankforce.com/
One thing I don't understand is the role of the "</svg>" closing tag. I didn't immediately see any reference to an open or closing svg tag anywhere in the source.
Why was this code and a lot of similar code posted to github only 2 hours ago?
Unless I misunderstand the maths, the hold-up strategy has the same probability of winning regardless of which level one is at, since the levels only increase the speed of the obstacles and not their density. I would have thought the difficulty would ramp up such that even stupid strategies get less effective at higher levels, but not this time!
But your speed is the same at every level.
Instead of looking at the width of each obstacle, instead look at the amount of space that the obstacle covers during the time you are in its path. If it moves faster then it covers more space during the time it takes you to cross, so it is effectively wider.
Imagine if the obstacles moved so fast that they crossed from one side of the screen to the other in the time it takes you to move up one line. You would never be able to pass any obstacle.
Edit: actually thanks to their double thickness it does matter! I didn't think of that.
X=Y=V=U=Z=t=1;onkeydown=e=>(k=e.which)&1?X-=k-38:Y-=k-39;
setInterval("for(++t,o=Z,i=50;i--;)for(b.innerText=o+='\\n',j=99;
j--;Y>49?Z+=Y=1:o+=i-Y|j-X-50?q?'.':'':q?'♥':Y=1)
q=((j+t*Math.sin(A=i>>1)/9*Z>>3)*A*Z)**4%97<89",9)
The obstacle generation code is very strange and deserves more study. But really remarkable - a tour de force.Also, see the section:
q?'♥':Y=1
The code is minimized by setting Y back to 1 instead of providing a character to display but this has the visual side effect of "squashing" the player when they are run over.
Edit: Firefox 122.0 on aarch64 (fedora asahi)
But even then it's just one giant text node, not html elements so it's surprising this is causing so much GC in Firefox.
Turns out if you do this, then hold the up key, it would appear that you avoid collision detection. Also, it appears your X position is preserved between levels, allowing you to hold the up arrow to rapidly advance levels.
I got to level six on the first go, but after that I noticed if you move one pixel off the side of the screen you could just hold down "UP" to advance levels every few seconds.
Thanks for sharing!