A simple game of Snake made with Facebook's Create React App. Uses React for rendering in a way that has terrible performance, re-rendering everything every animation frame.
See src/index.js
for how things fit together.
The main game state src/models/GameState
is mutated by the logic in src/actions
.
This game system design is somewhere in between
traditional OO game objects and an ECS that
separates data and logic.
It's inconsistently and poorly designed,
or more favorably, it experiments with different design patterns.
https://ryanatkn.github.io/snake-game
Rewriting the game state and actions with an ECS would be interesting.
See create-react-app for more.
npm install
npm start
- obstacles
- feedback for dying
- sounds
- eat self mechanics?
- config like # apples, exposed as advanced form
Fast, intuitive, helpful. Would use again!
public domain (The Unlicense)