Are the dots objects? If they are on a grid you could use a 2D array to model the grid, and remove the dots based on the x and y coordinates of Pac-Man. If they are not objects, you could test to see if Pac-Man shares the same coordinates as the dot and then draw an ellipse with the same color as the background over the dot. Good luck, and please clarify what the dots are.
Say your dots are a class, you keep a list of them, and you show/hide them when consumed (or remove them from the list).
Depending on how you are storing the location of Pac-Man and when you want the dots to disappear, try collision detection between point/point (easiest) or point/circle (more realistic).
Answers
i need to know fast- please answer thx
Are the dots objects? If they are on a grid you could use a 2D array to model the grid, and remove the dots based on the x and y coordinates of Pac-Man. If they are not objects, you could test to see if Pac-Man shares the same coordinates as the dot and then draw an ellipse with the same color as the background over the dot. Good luck, and please clarify what the dots are.
@jkkjk --
Say your dots are a class, you keep a list of them, and you show/hide them when consumed (or remove them from the list).
Depending on how you are storing the location of Pac-Man and when you want the dots to disappear, try collision detection between point/point (easiest) or point/circle (more realistic).
As Trilobyte said, share your code for more feedback. And search the forum and online for Pac Man / Pac-Man / Pacman examples!
Another Pacman question. @TfGuy44's code for Pacman is all over this forum. Please search for similar questions on the forum before posting.
Yay! I'm popular! (https://forum.processing.org/two/discussion/11156/pac-man-game-not-completed-asking-for-assistance)
continued here (with source)
https://forum.processing.org/two/discussion/20304/i-need-to-get-the-dots-food-to-dissapear-when-pac-man-goes-over-it