HTML5 "Love Fish" Game Summary catalogue
1. Page Setup
2. Painting the Blue Ocean
3. Draw floating objects with the sea water swinging
4. Sea anemone painted with seawater
5. Draw the big fish in the static
6. Mouse control The big fish swim to
7. Add basic animations to big fish (blink your eyes and keep your tail swinging)
8. Draw a still small fish
9. Small fish swim with big fish
10. Add basic animations to the small fish (blink your eyes and keep your tail swinging)
11. Draw the fruit
12. The big fish eats the fruit, the big fish feeds the small fish
13. Special effects (big fish eat fruit produce white ripples, big fish feed small fish produce orange ripples)
14. Game score calculation and small fish health value judgment
15. Processing before the game starts
16. Processing after the game is over
Game Demo: Click here
Source code: Click here
This article is to use HTML5 development of "love fish" game summary, mainly related to the knowledge points are: HTML5 canvas API, Carousel frame animation, "Object Pool", collision detection, JS in the Math object, SetInterval (), Bezier curve, modular development, Object-oriented programming idea.
Page Setup
HTML5 "Love Fish" game Summary