Computer Science Canada HELP! How do I get the koopas to flip? (Mario Game) |
Author: | Gathard [ Fri Jan 09, 2015 2:30 pm ] | ||
Post subject: | HELP! How do I get the koopas to flip? (Mario Game) | ||
What is it you are trying to achieve? Trying to get it so when mario hits the koopas from the bottom they flip, once they flip they respawn after a few seconds. What is the problem you are having? Cannot figure out how to do this, been trying for almost 1 week. Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
Please specify what version of Turing you are using 4.1.1 P.S For a class final![/list] |
Author: | Zren [ Sat Jan 10, 2015 5:03 am ] | ||||
Post subject: | RE:HELP! How do I get the koopas to flip? (Mario Game) | ||||
What do you mean by "flip"? Are you trying to have the koopa picture rotate 180 degrees over a duration of 1 second? If so, that would be fairly difficult to do. In the actual game, koopa's retreat into their shells like so, which might be easier to do, as it's just replacing the koopa's picture. For the latter, you could keep track of what "state" the koopa is in. Eg:
Then when the koopa dies, change it to "dead". You can then have conditionals around where you draw the koopa to check if the koopa is alive or dead and then draw the appropriate picture. You'll want to keep track of how long the koopa has been in the state.
Then you can check if koopaStateFrameCount is 90 (Assuming a delay of 33 millisecond for 30 FPS) which would mean 90 frames have passed (or 3 seconds at 30 FPS). If that much time has passed, you can reinitialize the koopa to be alive. |
Author: | Gathard [ Mon Jan 12, 2015 1:37 pm ] | ||||
Post subject: | Re: RE:HELP! How do I get the koopas to flip? (Mario Game) | ||||
Zren @ Sat Jan 10, 2015 5:03 am wrote: What do you mean by "flip"? Are you trying to have the koopa picture rotate 180 degrees over a duration of 1 second? If so, that would be fairly difficult to do.
In the actual game, koopa's retreat into their shells like so, which might be easier to do, as it's just replacing the koopa's picture. For the latter, you could keep track of what "state" the koopa is in. Eg:
Then when the koopa dies, change it to "dead". You can then have conditionals around where you draw the koopa to check if the koopa is alive or dead and then draw the appropriate picture. You'll want to keep track of how long the koopa has been in the state.
Then you can check if koopaStateFrameCount is 90 (Assuming a delay of 33 millisecond for 30 FPS) which would mean 90 frames have passed (or 3 seconds at 30 FPS). If that much time has passed, you can reinitialize the koopa to be alive. Right, i'd like them to flip/go into their shell the same way the actual game works, as for the other parts i think that'll work good just first need to make it so mario can somehow hit them, any suggestions? Very very very new to turing, thanks. |
Author: | Zren [ Mon Jan 12, 2015 7:54 pm ] |
Post subject: | RE:HELP! How do I get the koopas to flip? (Mario Game) |
You're looking for Collision Detection. Specifically, rectangular collision detection. Look for it in the Turing Walkthrough. |
Author: | Gathard [ Tue Jan 13, 2015 2:18 pm ] |
Post subject: | Re: RE:HELP! How do I get the koopas to flip? (Mario Game) |
Zren @ Mon Jan 12, 2015 7:54 pm wrote: You're looking for Collision Detection. Specifically, rectangular collision detection. Look for it in the Turing Walkthrough.
Is there anyone I can pay to complete things for me? I'd just like someone to do it for me. Want a few more things coded aswell. thanks. MOD WARNING: Asking for others to do your homework is academic dishonesty, plagiarism and a violation of the sites rules. Please refrain from making such posts or your account will be banned. |
Author: | Insectoid [ Tue Jan 13, 2015 10:59 pm ] |
Post subject: | RE:HELP! How do I get the koopas to flip? (Mario Game) |
That's a quick way to get yourself banned from the site, bud. Do it yourself, like everyone else. |
Author: | Gathard [ Wed Jan 14, 2015 1:29 pm ] |
Post subject: | Re: RE:HELP! How do I get the koopas to flip? (Mario Game) |
Insectoid @ Tue Jan 13, 2015 10:59 pm wrote: That's a quick way to get yourself banned from the site, bud. Do it yourself, like everyone else.
I'd give credit... we're allowed to get 50% of help from someone anywhere anyone.... ive made the rest of the game. I don't have time to do it all on my own/learn. |
Author: | Insectoid [ Wed Jan 14, 2015 3:04 pm ] |
Post subject: | RE:HELP! How do I get the koopas to flip? (Mario Game) |
Quote: I don't have time to do it all on my own/learn.
You do have the time. You're in high school. Time pretty much all you have, and learning is what you should be spending it on. Quote: we're allowed to get 50% of help from someone anywhere anyone
Ask a classmate then. Collision detection isn't hard. There are lots of tutorials about exactly that on this website. There is no reason not to do it yourself. |
Author: | Gathard [ Thu Jan 15, 2015 1:29 pm ] |
Post subject: | Re: RE:HELP! How do I get the koopas to flip? (Mario Game) |
Insectoid @ Wed Jan 14, 2015 3:04 pm wrote: Quote: I don't have time to do it all on my own/learn.
You do have the time. You're in high school. Time pretty much all you have, and learning is what you should be spending it on. Quote: we're allowed to get 50% of help from someone anywhere anyone
Ask a classmate then. Collision detection isn't hard. There are lots of tutorials about exactly that on this website. There is no reason not to do it yourself. We all do different programs... and Yeah actually I don't have time. I have exams in under a week, I run a business and lots of other things. |
Author: | Tony [ Thu Jan 15, 2015 2:01 pm ] |
Post subject: | Re: RE:HELP! How do I get the koopas to flip? (Mario Game) |
Gathard @ Thu Jan 15, 2015 1:29 pm wrote: and Yeah actually I don't have time.
Time management is part of the learning process. If you are unable to find the time, and your classmates that have the same assignment and (for the most part) same exams coming up _do_ find the time -- don't you think the assignment grades should reflect that? |
Author: | Insectoid [ Thu Jan 15, 2015 3:03 pm ] |
Post subject: | RE:HELP! How do I get the koopas to flip? (Mario Game) |
Quote: We all do different programs
That doesn't matter. Odds are one of them is doing something very similar, or knows how to do what you're asking. |
Author: | MatthewDaigneau [ Thu Jan 15, 2015 3:07 pm ] |
Post subject: | RE:HELP! How do I get the koopas to flip? (Mario Game) |
This will sound as useful as a tech support guy saying "Have you restarted the computer?", buuuuut, have you tried asking the teacher for help? |