+4

Game Collision Detection Issue

Hi, i am trying to build a Block Breaker game and am struggling with the collision behaviour of the blocks. the blocks are stored in an array. i give every array item a custom eventlistener and check for collision with the ball in the function "moveBall"; if a collision is detected, the event is dispatched and the block should be removed from the field. however, the block removed is always the last in the block array. if you dont move the panel and wait for about 10 sec, the ball reaches the second row and the behaviour is even stranger: now all the blocks from the array index of collision to the array length are removed; can anyone help me with my problem? thank you 😃 https://code.sololearn.com/WYY3u607E2f8/?ref=app

9/10/2019 3:01:39 PM

Daniel Asherov

2 Answers

New Answer

+4

Daniel Asherov wait bro i will share your problem then you fix it your problem.. ok ☺☺☺👍👍👌👌👌 game is to good .👏👏👏

+3

If you replace '340' to '531' in 67th line of jawascript coding then the game will not over before starting it becomes continue but for remaining problem,I am a beginner😊