Live data from Hacker News

Spherical Snake

kevinalbs.com

71–80 of 141 posts

Re: Spherical Snake

#71
post #57

Earlier quoted context omitted.

Yes. And it’s so easy: ` `

It has something like that already[1]. I'm curious what's wrong with that. 1. https://github.com/kevinAlbs/SphericalSnake/blob/b907738476d...

Presumably it has to be “no” instead of “0”

Re: Spherical Snake

#72
Beyond 100 it becomes a game of avoiding the The Loxodrome of Terror by spiralling into an unescapeable trap.

Easiest pattern to get some more length is to do some sort of spherical sinusoid by following the meridian and then some optional final fill loop for the poles.

Overall it feels a bit slow to get to the part where it becomes tricky

For optimal fill you might end up with something like a tennis ball/baseball pattern instead.

see fig 5 here

https://arxiv.org/abs/1005.4609

Re: Spherical Snake

#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...

Re: Spherical Snake

#75

For a new kind of snake game, check out PluriSnake. PluriSnake is a snake-based color matching daily puzzle game. Color matching is used in two ways: (1) matching circles creates snakes, and (2) matching a snake’s color with the squares beneath it destroys them. Snakes, but not individual circles, can be moved by snaking to squares of matching color, as long as their paths are not blocked by other snakes. The goal is…

I tried it, but really shouldn't have as I am colorblind and so matches were quite difficult. Some color games have an option for a colorblind-safe palette, maybe consider that?

Re: Spherical Snake

#76
I wish there is a mode where the snake go toward where my mouse cursor is (similar to agar.io), as opposed to having the controls turn the snake. So in update function where we have the "direction-=.08" and "direction+=.08" bits, "direction" would be assigned a value either due to the pressed state of the 4 arrow keys, or some arctangent of mouse coordinates:

https://github.com/kevinAlbs/SphericalSnake/blob/b907738476d...

Alternatively, keep the current controls, but rotate the whole world to match the snake's direction of movement. Current mix of non-rotating world with rotating controls makes the game more difficult, most snake variants I have played opted for non-rotating world with non-rotating controls (e.g. press right to go right, independent of current snake heading, as opposed to turning clockwise).

Re: Spherical Snake

#78
post #10

The game looks really good, although I think it'd be improved if the sphere was a bit smaller. It feels like it takes too long for the game to become difficult

Speed should slightly increase with each new apple

Re: Spherical Snake

#79
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 across a set number of levels so that it ends at 100% of gameplay area and remains winnable. But maximum score? No idea, I couldn't be arsed to work it out. But I finished the project! https://github.com/wowczarek/dlp-misc/tree/main/spacew0rm

Re: Spherical Snake

#80
post #23
post #10

The game looks really good, although I think it'd be improved if the sphere was a bit smaller. It feels like it takes too long for the game to become difficult

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?
Post reply on HN