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

K

Kartik

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?
 
C

Christopher Benson-Manica

Kartik said:
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?

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.

http://www.slack.net/~shiva/welcome.txt
http://www.parashift.com/c++-faq-lite/
 
M

Marcin Kalicinski

Uzytkownik "Kartik said:
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?

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
GetAsyncKeyState() function. Old Borland compilers had also non-standard
'conio.h' header. It contained functions that allowed to do non-blocking
keyboard input.
</OT>

Marcin
 
K

Kartik

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top