Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Only logic and hard code. If there are articles and lessons for all games and programs, the cost of development and the salary of a programmer will be slightly higher than a cashier in a supermarket.
UPD: for drawing, you take a canvas, so that the game works, you need to run a loop or recursion that will draw on the canvas, for this, use requestAnimationFrame (in this case, recursion). For the logic of the game - it is necessary to change the coordinates of the object during the user's action - consider its intersection with other objects (a ball with a wall, for example) - draw it, and then decide whether to continue the game or not, this may require several flags. The flag is a boolean variable, depending on which the code will either continue or not, for example isFailed = false... and check somewhere: if( !isFailed )... the game is on. Good luck!
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question