- Home /
Times and difference
I'm currently working on a game where I need to save the current time and date when the application closes down. and get the new time when application is loaded and compare how many seconds/minutes the difference is.
I'm using Javascript!
If anyone has a script for this I would really appreciate this, allthough tips and hints are very welcome too!
Here I'll give you a script in C++, (I won't since it's kinda cruel, C# is just too similar to Javascript anyway) that way you can learn what it does ins$$anonymous$$d of you installing a script that separates yourself from your project causing all sorts of problems.
just some advice using other scripts can leave you in the dark, since your making the game you want to know what's going on in it. say i give this script then disappear off the face off the earth, you just paste it into the game and release it... one of your customers says "this game is broken, your dates are comparing wrong!" ... now since you didn't write the script you have no idea how to fix it. you can't tell the customer that for obvious reasons...
another reason is copyright, if i decided to change my $$anonymous$$d(I wouldn't if i was giving it to you but there are crazy's out there), i can legally stop you from using that code(although its very hard and rare I would get that far since it's so generic).
Anyway the point is... asking for scripts and pasting them in is doing your project more harm than good
Answer by NoseKills · Oct 03, 2014 at 11:04 PM
Pretty much the same question here with an answer you can apply too.