Okay, so i'm currently working on a duplicate of T-Rex game from Chrome, the one that is available if you do not have internet access. I am trying to do it in C language and use ncurses library for this purpose. So far i have a jumping dinosaur in static world, but i encoutered a problem i cannot solve for life. I need the world to loop, possibly endlessly but even a limited world works, but at the same time i need to listen to keyboard input in order to Jump with the dinosaur to avoid obstacles. How can i achieve that? Right now it's jumping based on a getch() function, but that function pauses the code and waits for the user input, so the world won't move until you push some key, and that's obviously not what i need. Is there some way to do this, or is it too advanced? Thanks!
Already tried getch() function, kbhit() function which is not available for me since i'm also working on a Linux OS, using getch() as a condition for IF statement, all without any luck ...