Re:Snake game made in Go
by compi on Thursday October 31, 2019 @07:20PM
(#21414791)
Snake games are my go-to when I learn new languages, it's always under 1000
lines of code and can usually be done without libraries. In not a lot of
time you can learn how the language:
There are a lot of things that I like about the original Snake that most
people don't put into their hobby projects:
The only critique I have for this is your snake almost doubles speed when
you move up or down which is pretty jarring.
[ Parent
| on HN ]
Good points, I never realised about the screen update size, although most renderer will redraw the whole screen every frame (immediate mode).
Re:Snake game made in Go
by tristangoossens on Friday November 01, 2019 @04:06AM
(#21416968)
thank you for the very detailed and useful reply! i will definitely think about adding some, if not most of your suggestions.
The problem i have with the snake is that one cell in a termloop is not a square but a rectangle. for example a cell could be 1 width and 2 height, so if the snake would move 1 cell up, it would actually move 2 up.