Gamedev Canvas Content Kit
Exercises extending functionality of the demos
The exercises listed below are also present at the end of every lesson in the tutorial and can be completed either by using the JSFiddles in the related lessons or by editing the demos directly.
Here's the list of exercises:
- 1. Create the Canvas and draw on it
- Change the size and color of the given shapes.
- 2. Move the ball
- Change the speed of the moving ball, or the direction it moves in.
- 3. Bounce off the walls
- Change the color of the ball to a random colour every time it hits the wall.
- 4. Paddle and keyboard controls
- Make the paddle move faster or slower, or change its size.
- 5. Game over
- Make the ball move faster when it hits the paddle.
- 6. Build the brick field
- Change the number of bricks in a row or a column, or their positions.
- 7. Collision detection
- Change the color of the ball when it hits the brick.
- 8. Track the score and win
- Add more points per brick hit, print out the number of collected points in the end game alert box.
- 9. Mouse controls
- Adjust the boundaries of the paddle movement, so the whole paddle will be visible on both edges of the Canvas instead of only half of it.
- 10. Finishing up
- Change the number of lives and the angle the ball bounces off the paddle.
If you're using the Content Kit as a base for the workshop and have enough time for interaction and tinkering with the code, you can use the exercises above to extend the demos and engage with the participants.
You can also go back to the Content Kit's index page.