473,609 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2085
Kartik <Ka*********@re diffmail.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)cybers pace.org | don't, I need to know. Flames welcome.
Jul 22 '05 #2
Kartik <Ka*********@re diffmail.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)cybers pace.org | don't, I need to know. Flames welcome.
Jul 22 '05 #3
Uzytkownik "Kartik" <Ka*********@Re diffmail.com> napisal w wiadomosci
news:d8******** *************** ***@posting.goo gle.com...
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
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
Jul 22 '05 #4
Uzytkownik "Kartik" <Ka*********@Re diffmail.com> napisal w wiadomosci
news:d8******** *************** ***@posting.goo gle.com...
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
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
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
2926
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 excuse to write- and learn- some C++). To cut a long story short, I wrote a fair chunk of it, but realised that it's... not very good. Okay, it's my first "proper" C++ program, so that's no big deal, but I don't want to waste more time working...
98
6239
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 everything else will. Is there any way to prevent browsers from resizing text? If you could just point me to where this has already been answered, that would be great. Paul
6
334
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 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?
1
1663
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 have completed the actual game. I have recently been in hospital as I am disabled and so have not been in the lessons where my lecturers have been teaching us how to create scoring and incorporating different difficulty levels into the game. it...
1
5372
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 minimize the assumption other classes must make to use it. By building interface adaptation into a class, you eliminate the assumption that other classes see the same interface. Put another way, interface adaptation lets us incorporate our class...
3
1425
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 requirements. 1. Page displays a jpeg image from a folder on the server im guessing here that on first page load php could read the file names into an array, then subsequently get image names from the array.
1
1596
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 class will hold info about the player, such as hit points, weapons and armor that are equipped, and other stats specific to the player. Each page on the site will require some or all of the info stored in the player object.
2
5306
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 managed to write a code for a single player (human -vs- computer) game. My problem is, now we want to merge the two games with options to pick which game you would like to play. However, the games were written totally different styles and I can't...
0
8053
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8557
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8205
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8380
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5504
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4066
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1638
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1374
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.