| We hope you enjoy your visit. You're currently viewing the Ultimate 3D Community as a guest. This means that you can only read posts, but can not create posts or topics by yourself. To be able to post you need to register. Then you can participate in the community active and use many member-only features such as customizing your profile, sending personal messages, and voting in polls. Registration is simple, fast, and completely free. Join our community! If you are already a member please log in to your account to access all of our features: |
- Pages:
- 1
- 2
| Clock Ingame | |
|---|---|
| Tweet Topic Started: Jun 3 2008, 08:22 AM (625 Views) | |
| Linkin | Jun 3 2008, 08:22 AM Post #1 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
How can i use global.time_factor to create a clock in game that runs at the same speed as a real life clock and is not effected by the fps. Thanks |
![]() Want something done in Photoshop, make a request Here Formerly known as DS-Development. | |
![]() |
|
| Electricity | Jun 3 2008, 01:40 PM Post #2 |
|
Chaos vs. Cosmos
![]() ![]() ![]() ![]() ![]() ![]()
|
i would've used current_time, current_second, current_minute or current_hour to make a clock... |
![]() |
|
| B4Rt | Jun 3 2008, 02:48 PM Post #3 |
|
Leader of INSIDEinteractive
![]() ![]() ![]() ![]() ![]()
|
me too |
| Sorry my bad english. | |
![]() |
|
| skarik | Jun 3 2008, 07:26 PM Post #4 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I used to use my Dad's high resolution time DLL, but since I lost my HD, I use Yourself's now. |
| Blog|EHS | |
![]() |
|
| Linkin | Jun 3 2008, 11:52 PM Post #5 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Yes but this is not based on the real time, it just progresses at the same speed as real time. |
![]() Want something done in Photoshop, make a request Here Formerly known as DS-Development. | |
![]() |
|
| zelda4evr | Jun 4 2008, 12:01 AM Post #6 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
im pretty sure you can find the code in a few of dr. bests examples, like for instance, i think i remember something about him using this to make it so the animation speed isn't affected by the fps. |
![]() | |
![]() |
|
| skarik | Jun 4 2008, 02:07 AM Post #7 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Yes, he divides the current_time variable smartly so there's no time rounding errors, like I used to get all the time because I'm a freaking retard. Edit:
But reading it a second time, it would be like current_day since the day documented in the manual. You do a simply subtraction, division, and a mod if you insist and you've got your clock. Edited by skarik, Jun 4 2008, 02:08 AM.
|
| Blog|EHS | |
![]() |
|
| silverfire56 | Jun 5 2008, 11:48 AM Post #8 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
every step you check to see if a second has passed using the current_second function and compare it to the last step. if it has gametime +1 save that to a file and ur set its no atomic clock but its good enough for your needs |
![]() |
|
| Eansis | Jun 5 2008, 09:16 PM Post #9 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
using "fps" is a bad idea because it doesn't update well enough |
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| Zedman3d | Jun 6 2008, 08:48 AM Post #10 |
![]()
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Cant you do: alarm[0]=fps; so it would activate the alarm 0 code every second..... maybe adding one second to the time in there? |
| |
![]() |
|
| Eansis | Jun 6 2008, 04:43 PM Post #11 |
|
ghost
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
What? That doesn't even make sense. If the FPS was at 60, it would set the alarm to 60-and the variable "fps" does not update fast enough, because that is how GM is. |
VOTE FOR BUDDY ROEMER HE'S A STRAIGHTFORWARD, DOWN TO EARTH AMERICAN GUY WHO ISN'T PART OF THE BIGBROTHER CONSPIRACY
| |
![]() |
|
| skarik | Jun 7 2008, 01:15 AM Post #12 |
|
kitten eating scum
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
@Zed Yeah, it would work, providing you start the alarm on the right step where the variable fps is updated. |
| Blog|EHS | |
![]() |
|
| Zedman3d | Jun 7 2008, 01:45 AM Post #13 |
![]()
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
I beleive it makes perfect sense actually as 60FPSecond is what the alarm should be set to. You just need to update it at the same time the fps does. And it would work because the FPS is updated every second. |
| |
![]() |
|
| Linkin | Jun 7 2008, 02:37 AM Post #14 |
|
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Yes i have tried this idea, but as Eanbro said it does not update fast enough, this is compared to Yourselfs High res timer. |
![]() Want something done in Photoshop, make a request Here Formerly known as DS-Development. | |
![]() |
|
| Zedman3d | Jun 7 2008, 04:04 AM Post #15 |
![]()
Forum God
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]()
|
Well i say use silverfire56's idea and get the value of seconds from the pc at the start of the game and plus 1 to the games seconds every time the value of seconds on the pc goes up. |
| |
![]() |
|
| Go to Next Page | |
| « Previous Topic · Off-topic · Next Topic » |
- Pages:
- 1
- 2





![]](http://z1.ifrm.com/static/1/pip_r.png)






4:52 PM Jul 11