I am creating an rpg style text game in C++. The game is running in
a constant game loop that updates the screen 10 times per second.
I am trying to figure out how the user can enter in input while the
game loop updates so that there is no pause during the game battles.
If anyone knows of a cin statement that doesn't stop the program every
time it is called that would be great! Any other ideas on how I can bypass
this problem would be fantastic!
See http://www.cplusplus.com/forum/articles/28558/.
By the time you finally figure out how to overcome some of the limitations of the console in order to use it for something it has never been intended for, you could have already finished your game.
Also, hugely agree with Bazzy and Athar. If you're making a game, use a library, and ultimately,if you want a process to run simultaneously alongside another, start a new thread.