473,378 Members | 1,344 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,378 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 2063
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.