Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Pac-man pellet help
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
EliteMechanic




PostPosted: Tue Jan 24, 2012 7:05 pm   Post subject: 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


Turing:


for X : 1 .. 200 by 10
        drawfilloval (X, 200, 2, 2, brightgreen)
end for

Sponsor
Sponsor
Sponsor
sponsor
RyGuy-Anime




PostPosted: Tue Jan 24, 2012 7:12 pm   Post subject: 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




PostPosted: Tue Jan 24, 2012 7:19 pm   Post subject: 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 <for X : 1 .. 200 > 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




PostPosted: Tue Jan 24, 2012 7:26 pm   Post subject: Re: Pac-man pellet help

Alright I understand that, so i'll do the best i can without being able to see it Razz . 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




PostPosted: Tue Jan 24, 2012 7:53 pm   Post subject: Re: Pac-man pellet help

Thanks a lot! Very Happy I'll try it out and see how it goes.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: