Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9047235
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T11:51:39+00:00 2026-06-16T11:51:39+00:00

I am trying to make a basic simple game in C++ where the user

  • 0

I am trying to make a basic simple game in C++ where the user constantly needs to input, and there should be constant output of other things (a moving object(*)).

Even if the user doesn’t input anything, the object must keep moving. This needs two loops to be run simultaneously which I don’t know how to do.

There is no graphics just basic symbols and letters.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T11:51:40+00:00Added an answer on June 16, 2026 at 11:51 am

    You don’t need two simultaneous loops. You should have only a single loop. On each loop iteration, you will update your game’s output and then check if the user has entered any input. If he has, then you read it and process it; otherwise, you just continue with your next loop iteration. An easy way to get started it to use the _kbhit and _getch functions, but you’ll probably need to use something more advanced like ncurses or the Win32 console functions eventually.

    while( !gameOver ) {
        DisplayGameState();
    
        if( _kbhit() ) {
            int c = _getch();
            ProcessInput( c );
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to make a simple xml-editor for some basic but specific needs, the
I am trying to make a very basic game with Java and I am
I am trying to make a Chess multiplayer game in Visual Basic. Its a
I've been trying to make a simple game in HTML5/JS. I've managed to get
I am trying to make a Galaga type game in android using the basic
I'm trying to make a simple fullscreen app to display the output of a
I'm trying to make a simple browser game without relying on anything fancy like
I am trying to make a simple game engine but I got stuck at
I'm trying to make a basic snake game in C++, I made a basic
I am trying to make a simple guess my number game in c++ but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.