I was wondering how to make the timer to go on even if the app is closed. I'm not making any games out of this yet, I just want to grasp the concept, so there's no capx or anything.
What I need is a method to get timestamps from some server somewhere (probably the signalling server). The idea behind getting the server timestamps is to avoid confusion of let say people chatting from across the world with different timestamps on their computer or phone. From what I understand this is also the basis of preventing people from cheat in time-based-building game, like Clash of Clan, Travian or anything similar.
I need a method simple enough for non-coder to understand and accuracy what not is not necessary.
Use this Date Plugin from the plugin master - rexrainbow. This will return the current time in unix time stamp format - perfect for helping you figure out who pushed the 'fire' button first...
Colludium I'm aware of that plugin. In fact I have search the forum for my specific requirement. What I understand from the plugin is it uses local machine timestamps, the timestamps I want to use is from external ie server.
Develop games in your browser. Powerful, performant & highly capable.
OK - just a couple of ideas, although admittedly this isn't my area of expertise.
If you're looking for a way to check if a player is cheating (by changing their clock time) you could you ask for a check and have C2 reply with a unix timestamp from the other player's computer. If the reply time stamp was dated before the request check ping was sent, or if the time difference is too great between the computers, then there's something fishy going on... If you're concerned about general clock and time differences due to normal system errors in hardware then could you synchronize the games' timers when they start to play - like having a game time stamp that runs independently of the system the game is being played on.
Sorry - I don't know how to help with using an external server to gain the data.