Computer Science Canada help with my game please- I need the character to eat something |
Author: | turing1094 [ Sun Jun 13, 2010 1:54 pm ] | ||
Post subject: | help with my game please- I need the character to eat something | ||
What is it you are trying to achieve? I am trying to make a game where there is a player who has to eat dots on the screen. As he eats the food the score should go up What is the problem you are having? I am having trouble getting the player to eat the food(dots) Describe what you have tried to solve this problem I have no clue where to start Post any relevant code (You may choose to attach the file instead of posting the code if it is too long) <Answer Here>
Please specify what version of Turing you are using Please help me and post the code. With the posted code explain how it was done please |
Author: | Cezna [ Sun Jun 13, 2010 3:16 pm ] |
Post subject: | RE:help with my game please- I need the character to eat something |
You have to ask a specific question, not just ask people to do it for you and post there solutions. No one is going to do it for you. Read The Rules: http://compsci.ca/v3/viewtopic.php?t=3151 |
Author: | turing1094 [ Sun Jun 13, 2010 4:40 pm ] |
Post subject: | Re: help with my game please- I need the character to eat something |
my question is how do i get the character to eat something. I have been trying to do it for soo long and now im frustrated please help |
Author: | Monduman11 [ Sun Jun 13, 2010 4:43 pm ] |
Post subject: | Re: help with my game please- I need the character to eat something |
well depends on what u want the character to eat? and how is he going to eat it... is the food coming from the top? or is it like pacman? where he eats it from the side? you could do something like pacman and have it that if it touches that item then it shows an eating animation and the food is moved somewhere of the map where u cant see it. or you can also use the hide feature which hides the object making it invisible to see.. specify exactly what u want to be done and how u want it to be done |
Author: | Monduman11 [ Sun Jun 13, 2010 4:45 pm ] |
Post subject: | RE:help with my game please- I need the character to eat something |
as for your game its not bad except there are several bugs that must be fixed. for example when you jump to the far right the star gets stuck and u cant move it anymore |
Author: | Monduman11 [ Sun Jun 13, 2010 4:56 pm ] |
Post subject: | RE:help with my game please- I need the character to eat something |
what you could also do is have different maps and have them over lapping and if it touches red then the oval colour is changed to white and the next map is drawn... do u get what im trying to say? or do u want me to explain it differently? |
Author: | Monduman11 [ Sun Jun 13, 2010 5:14 pm ] | ||
Post subject: | Re: help with my game please- I need the character to eat something | ||
for example you could have something like
|
Author: | turing1094 [ Sun Jun 13, 2010 6:04 pm ] |
Post subject: | Re: help with my game please- I need the character to eat something |
thanks for your suggestions, I want the game like pacman where you eat it sideways. I also just want the player to eat little circles, thanks. If you could please help like maybe posting what i need that would be great |
Author: | Monduman11 [ Sun Jun 13, 2010 6:13 pm ] |
Post subject: | RE:help with my game please- I need the character to eat something |
i already posted an example of what u need.. im not going to write the program for you, like Cezna said earlier we are not here to do other peoples homework only to help... look at the code i provided above and try to understand what i was doing there Ps it helps that i commented it all u have to do is read it |
Author: | turing1094 [ Sun Jun 13, 2010 9:49 pm ] |
Post subject: | Re: help with my game please- I need the character to eat something |
I tried working with that and the code is not working could you please explain in more detail. thnx |
Author: | TokenHerbz [ Sun Jun 13, 2010 10:29 pm ] |
Post subject: | RE:help with my game please- I need the character to eat something |
I will give you a tip.. However you will have to make it work correctly... You are basically saying "if the dot isn't the color of itself then change location of the dot" this means.. 1) Unless the dots color changes, nothing will happen. 2) it doesn't even have anything to do with the players star. So instead of your code here "if whatdotcolor (foodx, foody) not= brightred then" replace that with this, "if whatdotcolor (x1, y1) not= brightred then" What that means is, "If players x,y is the color of the dot, then it hits and we gain a point, and respawn the dot" The problem you have to figure out now is, Incorperating the velocity of your star. Because your star can jump at even over 12 pixels it is possible that x,y point (whatdotcolor only checks 1 pixel point its called on) making it possible for the players star to jump over it, voiding the desired effect. If you want to stick with whatdotcolor, you have to do a check for all the pixels in the star, Along with a check for velocity. If you have a valuable attempt and post the code and theory behind that, you will get more help. Enjoy! |
Author: | Cezna [ Mon Jun 14, 2010 5:21 am ] |
Post subject: | RE:help with my game please- I need the character to eat something |
Wow, monduman that was some hard spammin' ![]() |
Author: | Monduman11 [ Mon Jun 14, 2010 2:14 pm ] |
Post subject: | Re: RE:help with my game please- I need the character to eat something |
Cezna @ Mon Jun 14, 2010 5:21 am wrote: Wow, monduman that was some hard spammin'
![]() lol is that a compliment or just a statement??? ![]() |
Author: | Cezna [ Tue Jun 15, 2010 3:02 pm ] |
Post subject: | RE:help with my game please- I need the character to eat something |
It was a good-natured jab |