One Of Halls Game Timer
One Of Halls Game Timer
I don't remember what game it was, but on one game you were creating, there was a boost where you could click the button and the timer would start counting down. This was done in PHP, and even since my last game I was working on, I was trying to figure out how to do that but never did. I wonder if you could share that code please? Thx!
Re: One Of Halls Game Timer
PHP cant do that. Try this is a start:Epiales wrote:I don't remember what game it was, but on one game you were creating, there was a boost where you could click the button and the timer would start counting down. This was done in PHP, and even since my last game I was working on, I was trying to figure out how to do that but never did. I wonder if you could share that code please? Thx!
https://blog.smalldo.gs/2013/12/create- ... countdown/
Re: One Of Halls Game Timer
PHP can do a timer, but not a visible one (that you see counting down).
Have a button that enables timer,
when clicked initiate a php insert/update to a table with the current timestamp.
Use Javascript countdown to visualise the time left.
When page is refreshed, retrieve the timestamp from database and visualize the countdown with js.
To make it 'safe', add a AJAX for the js to retrieve a confirmation from db when the countdown is 0.
Then enable the button. Otherwise refresh the countdown.
Have a button that enables timer,
when clicked initiate a php insert/update to a table with the current timestamp.
Use Javascript countdown to visualise the time left.
When page is refreshed, retrieve the timestamp from database and visualize the countdown with js.
To make it 'safe', add a AJAX for the js to retrieve a confirmation from db when the countdown is 0.
Then enable the button. Otherwise refresh the countdown.
Why so serious?
Business Intelligence, Data Engineering, Data Mining
PHP, HTML, JavaScript, Bash/KornShell, Python, C#, PL/SQL
MySQL, DB2, Oracle, Snowflake
Pentaho, DataStage, Matillion, Unity3D, Blender
Business Intelligence, Data Engineering, Data Mining
PHP, HTML, JavaScript, Bash/KornShell, Python, C#, PL/SQL
MySQL, DB2, Oracle, Snowflake
Pentaho, DataStage, Matillion, Unity3D, Blender
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm
Re: One Of Halls Game Timer
hmm dont remember what it was from but I believe I used JS for the actual display and then used PHP for the updating and actual timer as stated above.
Re: One Of Halls Game Timer
Yeah, it might have been urban realms. I watched what videos you had on there, but it didn't cover the timer. So was just curious if you had it lying around.hallsofvallhalla wrote:hmm dont remember what it was from but I believe I used JS for the actual display and then used PHP for the updating and actual timer as stated above.
- hallsofvallhalla
- Site Admin
- Posts: 12023
- Joined: Wed Apr 22, 2009 11:29 pm