News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Create a countdown clock in BASIC

Started by skylas, 15:52, 25 March 20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

skylas

Hello all
I am thinking of creating a new quiz/test, but i need a small feature that i have problem to make.I would like to have a countdown clock, eg starting from 10 seconds that goes to 0 seconds, showing the time left (seconds and 2 decimals) for the player to answer.And of course to be interrupted when the player answers.

As  for the part of waiting the player to answer and taking a bonus based on quick answer, ia have already made that for <Capital quiz> using AFTER AND PRINT REMAIN.The one that i cannot think something is to make the countdown showing in the screen and being interrupted when player answers.
Anyone has a simple way for that?
Many thx for your help!
Web: https://amstradsakis.blogspot.com
Twitter: https://twitter.com/AmstradSakis
My programs (only BASIC):
RETRO-LOADSHEET ON AMSTRAD CPC!
PENALTY KICKS!
CAPITAL QUIZ!
CAPITAL QUIZ 2! (Reverse edition)
HEADS OR TAILS (ΚΟΡΩΝΑ/ΓΡΑΜΜΑΤΑ)
HEART CHASER 1,2,3!
BARBOUTI!
STROOPIE!
BUDRUMI!
ART WAR!
BATTLE OF LENINGRAD!
AMSTABOO!
RODOLFO SKYLARRIENTE 1 and 2!

ComSoft6128


skylas

Web: https://amstradsakis.blogspot.com
Twitter: https://twitter.com/AmstradSakis
My programs (only BASIC):
RETRO-LOADSHEET ON AMSTRAD CPC!
PENALTY KICKS!
CAPITAL QUIZ!
CAPITAL QUIZ 2! (Reverse edition)
HEADS OR TAILS (ΚΟΡΩΝΑ/ΓΡΑΜΜΑΤΑ)
HEART CHASER 1,2,3!
BARBOUTI!
STROOPIE!
BUDRUMI!
ART WAR!
BATTLE OF LENINGRAD!
AMSTABOO!
RODOLFO SKYLARRIENTE 1 and 2!

AMSDOS

My example uses EVERY and the check is made every second, so I guess to see the Decimal Intervals EVERY 50 can be changed to EVERY 25 to make a check every half second for example or 12.5 for a quarter of a second if you like that .25 interval.


I'm sure if can be done using TIME, but it's a bit late here and I can't do the math, unfortunately I can only List a Screenshot of the Code.
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

skylas

Quote from: AMSDOS on 11:37, 26 March 20
My example uses EVERY and the check is made every second, so I guess to see the Decimal Intervals EVERY 50 can be changed to EVERY 25 to make a check every half second for example or 12.5 for a quarter of a second if you like that .25 interval.


I'm sure if can be done using TIME, but it's a bit late here and I can't do the math, unfortunately I can only List a Screenshot of the Code.
Many thx AMSDOS! is seems it works fine with your proposal!
Web: https://amstradsakis.blogspot.com
Twitter: https://twitter.com/AmstradSakis
My programs (only BASIC):
RETRO-LOADSHEET ON AMSTRAD CPC!
PENALTY KICKS!
CAPITAL QUIZ!
CAPITAL QUIZ 2! (Reverse edition)
HEADS OR TAILS (ΚΟΡΩΝΑ/ΓΡΑΜΜΑΤΑ)
HEART CHASER 1,2,3!
BARBOUTI!
STROOPIE!
BUDRUMI!
ART WAR!
BATTLE OF LENINGRAD!
AMSTABOO!
RODOLFO SKYLARRIENTE 1 and 2!

Powered by SMFPacks Menu Editor Mod