Live data from Hacker News

Spherical Snake

kevinalbs.com

81–90 of 141 posts

Re: Spherical Snake

#82
post #74

I noticed that the dots on the surface of the sphere are evenly spaced out close to the equator, but because there is a consistent number of dots in each ring, they are very close together when you reach the poles. One way to get dots evenly spread out over the surface of a sphere is to use a phyllotaxis spiral pattern. https://demonstrations.wolfram.com/PhyllotaxisSpiralPatternO...

I like the surface dots like it is. It gives me two points of reference at the poles, and adds intuition for how long it takes to go around the sphere.

Re: Spherical Snake

#83
post #23

Earlier quoted context omitted.

Here's a console command you can run to increase the snake length immediately, and thus the difficulty: (() => { let count = 50; const delay = 100; const interval = setInterval(() => { addSnakeNode(); if (--count

Why wrap in a lambda?

Could be to allow use of local variables that do not leak into the scope this code is executed in. That's what I use this pattern for.

Re: Spherical Snake

#85
post #74

I noticed that the dots on the surface of the sphere are evenly spaced out close to the equator, but because there is a consistent number of dots in each ring, they are very close together when you reach the poles. One way to get dots evenly spread out over the surface of a sphere is to use a phyllotaxis spiral pattern. https://demonstrations.wolfram.com/PhyllotaxisSpiralPatternO...

Those examples don’t seem to be evenly spaced at the poles.

Re: Spherical Snake

#86
post #7

Really cool game, but please please fix the viewport to prevent accidentaly zooming on the page on a mobile device!

I can reproduce a zoom on an iPad Safari when double tapping. Updated with a fix to prevent default double click events. It fixes on my environment.

Re: Spherical Snake

#88

Very cool but on iOS safari, if I click one of the buttons twice too quickly it zooms in and I can’t see the full screen or the other button. Hard to zoom back out at least on my phone.

Updated with a fix to prevent default double click events. It fixes on my iPad environment.

Re: Spherical Snake

#89
post #6

This is really fun! Nice job. Small issue: I accidentally right-clicked one of the arrow buttons and it stuck in the pressed position, causing the snake to curl into itself and end my game before I could left-click out of the context menu.

Thanks for the heads up. I added a (hopeful) fix to disable the right-click context menu on the buttons.

Re: Spherical Snake

#90

Love the game, it just ramps up pretty slowly. Looking at the comments and people trying to verify what the real maximum score is. I wrote a (Cartesian) snake for fun once, that was Pascal and an obscure 8-bit platform, but most fun was the pure mechanics of it; the rest was just boring, completionist details. As dopamine plateaued, I barely just worked out a formula for a curve to spread the maximum snake length acr…

Yeah, would be nice to have a "start at level 100" button so you can skip to the challenging part
Post reply on HN