473,320 Members | 1,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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?
Jul 22 '05 #1
6 2059
Kartik <Ka*********@rediffmail.com> spoke thus:
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/

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Jul 22 '05 #2
Kartik <Ka*********@rediffmail.com> spoke thus:
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/

--
Christopher Benson-Manica | I *should* know what I'm talking about - if I
ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
Jul 22 '05 #3
Uzytkownik "Kartik" <Ka*********@Rediffmail.com> napisal w wiadomosci
news:d8**************************@posting.google.c om...
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
Jul 22 '05 #4
Uzytkownik "Kartik" <Ka*********@Rediffmail.com> napisal w wiadomosci
news:d8**************************@posting.google.c om...
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
Jul 22 '05 #5
Thank you everyone for taking your time to read my question. Your
advice may certainly be helpful.
Jul 22 '05 #6
Thank you everyone for taking your time to read my question. Your
advice may certainly be helpful.
Jul 22 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

26
by: Michael Strorm | last post by:
Hi! I posted a message a while back asking for project suggestions, and decided to go with the idea of creating an adventure game (although it was never intended to be a 'proper' game, rather an...
98
by: Pamel | last post by:
I know this must have been asked elsewhere, but I cannot find it. There is a piece of text on my web page that I don't want browsers to resize. IE won't resize it if I specify the size in px, but...
6
by: Kartik | last post by:
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...
1
by: rainbowii7 | last post by:
Calling all programmers for helllllllllllllllppppp!!! i am currently doing a uni degree and our lecturers have set us the task of making a game in JavaScript. i chose to do a hangman game and...
1
by: Tony Johansson | last post by:
Hello Experts! I'm reading about design patter in the GAMMA book and there is something that I don't understand. That's why I ask you. It says "Pluggable adpters. A class is more reusable when...
3
by: paul.sherwood | last post by:
Hi Firstly let me say, and without false modesty, im a complete php noob. Im planning on converting a simple game from python to a class using, php powered web site. There follows my...
1
by: Chu | last post by:
Hello All- I'm writing a game using asp.net (c#). The game is a browser-based Role Playing Game. I'm trying to determine the best way to design the game with scalability in mind. The Player...
2
by: LilMeechc20 | last post by:
Hello, I have a group assignment that I have to do. We have to write a Tic Tac Toe game. One person in my group has managed to write the code for a multiplayer (human -vs- human) game and I...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.