Gamestudio Links
Zorro Links
Newest Posts
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
ZorroGPT
by TipmyPip. 02/25/26 12:15
WFO Training with parallel cores Zorro64
by Martin_HH. 02/24/26 19:51
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (TipmyPip, Grant, AndrewAMD, alibaba, Martin_HH), 5,525 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
alx, ApprenticeInMuc, PatrickH90, USER0328, Sfrdragon
19199 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Stop!!! The watch!! - Stopwatch #327605
06/07/10 15:32
06/07/10 15:32
Joined: Jan 2010
Posts: 20
FraK Offline OP
Newbie
FraK  Offline OP
Newbie

Joined: Jan 2010
Posts: 20
Hey guys,still wondering what would be the easiest way to program a real stopwatch, which starts with the game, including seconds, minutes, hours not neccessarily needed.
total_secs would be one way, but is it the easiest?!?!
greets

Re: Stop!!! The watch!! - Stopwatch [Re: FraK] #327621
06/07/10 16:30
06/07/10 16:30
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
the modulo operator % is your friend. laugh

Re: Stop!!! The watch!! - Stopwatch [Re: ventilator] #327625
06/07/10 16:38
06/07/10 16:38
Joined: Jan 2010
Posts: 20
FraK Offline OP
Newbie
FraK  Offline OP
Newbie

Joined: Jan 2010
Posts: 20
ok thanx, for the response, I'll check if he is a real friend or not. laugh

Re: Stop!!! The watch!! - Stopwatch [Re: FraK] #327741
06/08/10 11:17
06/08/10 11:17
Joined: Aug 2003
Posts: 7,440
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,440
Red Dwarf
http://3dgsnerd.xware-cg.com/modulo-the-mystery-operator/

here a little tutorial about modulo, if you can't understand the manual description of it laugh


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: Stop!!! The watch!! - Stopwatch [Re: Michael_Schwarz] #327967
06/09/10 16:10
06/09/10 16:10
Joined: Jan 2010
Posts: 20
FraK Offline OP
Newbie
FraK  Offline OP
Newbie

Joined: Jan 2010
Posts: 20
Although I have already experienced the modulo in c++, it's quite good to remind myself of it with this tutorial, it's very nice!
thank you Michael_Schwarz laugh

Re: Stop!!! The watch!! - Stopwatch [Re: FraK] #327987
06/09/10 18:19
06/09/10 18:19
Joined: May 2002
Posts: 7,441
ventilator Offline
Senior Expert
ventilator  Offline
Senior Expert

Joined: May 2002
Posts: 7,441
so did you come up with a solution already?

i would add time_step to a timer variable each frame. convert it from ticks to seconds and then use fraction() for hundredth, % for seconds, integer division for minutes,...

but a solution with total_seconds should work too.


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1