Snake game background

Does anyone know a better way to make the snake game background because I’m trying to make the snake game and I need make the background I got Snake game | Desmos but it’s not good or fully complete so does anyone know how to make it like simple and easy to make?

Maybe put 13, 15, 17 all into a list, then have one whole polygon who makes the background?

I think @Daniel_Grubbs can help because he helped me condense my 7-segment display in the calculator.

something like this?
https://www.desmos.com/geometry/1euwevcnfd

Edited (from further on):
here’s a working version with apples …
https://www.desmos.com/geometry/fmp1wfwz5d

Yes that’s probably what he wanted, and similar to my list idea.

Hey… are you better at the geometry tool than the graphing one?

well, they’re quite similar … but sometimes the geometry tools help getting things done easier …
I used the translate command from desmos geometry … but you can also do without it …

I can tell since geometry tool has a lot more function than the graphing one! I wonder if that could speed up my calculator in desmos…

Here’s the version without the translate function …
https://www.desmos.com/calculator/c05iupjo8t

You probably can simplify a bit the user ineterface of your calculator with desmos geometry …
but the big part of you calculator I think is the code to manage the interaction with the user …
and that wouldn’t be much affected by using desmos geometry.

Daniel did do some tweaking with me, and we made the 7-segment a lot more efficient. Honestly, I think I’m almost done after adding a trig side of the calculator.

1 Like

here’s the same code but written in a more compact way:
https://www.desmos.com/calculator/i6s0ussunx

1 Like

Probably for your uses the geometry calcuator is more versatile. It (currently) has more limited CL functionality though.

Really? From what I can see (no offense) CL is pretty primitive compared to other coding languages. I mean, a fair argument is that it’s not exactly supposed to be super complex. I still think parseEquation is very weird though…

I’m not sure what you mean, but the geometry calculator and standard graphing calculator are two different components in Activity Builder. Not all the sinks and sources in a graph component are available in a geometry component, The bounds: sink for example is not currently supported in the geometry component.

You can make the borders into lists, like x=[15, -15] so you can minimize a few lines of code.

Nice! You can add a scalar to keep it within the same initial border when the last element of N is changed. Snake bkg | Desmos

1 Like

we get a cool optical effect by moving the slider for ‘n’:
https://www.desmos.com/calculator/scwx2v5rrb

Oh cool! I saw in your list n - 1, but why is that necessary? Can’t you just do N = [1, ... , n]?


Might look weird on some background(because I made it so it was 20 by 20 exactly on the screen)

When the count starts from 0, I normally prefer to use n-1 as the last element so that the number of elements in the list is n and I don’t get confused about how many elements there are.