Computer Science Canada so i was trying out the trig functions by making pong |
Author: | limited_skillz [ Mon Mar 15, 2004 12:17 am ] | ||
Post subject: | so i was trying out the trig functions by making pong | ||
damn i have no idea what im doing, the ball flies everywhere and anywhere my moving of the ball is in a case in a process called ball dont comment about the game though, i just wanted to make a rough one, really fast without much work, i dont think i had to use processes or anything, but whatever, this is about trig can you give me a few tips or something about using trig properly
|
Author: | jonos [ Mon Mar 15, 2004 12:32 am ] |
Post subject: | |
thats som pretty cool stuff, but the ball kindof bounces at weird angles and atuff like that. i don't know trig, but you don't have to use trig for pong, i know shorthair made one in blitz you can check out, or zylum also made a really simple one that you can look at. |
Author: | limited_skillz [ Mon Mar 15, 2004 12:39 am ] |
Post subject: | |
thanks, i thought ppl would call me a n00b lol, if you change all the values in the case to 5 it works normal i was just trying to experiment with trig stuff to make crazy (but not too crazy) angles right now im checking some source code for other trig stuff, but its just not clicking, i need like a full in depth tutorial, ill check the net for one |
Author: | jonos [ Mon Mar 15, 2004 12:46 am ] |
Post subject: | |
you should learn trig in school, i have tried because we haven't gotten to that yet in math at school, but i just didn't understand that, but ive heard that once you do it, its really easy. |
Author: | Cervantes [ Mon Mar 15, 2004 9:35 am ] |
Post subject: | |
It is really easy. I don't really know it right now, but my friend taught me it on the bus going to school one day. Course, I forgot most of it because I didn't actually use it. But it is not complicated. Using trig: You can either use x speed and y speed values, or you can use angles, velocities, and weights. for x speed and y speed check out thoughtful's pool for angles, velocities, and weights, check out Homer's Tutorial |
Author: | AsianSensation [ Mon Mar 15, 2004 9:46 am ] |
Post subject: | |
well, for pong, isn't all you need is the angle of incidence = angle of reflection? The speed at which it bounces back depends on the material of the paddle etc, you can make up those values yourself. I don't see the incidence angle = reflectiona angle part, maybe thats why? |
Author: | Mazer [ Mon Mar 15, 2004 11:08 am ] |
Post subject: | |
In reality it would also depend on the direction in which the paddle is moving. If they collide while, say, the paddle is moving up while the ball is moving down, the vertical component of the ball's velocity wouldn't be as great as if the ball and paddle were moving in the same direction. Then again, it's pong, so everything is in 45 degree angles as I remember. |