A classic snake game made with React.
Some features and lessons learned:
- Smoother animations with requestAnimationFrame(). This also saves energy by allowing the browser to pause the animation when the tab is not active.
- More responsive gameplay by using a keystroke buffer queue. This allows the user to register keystrokes faster than the screen can draw the next frame, making it easier to direct the snake.
- Blips and bleeps using AudioContext.
Play at http://chrisullyott.com/snake!