Page 1 of 3
Can you add a clock to the game?
Posted: Wed Jan 05, 2022 7:32 am
by sdgmlj
When playing this game, time passes too fast and you will miss the rest time. It is inconvenient to see the time in full screen mode. It is best to add a clock in the game to display the current time (not the time in the game)
Re: Can you add a clock to the game?
Posted: Wed Jan 05, 2022 6:16 pm
by BlueTemplar
And an alarm !
Yeah, this is something that other time-sucking games like Civilization have, and AFAIK not something that modders can add by themselves ? (sandboxing !)
(And IIRC changing OS time requires admin access, so it's not like data could be exfiltrated that way ?)
Re: Can you add a clock to the game?
Posted: Wed Jan 05, 2022 8:48 pm
by FuryoftheStars
If they wanted to, they could expose a read-only API equivalent of os.time(), then let modders deal with clock styles, locations, alarms, additional bells and whistles, etc.
Re: Can you add a clock to the game?
Posted: Wed Jan 05, 2022 8:56 pm
by robot256
The reason they have not done this is because it will break multiplayer completely. Os.time() will be different for every player and cause an instant desync. There are multiple mods that track time according to game ticks. To get real-life time, you will need an overlay widget from the operating systen outside of Factorio.
Re: Can you add a clock to the game?
Posted: Wed Jan 05, 2022 10:25 pm
by FuryoftheStars
Oh, right, because even the UI added by mods is deterministic.
Maybe that should be a request....
Re: Can you add a clock to the game?
Posted: Thu Jan 06, 2022 9:53 am
by ssilk
I mean they could add it. Just like the debug-output of current UPS/FPS — which is also non-deterministic (!) — they could add an output of the current system-time. What’s so difficult with that? Not modable, just display the dammed time.
It would help people like me, which tend to forget time and either are sucked fully into the game, starring on the screen till 4 o’clock in the morning or just don’t play it.
Re: Can you add a clock to the game?
Posted: Thu Jan 06, 2022 12:46 pm
by FuryoftheStars
ssilk wrote: ↑Thu Jan 06, 2022 9:53 am
I mean they could add it. Just like the debug-output of current UPS/FPS — which is also non-deterministic (!) — they could add an output of the current system-time. What’s so difficult with that? Not modable, just display the dammed time.
It would help people like me, which tend to forget time and either are sucked fully into the game, starring on the screen till 4 o’clock in the morning or just don’t play it.
Oh yeah, definitely. I think I read somewhere that their own UI has non-deterministic parts, but when it comes to what mods add for UIs, it’s all deterministic.
But yes, I’d like a clock regardless, though I would’ve loved for a way for a mod to use it.
Re: Can you add a clock to the game?
Posted: Tue Jan 11, 2022 7:33 am
by Koub
This is one of the oldest recurring request. There are so many threads about this subject that I don't even have the courage to merge them now (might get it later).
The answer I usually see is that "it would break determinism". As the answer I usually see is not from the devs, I take it with a grain of salt : I don't see why it wouldn't be technically possible to get real time from the OS and display it as an overlay on the screen. But anyway ...
My opinion on this hasn't changed since the beginning : real time clock has nothing to do in a game (unless the game actively uses it). To see time, it's possible to use a regular watch, or a (smart)phone, or a wall clock. If one has neither of these, I don't think one's that much interested in keeping track of the time anyway. And if one really has interest or real world time ONLY while playing Factorio, it's always possible to play in windowed mode. There are also GPU related tools that add overlays with fancy stuff like FPS, GPU temperature, and stuff.
I don't remember having seen a real time clock in any game save MMO games. I know I haven't played every single game in existence, but still that's not a standard or expected game feature.
And lastly, i see this as the first step for a feature creep. A real time clock is a totally game unrelated feature "that could be useful". As is an ingame notepad (it would be useful to take notes ingame), an ingame web browser (to watch let's plays/anime/series while playing), ... The devs have chosen not to start down this slippery slope, and I'm very fine with that.
If adding an ingame clock was just a matter of "it magically happened", then I wouldn't care. But it's not, and I'd rather see the devs work on the actual content than on such unrelated features.
Re: Can you add a clock to the game?
Posted: Tue Jan 11, 2022 9:34 am
by coppercoil
If there are so many requests, developers could make a little exception even if it is "game unrelated" feature. This
does not mean devs should embed web browser in the future, there's no case law in a gamedev
Mutiplayer determinism sounds like unnecessary overcomplication for me. Can it be just a function DisplayWallTime(int x, int y, int size...)? Are there functions for plain text output to the screen? Just asking, I'm not a modder.
Re: Can you add a clock to the game?
Posted: Tue Jan 11, 2022 12:56 pm
by BlueTemplar
Yeah, I don't see the relationship with determinism, nobody said that there would need to be only a
single client time for a game. Clearly there are things that differ from client to client - GUI interaction for instance. And a plain OS clock would not even impact game state !
But good point about this being feature creep better served by an external tool.
I could think of some very advanced uses for an os clock (like configuring the game speed depending on os time for "advanced AFK handling"), but those kinds of users can probably already
make their own workarounds...
Re: Can you add a clock to the game?
Posted: Tue Jan 11, 2022 6:59 pm
by quyxkh
BlueTemplar wrote: ↑Tue Jan 11, 2022 12:56 pm
Clearly there are things that differ from client to client - GUI interaction for instance.
But they don't differ from client to client. Every client runs every player's GUI interactions, the only difference is which players' GUI interactions get *displayed*.
I suppose they could add a per-player "last-seen OS wallclock" value, but then it'd have to be transmitted in every packet, bulking up the bandwidth consumption on a pipe that's meant to carry only human interactions.
Re: Can you add a clock to the game?
Posted: Tue Jan 11, 2022 7:13 pm
by FuryoftheStars
quyxkh wrote: ↑Tue Jan 11, 2022 6:59 pm
BlueTemplar wrote: ↑Tue Jan 11, 2022 12:56 pm
Clearly there are things that differ from client to client - GUI interaction for instance.
But they don't differ from client to client. Every client runs every player's GUI interactions, the only difference is which players' GUI interactions get *displayed*.
I suppose they could add a per-player "last-seen OS wallclock" value, but then it'd have to be transmitted in every packet, bulking up the bandwidth consumption on a pipe that's meant to carry only human interactions.
Yeah, I think the only way for us to get something like this (from a modders standpoint that doesn't bloat network traffic) is if the devs allowed for non-deterministic GUI elements that then had limited capabilities to avoid exploits (ie, client side only mods). While other games do have these types of things, I think typically they've had them from the start/added during development early on, so I wonder if the usefulness of this would be limited enough that they may not consider the effort worth it at this point.
From the perspective of having something like this in the base game, though, they already have non-deterministic GUI elements available to the core game, so they could do it. It's just a matter of if they want to for whatever reason. But as has been pointed out, too: feature creep.
Re: Can you add a clock to the game?
Posted: Tue Jan 11, 2022 9:38 pm
by BlueTemplar
quyxkh wrote: ↑Tue Jan 11, 2022 6:59 pm
BlueTemplar wrote: ↑Tue Jan 11, 2022 12:56 pm
Clearly there are things that differ from client to client - GUI interaction for instance.
But they don't differ from client to client. Every client runs every player's GUI interactions, the only difference is which players' GUI interactions get *displayed*.
I suppose they could add a per-player "last-seen OS wallclock" value, but then it'd have to be transmitted in every packet, bulking up the bandwidth consumption on a pipe that's meant to carry only human interactions.
Oh, right, most of them are indeed shared by all clients ?
AFAIK one that isn't is player cursor position ?
Re: Can you add a clock to the game?
Posted: Tue Jan 11, 2022 11:28 pm
by quyxkh
BlueTemplar wrote: ↑Tue Jan 11, 2022 9:38 pm
Oh, right, most of them are indeed shared by all clients ?
AFAIK one that isn't is player cursor position ?
Notice that the mouse cursor position is *write only*. It's not shared with any client. Any effects the positioning might have are broadcast, but that's different.
Re: Can you add a clock to the game?
Posted: Wed Jan 12, 2022 4:33 am
by sdgmlj
Koub wrote: ↑Tue Jan 11, 2022 7:33 am
This is one of the oldest recurring request. There are so many threads about this subject that I don't even have the courage to merge them now (might get it later).
The answer I usually see is that "it would break determinism". As the answer I usually see is not from the devs, I take it with a grain of salt : I don't see why it wouldn't be technically possible to get real time from the OS and display it as an overlay on the screen. But anyway ...
My opinion on this hasn't changed since the beginning : real time clock has nothing to do in a game (unless the game actively uses it). To see time, it's possible to use a regular watch, or a (smart)phone, or a wall clock. If one has neither of these, I don't think one's that much interested in keeping track of the time anyway. And if one really has interest or real world time ONLY while playing Factorio, it's always possible to play in windowed mode. There are also GPU related tools that add overlays with fancy stuff like FPS, GPU temperature, and stuff.
I don't remember having seen a real time clock in any game save MMO games. I know I haven't played every single game in existence, but still that's not a standard or expected game feature.
And lastly, i see this as the first step for a feature creep. A real time clock is a totally game unrelated feature "that could be useful". As is an ingame notepad (it would be useful to take notes ingame), an ingame web browser (to watch let's plays/anime/series while playing), ... The devs have chosen not to start down this slippery slope, and I'm very fine with that.
If adding an ingame clock was just a matter of "it magically happened", then I wouldn't care. But it's not, and I'd rather see the devs work on the actual content than on such unrelated features.
It's your right to adopt or not. We're just making suggestions. Our purpose is to make the game develop better. I believe this small function will provide convenience to players and will not have any adverse impact on the game. You can add an option to let players choose whether to turn it on or not.
I don't agree with what you said. Many games of the same type have time, and some have timeout reminders. It's inconvenient to say names here. Some of them have their own time, and some allow mod to add time.
Re: Can you add a clock to the game?
Posted: Wed Jan 12, 2022 11:34 am
by cpy
Seriously there isn't a mod for it?
Re: Can you add a clock to the game?
Posted: Thu Jan 13, 2022 1:44 am
by quyxkh
How about adding it to the rich-text renderer, "[local-time]" renders as the current local clock?
Re: Can you add a clock to the game?
Posted: Fri Jan 14, 2022 2:44 am
by shopt
I'm not seeing why people want Factorio to reinvent the wheel. Find a clock overlay, have clock in every game. Set a timer or alarm on your phone/computer. Play maximised in windowed mode and the OS gives you a clock, Factorio isn't the type of game which will lose performance by running in windowed mode. The problem is unrelated to Factorio, the solution should be too.
Re: Can you add a clock to the game?
Posted: Fri Jan 14, 2022 8:59 pm
by jodokus31
just add it as setting to debug options.
Re: Can you add a clock to the game?
Posted: Fri Jan 14, 2022 9:24 pm
by FuryoftheStars
shopt wrote: ↑Fri Jan 14, 2022 2:44 am
I'm not seeing why people want Factorio to reinvent the wheel.
I'm not seeing why you think adding the time is reinventing the wheel, but ok....