Accessing real-world time from BP
Is there a way to access a certain web directory containing the GMT time to download the time and date to UE? I am making a single-player game in which the gameplay would also be affected when not playing the actual game (like OGame and others), but since it is single-player I do not need a server to compute everything while the game is closed. Instead, the calculations would be performed upon the subsequent game run and based on the time difference. However, a player could easily hack the game mechanics by changing the time and date on their PC if I was to use the system time as a reference.
This is why I would need a more reliable source of the real-world time than the system one, hence the question about the web directory.
asked Jul 12 '15 at 12:31 PM in Blueprint Scripting
You would need at HTTP sever that you would provide with SSL encoded time, in which client would validate if data comes from right sever (since public key can only decode message from private key which only server has, so you sure it's message from right server), problem is even that is not fully secure (user could potentially replace public key to fit specific private key, even if it was hard coded in machine code), but it's harder to do for more casual user. Also you would need to use C++ for that as UE4 has cryptography functions wrapped in APIs but are not accessible via blueprint.
Much more secure solution is to run game instance on server and let server manage the time, client hacking would not work here as you would use server clock to do any computations
answered Jul 12 '15 at 06:41 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here