Jump to content
  • Advertisement
Sign in to follow this  
illad

OpenGL OpenGl AutoRepeat Issues

This topic is 2565 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

My code upto now is attached.
It is some very basic code for a Pong game.


Two issues here...

1. Cannot figure out how to make the motion of the paddles instantaneous and smooth.
2. In the code, I think ive written it such that the paddle speed is 0 when i release the direction keys. But it doesn't seem to work

Thank you guys!

Share this post


Link to post
Share on other sites
Advertisement
This is input code; OpenGL has nothing whatsoever to do with input - it's for graphics only and nothing else.

It's also GLUT. GLUT isn't OpenGL and OpenGL isn't GLUT. GLUT is a simple and relatively high-level framework for handling some of the required OS interaction stuff in a portable manner. It's a layer between OpenGL and your OS, and that's all. It's also not intended to be fully-featured in these respects, so it's probably not a suitable choice for game input.

My advice? Port to something like SDL instead.

Share this post


Link to post
Share on other sites

This is input code; OpenGL has nothing whatsoever to do with input - it's for graphics only and nothing else.

It's also GLUT. GLUT isn't OpenGL and OpenGL isn't GLUT. GLUT is a simple and relatively high-level framework for handling some of the required OS interaction stuff in a portable manner. It's a layer between OpenGL and your OS, and that's all. It's also not intended to be fully-featured in these respects, so it's probably not a suitable choice for game input.

My advice? Port to something like SDL instead.



Thank You, but I knew that this was a GLUT issue.
I just couldn't find the concerned forum. Sorry to waste your time


Share this post


Link to post
Share on other sites
I don't have any experience about GLUT, but the basic idea is to make variables for the keys. For example bool keyUp, and set keyUp to true when the up key is pressed (and set it false when the key is released). Now... when you update the scene, if(keyUp == true) movePaddle();

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!