Advertisement Jump to content
Sign in to follow this  
dk32321

real time character caluation

This topic is 4883 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

Sorry. about the heading it was the best i can describe it. I found a Beep() function in the windows header, so i thought it would be cool to make a piano type program where you push a key, and it plays the pitch of the beep, but when i programmed it i used a cin >> function for the keyboard input, and i realized that it isnt in realtime. You have to push enter to make it beep, so my question is how to make it where it beeps when you push a key, and olny the key with out hitting enter. if anybody can help me i would appreciate it. thank you

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
I'm not too familiar with C++, but what you need is a Key Listener.

Share this post


Link to post
Share on other sites
Yeah, you need to be running in a loop... sort of like a message loop...

if you're using Win32, "GetAsyncKeyState()" will do what you want... as long as you are querying it in the loop. It should immediately execute.

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.

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!