Jump to content
  • Advertisement
phil67rpg

OpenGL sprite collision

Recommended Posts

well when I put drawcollsion_one()  function in the renderScene function it draws the animated sprite just fine, I have a problem with the game loop which does draw the animated sprite properly.

Share this post


Link to post
Share on other sites
Advertisement

well I have a problem that the drawcollision_one function is not drawn in my collision detection function.

Share this post


Link to post
Share on other sites

The key has expired. Use http instead (delete the 's' in the url).

I too find it a good idea for phil to work through this tutorial, it is exactly what he wants.

Share this post


Link to post
Share on other sites
1 hour ago, fleabay said:

Firefox says "Warning: Potential Security Risk Ahead"

Click on "Advanced"

16 minutes ago, Green_Baron said:

The key has expired. Use http instead (delete the 's' in the url)

But pictures is not uploaded in Chrome without 's'. I click on the "Advanced" button and allow to load this website.

Edited by 8Observer8

Share this post


Link to post
Share on other sites

actually I have done pong before in glut, I want  to finish this game,  can I please get some  help on  this problem.

Share this post


Link to post
Share on other sites

You said you've tried isolating rendering of the "drawcollision_one" function, and it displayed the collision graphic.  This function is being called directly by the "coll_plane_one" function.  Is perhaps your game loop calling "coll_plane_one", and then later clearing the buffer before it draws the bullet and plane?

It's helpful to organize your game loop to update the entire game state first, then perform all of your rendering in one go.

When you call "checkCollide", you could instead set a variable (let's say, "bool drawCollisionFlag").  And then in your draw / render pass, check the value of that flag and call "drawcollision_one" if true.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!