Computer Science Canada Need help with my slime volley ball |
Author: | thainfamous [ Sat Nov 27, 2004 1:04 pm ] | ||
Post subject: | Need help with my slime volley ball | ||
i need help with the ball and how to implement it, and im looking for suggestions or a code from someone that would work for my program. Well this is what i have so far, thx.
|
Author: | Cervantes [ Sat Nov 27, 2004 1:47 pm ] |
Post subject: | |
What do you mean "i need help with the ball and how to impliment it"? Do you mean, Circular Collision Data? |
Author: | thainfamous [ Sat Nov 27, 2004 4:54 pm ] |
Post subject: | |
well, if u run my code i want to make a ball for the volleyball and i dont know how, and i was looking for help or a source code |
Author: | Cervantes [ Sat Nov 27, 2004 5:52 pm ] | ||||||||
Post subject: | |||||||||
okay... well, what don't you understand about how to make a ball? you are using records. Well done. Let's use a record for our ball:
There's your ball. Now, to apply gravity to it:
Now, to make it bounce off a wall:
add that somewhere in the main loop. I suggest just before the bit involving gravity and updating the x and y pos. of the ball. After that, you need to keep track of where the ball lands.
add that code in somewhere in the main loop. I suggest after the previous bit about bouncing off the wall. Next, you need to make the ball bounce off the players, which is by far the hardest thing to do. Visit my Circular Collision Data Tutorial and read up on some of compsci.ca's methods for achieving this. Pick one, or make your own, and try to get it to work. Best of luck! I spent a long time trying to make a Slime Volleyball program. Know that it can be done. Feel free to ask any more questions ![]() -Cervantes |
Author: | thainfamous [ Sat Nov 27, 2004 6:06 pm ] |
Post subject: | |
wow thanks alot man, ya i was trying to figure that out, im only in gr 10 comp sci, and just finished learning about for loops:| in class so it is difficult for me |
Author: | Cervantes [ Sat Nov 27, 2004 6:15 pm ] |
Post subject: | |
I take it you are ahead of the class, given that you are using types, functions, Input.KeyDown, arrays, and double buffering. 8) |
Author: | thainfamous [ Sat Nov 27, 2004 6:19 pm ] |
Post subject: | |
maybe, wen i do the stuff u tell me it doesnt show my slimes on the screen and it only shows the ball do u know why, and have u tried the stuff u told me in my code? |
Author: | thainfamous [ Sat Nov 27, 2004 6:20 pm ] |
Post subject: | |
do you use msn messenger it would be easier to take to yu there |
Author: | Cervantes [ Sat Nov 27, 2004 6:58 pm ] |
Post subject: | |
This little image should tell you I use MSN: ![]() As for your program: I personally never saw the slimes when I ran your original code. Mind you, that's probably because I don't have black.jpg on my computer. No, I have not tried my code in conjunction with yours. |
Author: | thainfamous [ Sat Nov 27, 2004 7:06 pm ] |
Post subject: | |
it does not show a @hotmail.com or @msn.com addresss so wut is the email id like to ask u questions on msn messenger |
Author: | Cervantes [ Sat Nov 27, 2004 7:23 pm ] |
Post subject: | |
True, it does not. I use mail @compsci.ca. I use it for MSN as well. try it, I guarantee it'll work ![]() |