Can some1 describe me how does the games main loop look like?
I have a problem with AI for a simple game in cmd.exe, my program waits for user to press a key, and so the AI cant move before he puts in a key, and so on and so on. Here is a pseudocode of my loop
do
getch();
check which button is pressed
move AI
while(input is not escape)
What is wrong? Is there an alternative to getch? Should my loop look different? Im confused and can't continue writing the code.