game: display a ball using opengl
can any one help me with how to display a 2d or 3d circle or ball. using opengles frame work .
how to move the ball using the acclerometer
and how collision between balls to be programmed
how to move the ball using the acclerometer
and how collision between balls to be programmed
Gonna have to be more specific. What API are you using?
If you haven't chosen one, don't know what one is, and/or are complety new to game programming, take a gander at http://www.idevgames.com/forum/showthread.php?t=11896 to help point you in the right direction.
If you haven't chosen one, don't know what one is, and/or are complety new to game programming, take a gander at http://www.idevgames.com/forum/showthread.php?t=11896 to help point you in the right direction.
Displaying a 2D circle or ball is *extremely* basic. Read some basic tutorials.
As far as collision detection, just use the distance formula from high school algebra:
dist = sqrt(x2-x1 * x2-x1 + y2-y1 * y2-y1)
if (dist < (radiusObj1 + radiusObj2) then collision occurred.
For 3D, just add the z term to the distance equation.
As far as collision detection, just use the distance formula from high school algebra:
dist = sqrt(x2-x1 * x2-x1 + y2-y1 * y2-y1)
if (dist < (radiusObj1 + radiusObj2) then collision occurred.
For 3D, just add the z term to the distance equation.
for iphone game development , i am using opengl es frame work .
by default a rotating square is displayed in the opengles template of iphone sdk. i need a circle or a ball.
i have read basic tutorials but for ball can any one point out any tutorials as it differs for opengles
by default a rotating square is displayed in the opengles template of iphone sdk. i need a circle or a ball.
i have read basic tutorials but for ball can any one point out any tutorials as it differs for opengles

