Send players current time as event to all others

Ideas that are too old (too many things have changed since) and ones which won't be implemented for certain reasons or if there are obviously better suggestions.

Moderator: ickputzdirwech

Post Reply
User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Send players current time as event to all others

Post by ssilk »

There are reasons, why the current time of the computer the game is running on, cannot be read: It breaks determinism.

But knowing that in the game is useful.

It would be possible, if the current time is an event, just as if the player is clicking an input box and inputs the current time; that would not break the determinism, it is just an event like clicking on an item.

So, that is the suggestion: Send in regular intervals the current time of the hosting computer as an event (typically every minute :) ). That would help to implement special functions, like timers (which will go wrong, when you relied on the game-time) or other useful things.

For multiplayer and for saved replay-games this means, that everybody knows, how late it is on your computer, which breaks the data-security: For that reason, this function should be off by default, but could be turned on in the options.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

ratchetfreak
Filter Inserter
Filter Inserter
Posts: 950
Joined: Sat May 23, 2015 12:10 pm
Contact:

Re: Send players current time as event to all others

Post by ratchetfreak »

timers relying on game time would be more accurate than relying on wall clock time, lag delays everything equally

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Send players current time as event to all others

Post by ssilk »

That is not correct, because you cannot know, how much FPS you currently have (that information wold be also non-deterministic :) ). The speed changes, even with very small bases. 60 FPS is normally right, but not always.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

sillyfly
Smart Inserter
Smart Inserter
Posts: 1099
Joined: Sun May 04, 2014 11:29 am
Contact:

Re: Send players current time as event to all others

Post by sillyfly »

Ssilk, could you explain why this is necessary?
I can't think of any reason why I should want to know (in-game) the local time for one of the other players. If I really want to know I can just ask them in chat :)

For timers, I have to agree that game-time sounds like a better option, so for example a mechanism could be - send all players a message to fire a specific event at game-tick n, and then it stays deterministic.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Send players current time as event to all others

Post by ssilk »

The problem is, that if I do any action in game it needs to be send to all other clients. Thats in general also true for this.
Well, the simple thought is then, this event could be filtered, so that it is not send to the others. But then it looses the determinism, too, cause there are then events, that are not happening on all clients in the same way.
Well, I'm out here. I mean, there are surely ways to do this without sending, but I don't know, how. Your idea looks like a cool solution of this problem, but it will make a replay also non-deterministic, cause the time when playing is then different to the time, when replayed. And if I use the generated event and save that, we are again at sentence #3 of this post.
Well, I'm out 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...

ratchetfreak
Filter Inserter
Filter Inserter
Posts: 950
Joined: Sat May 23, 2015 12:10 pm
Contact:

Re: Send players current time as event to all others

Post by ratchetfreak »

ssilk wrote:The problem is, that if I do any action in game it needs to be send to all other clients. Thats in general also true for this.
Well, the simple thought is then, this event could be filtered, so that it is not send to the others. But then it looses the determinism, too, cause there are then events, that are not happening on all clients in the same way.
Well, I'm out here. I mean, there are surely ways to do this without sending, but I don't know, how. Your idea looks like a cool solution of this problem, but it will make a replay also non-deterministic, cause the time when playing is then different to the time, when replayed. And if I use the generated event and save that, we are again at sentence #3 of this post.
Well, I'm out here. :)
or save those events in the replay as well (overriding cpu time)

sillyfly
Smart Inserter
Smart Inserter
Posts: 1099
Joined: Sun May 04, 2014 11:29 am
Contact:

Re: Send players current time as event to all others

Post by sillyfly »

I still don't understand why this is needed....

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Send players current time as event to all others

Post by ssilk »

Usage: To calculate the true length of playing for example. Or displaying the current time. Or for example, automatically shutting down Factorio, when in server mode...
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Bytenex
Inserter
Inserter
Posts: 38
Joined: Fri Jun 26, 2015 7:14 pm
Contact:

Re: Send players current time as event to all others

Post by Bytenex »

As SillyFly already mentioned: I don't get it. Who needs the current time in-game?

1. Local time
E.g. my chat reads this:
[Player 1]: 12:00 - 01.01.1970
[Player 2]: 18:00 - 01.01.1970.

What information do I get from this? Oh my american friend is in America and I'm in Europe... Fine I already know that.

2. Actual time played
This could be nice if you are a speedrunner or something but I don't think that it matters in normal singleplayer games. I mean if there is a time difference of let's say 5 Minutes. I don't care.

3. Shutting down the server
Sorry my friend but I would never stop my headless server. The real purpose of a client - server system is to let the server run indefinetly. I would rather do this with "cron" (Linux) or "scheduled tasks" (Windows) than let the software decide when to shut down.

sillyfly
Smart Inserter
Smart Inserter
Posts: 1099
Joined: Sun May 04, 2014 11:29 am
Contact:

Re: Send players current time as event to all others

Post by sillyfly »

For 'actual time played' for speed-running etc. it would actually be better to use game-time. If your game somehow slowed to 30 fps it shouldn't meet you took twice as much time to complete the game, as all tasks, crafting etc. would be stretched proportionally.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Send players current time as event to all others

Post by ssilk »

Bytenex wrote: [Player 1]: 12:00 - 01.01.1970
[Player 2]: 18:00 - 01.01.1970.
The time from player 2 is needed to keep the game deterministic. Deterministic means: All events have to happen on all clients in the same way. Sending time is an event.
What information do I get from this? Oh my american friend is in America and I'm in Europe... Fine I already know that.
I my own real-time into game. But maybe you're right: The usage-cases are limited.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Bytenex
Inserter
Inserter
Posts: 38
Joined: Fri Jun 26, 2015 7:14 pm
Contact:

Re: Send players current time as event to all others

Post by Bytenex »

ssilk wrote:
Bytenex wrote: [Player 1]: 12:00 - 01.01.1970
[Player 2]: 18:00 - 01.01.1970.
The time from player 2 is needed to keep the game deterministic. Deterministic means: All events have to happen on all clients in the same way. Sending time is an event.
I think you don't get the definition of deterministic. It means that a world is bound to its rules. E.g. you can't let a ball fall upwards because it is not permitted by physical laws. Same applies to your external time. It doesn't make sense to implement actions based on a rule of an outside system.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Send players current time as event to all others

Post by ssilk »

Uh. So you need to remove intermediately your mouse and keyboard, when playing! Hurry up, you are injuring the rules of determinism! :)

Deterministic in this case (Factorio) means of course, that the events, that needs to be triggered from outside are handled in the same way on all instances (clients). That was the reason, why the time-functions where removed - I think 2 years ago - because they are different on each client.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Bytenex
Inserter
Inserter
Posts: 38
Joined: Fri Jun 26, 2015 7:14 pm
Contact:

Re: Send players current time as event to all others

Post by Bytenex »

ssilk wrote:Uh. So you need to remove intermediately your mouse and keyboard, when playing! Hurry up, you are injuring the rules of determinism! :)

Deterministic in this case (Factorio) means of course, that the events, that needs to be triggered from outside are handled in the same way on all instances (clients). That was the reason, why the time-functions where removed - I think 2 years ago - because they are different on each client.
You are right. But still the game-time would be a better indicator to trigger events than an external time. Your headless server (0.12) could handle this. Clients will always be synchronized to his game-state. You also said that these events triggered by the server could be filtered. Yes; but that would be cheating, wouldn't it?

ratchetfreak
Filter Inserter
Filter Inserter
Posts: 950
Joined: Sat May 23, 2015 12:10 pm
Contact:

Re: Send players current time as event to all others

Post by ratchetfreak »

sillyfly wrote:For 'actual time played' for speed-running etc. it would actually be better to use game-time. If your game somehow slowed to 30 fps it shouldn't meet you took twice as much time to complete the game, as all tasks, crafting etc. would be stretched proportionally.
Exactly speed runners prefer in-game time if they can get it.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: Send players current time as event to all others

Post by ssilk »

I move that to won't implement. This suggestion is missing the concrete usage case and only to implement it for speed runners or other questionable stuff and such is not reason enough.
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 “Outdated/Not implemented”