Inspiration
We got inspired by workshop on HTML5 GAMES held on BuildDay conducted by Facebook Developer Circle Indore.
What it does
It is a 2 players cricket game. It has 2 actors a batsmen and a bowler. The bowler can fix the position of bounce of the ball. The batsmen can swing the bat to hit the ball , and scores 2, 4 or 6 runs.
How we built it
We used html 5 canvas and javascript . We used Animation frame (requestAnimationFrame()) function in javascript to give motion to bat and ball by changing coordinates of objects of bat and ball. Collision is detected by calculating the distance between bat and ball and angle of rotation of bat. Scores are awarded on the basis of position of collision with bat .The motion of bat starts when the batsman press the 'space bar' key on keyboard. The point of bounce of ball is set by bowler with the help of mouse .
Challenges we ran into
Collision between bat and ball. Motion of ball after collision.
Accomplishments that we're proud of
Able to make the game within a short period of time and complete it within the given time limit.
What we learned
New technologies like HTML5 , canvas and animation in javascript.
What's next for Gully Cricket
We are planning to upload game on instant game on facebook messenger.
Built With
- html5-games
Log in or sign up for Devpost to join the conversation.