Can anyone please help me to design a simple game in c++??

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Kartik

    Can anyone please help me to design a simple game in c++??

    Hello,
    I was trying to develop a game in c++ ( text mode ), but I couldn't
    figure out how to make rest of the elements moving in the game while
    waiting for the player's input, or, how to accept the player's input
    in the game. I had visited many sites having c++ tutorials but no one
    gave enough explanation about this. an anyone please help me?
  • Christopher Benson-Manica

    #2
    Re: Can anyone please help me to design a simple game in c++??

    Kartik <Kartik_Rock@re diffmail.com> spoke thus:
    [color=blue]
    > I was trying to develop a game in c++ ( text mode ), but I couldn't
    > figure out how to make rest of the elements moving in the game while
    > waiting for the player's input, or, how to accept the player's input
    > in the game. I had visited many sites having c++ tutorials but no one
    > gave enough explanation about this. an anyone please help me?[/color]

    We can help you get input - post your code (AFTER reading the links
    that conclude this post) and we can give you advice. We can't help
    with making elements move while waiting for input - threads are not
    discussed here.




    --
    Christopher Benson-Manica | I *should* know what I'm talking about - if I
    ataru(at)cybers pace.org | don't, I need to know. Flames welcome.

    Comment

    • Christopher Benson-Manica

      #3
      Re: Can anyone please help me to design a simple game in c++??

      Kartik <Kartik_Rock@re diffmail.com> spoke thus:
      [color=blue]
      > I was trying to develop a game in c++ ( text mode ), but I couldn't
      > figure out how to make rest of the elements moving in the game while
      > waiting for the player's input, or, how to accept the player's input
      > in the game. I had visited many sites having c++ tutorials but no one
      > gave enough explanation about this. an anyone please help me?[/color]

      We can help you get input - post your code (AFTER reading the links
      that conclude this post) and we can give you advice. We can't help
      with making elements move while waiting for input - threads are not
      discussed here.




      --
      Christopher Benson-Manica | I *should* know what I'm talking about - if I
      ataru(at)cybers pace.org | don't, I need to know. Flames welcome.

      Comment

      • Marcin Kalicinski

        #4
        Re: Can anyone please help me to design a simple game in c++??

        Uzytkownik "Kartik" <Kartik_Rock@Re diffmail.com> napisal w wiadomosci
        news:d818e958.0 404080519.3e023 dac@posting.goo gle.com...[color=blue]
        > Hello,
        > I was trying to develop a game in c++ ( text mode ), but I couldn't
        > figure out how to make rest of the elements moving in the game while
        > waiting for the player's input, or, how to accept the player's input
        > in the game. I had visited many sites having c++ tutorials but no one
        > gave enough explanation about this. an anyone please help me?[/color]

        AFAIK there are no input facilities in C++ that do not block until the input
        actually arrives. You'll have to use some system-specific library to do
        that.

        <OT>
        If you're working in Windows you may want to take a look at
        GetAsyncKeyStat e() function. Old Borland compilers had also non-standard
        'conio.h' header. It contained functions that allowed to do non-blocking
        keyboard input.
        </OT>

        Marcin


        Comment

        • Marcin Kalicinski

          #5
          Re: Can anyone please help me to design a simple game in c++??

          Uzytkownik "Kartik" <Kartik_Rock@Re diffmail.com> napisal w wiadomosci
          news:d818e958.0 404080519.3e023 dac@posting.goo gle.com...[color=blue]
          > Hello,
          > I was trying to develop a game in c++ ( text mode ), but I couldn't
          > figure out how to make rest of the elements moving in the game while
          > waiting for the player's input, or, how to accept the player's input
          > in the game. I had visited many sites having c++ tutorials but no one
          > gave enough explanation about this. an anyone please help me?[/color]

          AFAIK there are no input facilities in C++ that do not block until the input
          actually arrives. You'll have to use some system-specific library to do
          that.

          <OT>
          If you're working in Windows you may want to take a look at
          GetAsyncKeyStat e() function. Old Borland compilers had also non-standard
          'conio.h' header. It contained functions that allowed to do non-blocking
          keyboard input.
          </OT>

          Marcin


          Comment

          • Kartik

            #6
            Re: Can anyone please help me to design a simple game in c++??

            Thank you everyone for taking your time to read my question. Your
            advice may certainly be helpful.

            Comment

            • Kartik

              #7
              Re: Can anyone please help me to design a simple game in c++??

              Thank you everyone for taking your time to read my question. Your
              advice may certainly be helpful.

              Comment

              Working...