Computer Science Canada need help making small maple leaf move around on screen! |
| Author: | circles [ Wed Oct 06, 2004 5:50 pm ] | ||
| Post subject: | need help making small maple leaf move around on screen! | ||
oka. i am making a screensaver. i have a border (this is jsut a beater one for my buddy jimmy),and i have a background. i need to make 2 shapes bounce around INSIDE the border, but not jsut appear randomly on the screen. how do i do this? here is the code, so you can try and get it on there. i cant get it to move, just flash everywhere! cna anyone write me some code that will work?
|
|||
| Author: | Cervantes [ Wed Oct 06, 2004 6:17 pm ] |
| Post subject: | |
This is not completed source code, it does not belong here. You are asking a question, it belongs in Turing Help. As for your question, you said specefically that you don't want to make the leaves appear randomly on the screen. So, you probably won't want to use rantint. try checking out this thread, which I found using the handy Search tool. |
|
| Author: | Paul [ Wed Oct 06, 2004 7:33 pm ] |
| Post subject: | |
and you have no increasing x or y values... so the leaves won't travel in a path, plus you have no collision detection whatsoever, so nothing will "bounce". |
|
| Author: | gigaman [ Thu Oct 07, 2004 8:03 am ] |
| Post subject: | |
Here are a couple suggestion. 1) Never use randint if you want something to follow a nice path. 2) get the value for the out side edges of the screen and make sure that none of your x or y variables go past it 3) i dont have a 3 |
|
| Author: | circles [ Thu Oct 07, 2004 7:57 pm ] |
| Post subject: | |
okay, i realized what iw as doing wrong, and i fixed it. now i have it all good.. so now how do i add in a sound effect form my hard drive? |
|