Can you add a clock to the game?
Moderator: ickputzdirwech
Can you add a clock to the game?
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)
- BlueTemplar
- Smart Inserter
- Posts: 3211
- Joined: Fri Jun 08, 2018 2:16 pm
- Contact:
Re: Can you add a clock to the game?
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 ?)
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 ?)
BobDiggity (mod-scenario-pack)
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Can you add a clock to the game?
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.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Re: Can you add a clock to the game?
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.
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Can you add a clock to the game?
Oh, right, because even the UI added by mods is deterministic.
Maybe that should be a request....
Maybe that should be a request....
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Re: Can you add a clock to the game?
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.
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.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Can you add a clock to the game?
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.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.
But yes, I’d like a clock regardless, though I would’ve loved for a way for a mod to use it.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
Re: Can you add a clock to the game?
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.
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.
Koub - Please consider English is not my native language.
-
- Filter Inserter
- Posts: 502
- Joined: Tue Jun 26, 2018 10:14 am
- Contact:
Re: Can you add a clock to the game?
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.
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.
- BlueTemplar
- Smart Inserter
- Posts: 3211
- Joined: Fri Jun 08, 2018 2:16 pm
- Contact:
Re: Can you add a clock to the game?
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...
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...
BobDiggity (mod-scenario-pack)
Re: Can you add a clock to the game?
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*.BlueTemplar wrote: ↑Tue Jan 11, 2022 12:56 pm Clearly there are things that differ from client to client - GUI interaction for instance.
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.
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Can you add a clock to the game?
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.quyxkh wrote: ↑Tue Jan 11, 2022 6:59 pmBut 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*.BlueTemplar wrote: ↑Tue Jan 11, 2022 12:56 pm Clearly there are things that differ from client to client - GUI interaction for instance.
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.
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.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics
- BlueTemplar
- Smart Inserter
- Posts: 3211
- Joined: Fri Jun 08, 2018 2:16 pm
- Contact:
Re: Can you add a clock to the game?
Oh, right, most of them are indeed shared by all clients ?quyxkh wrote: ↑Tue Jan 11, 2022 6:59 pmBut 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*.BlueTemplar wrote: ↑Tue Jan 11, 2022 12:56 pm Clearly there are things that differ from client to client - GUI interaction for instance.
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.
AFAIK one that isn't is player cursor position ?
BobDiggity (mod-scenario-pack)
Re: Can you add a clock to the game?
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.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 ?
Re: Can you add a clock to the game?
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.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.
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?
Seriously there isn't a mod for it?
Re: Can you add a clock to the game?
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?
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?
just add it as setting to debug options.
-
- Smart Inserter
- Posts: 2768
- Joined: Tue Apr 25, 2017 2:01 pm
- Contact:
Re: Can you add a clock to the game?
I'm not seeing why you think adding the time is reinventing the wheel, but ok....
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles | New Gear Girl & HR Graphics