Prompt:
- Make a game with React that uses animations (e.g. React motion)
- Time is short; try not to bite off more than you can chew
- Some React game examples:
- Options:
- start from scratch with some simple boiler plate
- fork an existing React Game and make it unrecognizably better (not just a PR)
- Components of a game:
- event loop to render planned events over time (enemies approaching etc)
- collisions
- scores
- keyboard or mouse interactions
Time limit: open (by Friday). Prize: be featured with your game on our Brandcast blog, and get some Brandcast swag. Submissions: conor@brandcast.com subject: Brandcast Hackathon.
Node 6
See SurviveJS - React for the book.
npm i
- Install dependencies. This might take a while.npm start
- Run development build. If it doesn't start, make sure you aren't running anything else in the same port. In case you are on a Unix platform, you can tryPORT=3000 npm start
. It will pick up the port from the environment if it's set.- Surf to the port shown at terminal.
- Start modifying the code. The browser should pick up the changes.
Beyond development, the boilerplate supports other tasks listed below:
npm run build
- Generates a production build belowbuild/
. See the Building with Webpack part for more.npm run deploy
- Deploys the contents of thebuild/
directory below the gh-pages branch.npm run test
- Runstests/
through Karma/Phantom/Mocha once.npm run test:tdd
- Runstests/
in a TDD mode (watches for changes and rebuilds).npm run test:lint
- Runs code through ESLint to spot code quality issues.npm run stats
- Generates Webpack build statistics. See the Analyzing Build Statistics chapter.