Games · library
Canvas: Games in the Browser
Draw and animate games in plain JavaScript: shapes and colours, the game loop, keyboard controls, collisions — and finally the logic of a brick breaker. 5 topics with a detailed explanation and three tasks each; the game runs right next to your code.
5 topics · 15 challengesChallenges solved0 of 15
- 01ContinueCanvas and Shapescanvas and the 2d context, coordinates, rectangles, colors, lines, circles and text0 / 3
- 02The Game LooprequestAnimationFrame, frame time dt, separating update and draw, game state0 / 3
- 03ControlsPressed keys in a Set, moving with a speed, field boundaries, jumping with gravity0 / 3
- 04CollisionsRectangle intersection, distance between circles, a ball bouncing off walls0 / 3
- 05Проект: арканоидСетка кирпичей, мяч против кирпичей и ракетки, жизни, счёт и конец игры0 / 3