
-----------------------------------
EliteMechanic
Tue Jan 24, 2012 7:05 pm

Pac-man pellet help
-----------------------------------
I am trying to draw pellets onto my pacman game without the mapID thing and so that the pellets wouldn't show over the walls. My background is not imported but drawn.

I tried this code but it just draws the dots all over the place
    



for X : 1 .. 200 by 10
        drawfilloval (X, 200, 2, 2, brightgreen)
end for



-----------------------------------
RyGuy-Anime
Tue Jan 24, 2012 7:12 pm

Re: Pac-man pellet help
-----------------------------------
I'm pretty new to turing myself but I don't see how that loop would put the dot's all over the screen, i ran it and got a row of 20 in the middle can you attach your program so i can take a look?

-----------------------------------
EliteMechanic
Tue Jan 24, 2012 7:19 pm

Re: Pac-man pellet help
-----------------------------------
I'm restraining from posting it online as it's a project, so that my teacher wouldn't think I copied. In   200 represents the x value so if you increase it you will notice that the pellet number has increased.
Since there are wall in the game I'm trying to remove the ones on top of the walls.

-----------------------------------
RyGuy-Anime
Tue Jan 24, 2012 7:26 pm

Re: Pac-man pellet help
-----------------------------------
Alright I understand that, so i'll do the best i can without being able to see it :P . if the wall is in the middle of the dots then why put an if statement like this 

if x < where dots over lap or x > the last dot that hits the wall then 
 drawfilloval (X, 200, 2, 2, brightgreen)
end if

-----------------------------------
EliteMechanic
Tue Jan 24, 2012 7:53 pm

Re: Pac-man pellet help
-----------------------------------
Thanks a lot!  :D  I'll try it out and see how it goes.
