
Reload this page upon your inevitable death!
Check out the source code to alter with the worm's biological factors. Our developers created this as a proof of concept, to be programmed by others easily. Originally, this game was to be created for the Vectrex, a 1982 home video console with a vector CRT display. In addition, this game could be ported to a microcontroller with a DAC and rotary encoder with the display of a oscilloscope.The game stores the position of the worm's head and moves it at a constant speed per frame, in a specified direction. However, before each movement, it's position and rotation is saved to an array that removes the last element of itself if it's length is greater than the worm's. Next, we calculate if the head is closer than X amount of units away from a ball, if so we increment the worm's length and move the ball to a random location. To draw the worm's body, we itterate through the array and draw each side of the snake with a conditional loop. The head and tail of the snake cones inwards for aesthetics.
Alex Oliver, 2026