Clock needed to keep in touch with the outside world

Suggestions that have been added to the game.

Moderator: ickputzdirwech

mrvn
Smart Inserter
Smart Inserter
Posts: 5878
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Clock needed to keep in touch with the outside world

Post by mrvn »

Factorio is seriously addictive. Which makes it hard to keep track of the outside world time. So here is my suggestion:

1) Have an (optional) clock displayed somewhere in the GUI showing outside world time.
2) Allow setting an alarm so the game will show a popup after
2a) X days/hours/minutes of playing
2b) at a certain time
bobucles
Smart Inserter
Smart Inserter
Posts: 1708
Joined: Wed Jun 10, 2015 10:37 pm
Contact:

Re: Clock needed to keep in touch with the outside world

Post by bobucles »

There are these stores where you can get clocks so small you can wear on your ARM! Try it out sometime. FYI: Bitches love arm clocks.
User avatar
aubergine18
Smart Inserter
Smart Inserter
Posts: 1264
Joined: Fri Jul 22, 2016 8:51 pm
Contact:

Re: Clock needed to keep in touch with the outside world

Post by aubergine18 »

If the modding API exposed (from vague memory) os.time, then mods would be able to easily implement this feature. https://www.lua.org/pil/22.1.html
Better forum search for modders: Enclose your search term in quotes, eg. "font_color" or "custom-input" - it prevents the forum search from splitting on hypens and underscores, resulting in much more accurate results.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Clock needed to keep in touch with the outside world

Post by ssilk »

This was implement in the very early days of Factorio but has been removed, cause the external clock is a non-deterministic function. In simpler words: Every computer has a little bit different clock.

See viewtopic.php?f=71&t=13299

When implemented as event (as for example suggested as combinator in viewtopic.php?f=6&t=32691 -- as event is btw. the only way) this has the problem, that those events needs to be forwared to other players computers.

In other words: Really not so easy, as it sounds. :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Maharin
Burner Inserter
Burner Inserter
Posts: 13
Joined: Thu Sep 01, 2016 11:48 am
Contact:

Re: Clock needed to keep in touch with the outside world

Post by Maharin »

ssilk wrote:This was implement in the very early days of Factorio but has been removed, cause the external clock is a non-deterministic function. In simpler words: Every computer has a little bit different clock.

See viewtopic.php?f=71&t=13299

When implemented as event (as for example suggested as combinator in viewtopic.php?f=6&t=32691 -- as event is btw. the only way) this has the problem, that those events needs to be forwared to other players computers.

In other words: Really not so easy, as it sounds. :)
What if it was implemented as a local-only display of the local computer time and NOT considered part of the game? In other words, no adjustment for time zone or syncing involved, just a graphical representation of the local system time.

Granted, I play windowed so I see the time while playing anyway. :p
User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Clock needed to keep in touch with the outside world

Post by Deadly-Bagel »

If this is a general problem for you, there's most likely an overlay of some description that works for all games which is what you should really aim to have this for =P
Money might be the root of all evil, but ignorance is the heart.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Clock needed to keep in touch with the outside world

Post by ssilk »

It would be useful, if someone, which finds a good program to display the time in forground and has eventually also the other features (Alarm...), that he posts the links to it here.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Clock needed to keep in touch with the outside world

Post by steinio »

You could measure the seconds for Factorio start once and great a batch file which writes the current time to as a variable in a Lua file which is read by a mod. Now your real world time is in the game.

Add youre measured time as correction value and synchronize via game ticks.
Some seconds loss don't hurt I guess.

The rest is Lua magic.

Greetings steinio
Image

Transport Belt Repair Man

View unread Posts
hoho
Filter Inserter
Filter Inserter
Posts: 681
Joined: Sat Jan 18, 2014 11:23 am
Contact:

Re: Clock needed to keep in touch with the outside world

Post by hoho »

ssilk wrote:This was implement in the very early days of Factorio but has been removed, cause the external clock is a non-deterministic function. In simpler words: Every computer has a little bit different clock.
Quite weird reason considering displaying FPS/UPS has no problems in MP as far as I know.

Reading the clock from the computer and displaying is something I can't see any reasons why it has to be forwarded to anyone else. For time since startup, you could read that from OS threading API and also can't see how that could cause any more problems with deterministing (no idea if that's a word) considering massive differences in how the game can handle different hardware and OSes on lower level.
Hannu
Filter Inserter
Filter Inserter
Posts: 850
Joined: Thu Apr 28, 2016 6:27 am
Contact:

Re: Clock needed to keep in touch with the outside world

Post by Hannu »

Why it can not show only player's computer's time? If players know it they do not use it to time their activities in game. Idea was to give the real world possibility to interrupt player. :)

But there are many alarm programs for all operating systems. You can set an alarm before beginning the game. If you want completely automated alarm and gaming restriction system, take a wife. :)
User avatar
Deadly-Bagel
Smart Inserter
Smart Inserter
Posts: 1498
Joined: Wed Jul 13, 2016 10:12 am
Contact:

Re: Clock needed to keep in touch with the outside world

Post by Deadly-Bagel »

Better yet, have a baby. Can't remember the last time I needed my alarm to get up in the morning, previously had 4-5 alarms and eventually one that made me go downstairs and scan a barcode on the fridge before it stopped beeping.

And nothing instils paranoia of time like having a sleeping baby in the house =/
Money might be the root of all evil, but ignorance is the heart.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Clock needed to keep in touch with the outside world

Post by ssilk »

hoho wrote:
ssilk wrote:This was implement in the very early days of Factorio but has been removed, cause the external clock is a non-deterministic function. In simpler words: Every computer has a little bit different clock.
Quite weird reason considering displaying FPS/UPS has no problems in MP as far as I know.
Yes, displaying. This suggestion is about making it usable in-game or with mods. That ain't gonna work.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
zebediah49
Fast Inserter
Fast Inserter
Posts: 122
Joined: Fri Jun 17, 2016 8:17 pm
Contact:

Re: Clock needed to keep in touch with the outside world

Post by zebediah49 »

I agree that it would be a nice side-feature to have an option for a local time OSD, but that doing it in game would be somewhere between impossible and a terrible idea.

For some context, I present a thoroughly entertaining list, Falsehoods programmers believe about time. A few choice items relevant to the discussion at hand (all are false):
  • time on the server clock and time on the client clock would never be different by a matter of decades.
  • If the server clock and the client clock are not in synch, they will at least always be out of synch by a consistent number of seconds.
  • the duration of one minute on the system clock would never be more than an hour.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Clock needed to keep in touch with the outside world

Post by ssilk »

Synchronization with the server is not the problem. :)

Of course the times on all players computer are different. It would be a wonder if not. But calculating with the time is, because the determinism get's lost.

Simple example: an inserter, that requests iron plate by seconds of computer clock.

The game would immediately lose sync. Cause the chest will request all numbers between 0 and 59, but not at the same time at all player computers.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
hoho
Filter Inserter
Filter Inserter
Posts: 681
Joined: Sat Jan 18, 2014 11:23 am
Contact:

Re: Clock needed to keep in touch with the outside world

Post by hoho »

ssilk wrote:This suggestion is about making it usable in-game or with mods. That ain't gonna work.
I missed the part about mods, sorry about that.

Though, am I correct to assume that in MP, all players have always had equal amount of ticks/updates processed since they joined the game? I mean no one will skip updates. If someone is too slow, everyone else will wait for them.
Obviously, there could be a few milliseconds or even a second or two lag between people but when they are processing the same update, it should be "close enough".

If the host is the one who sends out the current date and time to clients, I can't see where the major issues would come.
afk2minute
Fast Inserter
Fast Inserter
Posts: 120
Joined: Wed Aug 10, 2016 2:53 pm
Contact:

Re: Clock needed to keep in touch with the outside world

Post by afk2minute »

ssilk wrote:It would be useful, if someone, which finds a good program to display the time in forground and has eventually also the other features (Alarm...), that he posts the links to it here.
That looks like the best solution for OP problem.
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Clock needed to keep in touch with the outside world

Post by steinio »

I installed the MSI Afterburner with Rivatuner.

With this program you can configure an OSD which can display time, FPS, CPU, RAM and GPU load and as byproduct overclock your GPU :)

https://gaming.msi.com/de/features/afterburner
MSI Afterburner.png
MSI Afterburner.png (43.66 KiB) Viewed 9804 times
Greetings steinio
Image

Transport Belt Repair Man

View unread Posts
mrvn
Smart Inserter
Smart Inserter
Posts: 5878
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: Clock needed to keep in touch with the outside world

Post by mrvn »

ssilk wrote:This was implement in the very early days of Factorio but has been removed, cause the external clock is a non-deterministic function. In simpler words: Every computer has a little bit different clock.

See viewtopic.php?f=71&t=13299

When implemented as event (as for example suggested as combinator in viewtopic.php?f=6&t=32691 -- as event is btw. the only way) this has the problem, that those events needs to be forwared to other players computers.

In other words: Really not so easy, as it sounds. :)
Oh I didn't mean the outside clock to interact in any way with the game engine (as for example with combinators). It just want it to be visible on the players screen and the events would be popups that interrupt the game. After all in a multiplayer game people might have different timezones and might want to leave at different times. E.g. player 1 has to catch the last bus home at 12:34 so he sets his alarm to 12:15.
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12889
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Clock needed to keep in touch with the outside world

Post by ssilk »

mrvn wrote:Oh I didn't mean the outside clock to interact in any way with the game engine (as for example with combinators). It just want it to be visible on the players screen and the events would be popups that interrupt the game. After all in a multiplayer game people might have different timezones and might want to leave at different times. E.g. player 1 has to catch the last bus home at 12:34 so he sets his alarm to 12:15.
Ok, I repeat: that is possible somehow. It is not possible to have the system-clock inside the game (as combinator signal or in a mod-api-function).
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Post Reply

Return to “Implemented Suggestions”