DarthRaff Posted August 28, 2014 Share Posted August 28, 2014 Hello, This is just c++, not Leadwerks. I have been looking in google a way to move something (using the console) around the screen using the keyboard trying to aboid this : When i push a key for move to the right the character, it moves one point, then stop while the key is still pushed and then start to move againg smoothing. Well, can someone tell me how can i eliminate this stop ? sorry if i ask this here but i have been looking for it in google with no result and don't know where to ask it. Quote Link to comment Share on other sites More sharing options...
Guppy Posted August 28, 2014 Share Posted August 28, 2014 Google for "c++ on key release" or just use OIS and stop worrying about it Quote System: Linux Mint 17 ( = Ubuntu 14.04 with cinnamon desktop ) Ubuntu 14.04, AMD HD 6850, i5 2500k Link to comment Share on other sites More sharing options...
DarthRaff Posted August 28, 2014 Author Share Posted August 28, 2014 Thank you, i thought that i have to clean the input buffer using fflush(stdin) but it doesn't work. i will try that you say, thank you again. Quote Link to comment Share on other sites More sharing options...
DarthRaff Posted August 28, 2014 Author Share Posted August 28, 2014 Hello again, Can't figure out how to use "on key release" to achive this, and i'd like to do it without an external library, but can't find the way. A lot of years ago, when i was trying quick basic, a teacher told me that i 'd have to clear the keyboard buffer to move something without that little annoying stop, but can't find how to do that in c++. If someone coul'd help me please... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.