473,326 Members | 2,136 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,326 software developers and data experts.

Count Down

I'm in the process of making a game right now, a very simple one, in
which there is a time limit of when you can accomplish something. So
what i want to do is make a 60 sec. countdown in my window. Could
someone help me out? i thought of doing a loop that lasts around 1
sec. but there are a few problems with that.
1. it will slow the rest of the program down
2. i can't be sure that its an exact second
and 3. the loop will last longer on some computers than others.

so how should i go about this?

Aug 19 '05 #1
5 3453
Hi,
I'm in the process of making a game right now, a very simple one, in
which there is a time limit of when you can accomplish something. So
what i want to do is make a 60 sec. countdown in my window. Could
someone help me out? i thought of doing a loop that lasts around 1
sec. but there are a few problems with that.
1. it will slow the rest of the program down
2. i can't be sure that its an exact second
and 3. the loop will last longer on some computers than others.


this is not exactly a question on c++, the answer depends very much on
the platform or the gui you are using, so you might want to consider a
more specific newsgroup. Just two examples: on Unix/Linux, you can set
an alarm clock which sends a signal to your process after some time;
if you are using QT you can set a timer, I guess other gui's have a
similar feature.

Steffen

Aug 19 '05 #2
im using Microsoft XP(windows) and i don't know what else to tell you.
im also using Dev. C++ if you need to know my compiler. where do you
suggest i ASK this question?

Aug 19 '05 #3

bballmitch wrote:
im using Microsoft XP(windows) and i don't know what else to tell you.
im also using Dev. C++ if you need to know my compiler. where do you
suggest i ASK this question?


Please reply with proper context. Did you try comp.programming?

Krishanu

Aug 19 '05 #4
Hi
im using Microsoft XP(windows) and i don't know what else to tell you.
im also using Dev. C++ if you need to know my compiler. where do you
suggest i ASK this question?


I don't program on windows, so I don't really >know<, but my guess would
be some newsgroup containing "programmer" and "windows"

Steffen

Aug 19 '05 #5

"bballmitch" <lu*********@sbcglobal.net> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
I'm in the process of making a game right now, a very simple one, in
which there is a time limit of when you can accomplish something. So
what i want to do is make a 60 sec. countdown in my window. Could
someone help me out? i thought of doing a loop that lasts around 1
sec. but there are a few problems with that.
1. it will slow the rest of the program down
2. i can't be sure that its an exact second
and 3. the loop will last longer on some computers than others.

so how should i go about this?


Since you say you're on M$ you should check a Microsoft group, but just
search for "tiime" "timer" "date" etc.. functions. each returns the time in
a different way.
Aug 19 '05 #6

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

Similar topics

3
by: phil | last post by:
Using Tkinter Canvas to teach High School Geometry with A LOT of success. My drawing gets very slow after a lot of actions. For instance I have created code to rotate a set of objects about a...
4
by: Matthew Groch | last post by:
Hi all, I've got a server that handles a relatively high number of concurrent transactions (on the magnitude of 1000's per second). Client applications establish socket connections with the...
2
by: james | last post by:
I have been looking for a way to reproduce the tooltip that Access displays when scrolling the Datagrid that shows the record count (changes as you move the thumb up or down). So far, nothing I...
68
by: Martin Joergensen | last post by:
Hi, I have some files which has the following content: 0 0 0 0 0 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 1 1 1 1 0 0 0 0 0 0 0
2
by: Volkan | last post by:
Hi, I'm trying to compare two XML documents and i'm using XPath queries to select nodes. XPathNavigator's Select method runs fast enough and returns an XPathNodeIterator object. When i try to...
2
by: HeroinNO.4 | last post by:
Copy the code below and save in a .htm file, for example : 1.htm, then run it in browser, you'll see a cool count down timer ! If it doesn't work, you may open http://www.fillweb.com in IE and...
1
by: HeroinNO.4 | last post by:
You can open http://www.fillweb.com in IE and View->Source to see the latest version full featured count down timer source code, or you may also copy the code below and save in a "*.htm" file, for...
2
by: HeroinNO.4 | last post by:
Hello everyone! Now the latest version of free count down timer source code is available in http://www.fillweb.com/countdown.htm, you can open it in IE and View->Source to see the latest version...
7
by: HeroinNO.4 | last post by:
Hello guys, free count down timer source code has updated to 06/11/27, you can copy the code below and save in a ".htm" file and run it in a browser support javascript 1.1 or later, or you can open...
0
by: mike0870 | last post by:
Hi, I've been at this one for hours and cannot not find any posts of anyone having the same problem. Ther scenario is, I need to fill a drop down box with a value in the grid row to pass to the...
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
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: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
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

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.