Jump to content
  • Advertisement
Sign in to follow this  
ramearess

Making games that are not event driven?

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

I just finished a console based based game but the game loop pauses and waits for the player input. This means that enemies can not move until the player has. I know that when I move onto using OpenGL and make use of the win32 API I can include a loop similar to the peekMessage() one seen in many games but I was wondering is there any way to produce a console game that will check to see if there is a user input and if not continue to execute the loop allowing such things as enemies to move. here is an example of what the main game loop is now. gameLoop() input(); playerMove(); mosterMove(); levelChange(); //eg. objects mid flight from an explosion. drawLevel(); now currently input() uses _getch() what I'm asking is can i check if there has been a input and if not return this function so the rest of the game loop can be carried out. The reason I ask is at the moment I want to focus on my C++ language and general programming skills before I take the time to learn platform specific API's.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!