How fast can a timer go?

IMakeGamesLikeThisIMakeGamesLikeThis Beaverton, OregonMember Posts: 64

I recently learned through a small series of tests that GS cannot have a timer that does something every 0.01 (which is a centisecond (one hundredth of a second) seconds or faster. It can do things every 0.1 second (which is a decisecond (one tenth of a second)) and slower. This becomes a problem for the game I'm currently working on because I need the timer to increase a game attribute by o.o1 seconds every 0.01 seconds, but it can only do it every 0.1 seconds. If this is as fast as the timer can do things, than I think the creators of the GS software should really improve upon it because some gamers like to speed run games, which means that they attempt to beat the game or a certain percentage of the game as quickly as possible to try to get a world record just for bragging rights. Speed runs are timed in either centiseconds or milliseconds (which is a thousandth of a second (o.oo1 seconds)). It's just a suggestion. My thanks in advance if you do improve this. :)

Best Answer

Answers

  • IMakeGamesLikeThisIMakeGamesLikeThis Beaverton, OregonMember Posts: 64

    Thanks for the info colander. I appreciate your quick response, too!

  • SocksSocks London, UK.Member Posts: 12,822

    @IMakeGamesLikeThis said:
    I need the timer to increase a game attribute by o.o1 seconds every 0.01 seconds, but it can only do it every 0.1 seconds.

    The time attribute goes to 14 decimal places (minus the number of whole places), more than enough for a 0.01 timer.

  • colandercolander Member Posts: 1,610
    edited June 2014

    Out of interest I just did a test in the attached project and the quickest it will update a single attribute is every 0.035 seconds. A lower time will squeeze a couple more updates out of it but it won't update every time. I don't know if it is the timer, updating the attribute or both but seems to be the limit.

  • SocksSocks London, UK.Member Posts: 12,822

    @colander said:
    Out of interest I just did a test in the attached project and the quickest it will update a single attribute is every 0.035 seconds. A lower time will squeeze a couple more updates out of it but it won't update every time. I don't know if it is the timer, updating the attribute or both but seems to be the limit.

    You can drive an attribute to a much higher temporal resolution . . .

    Link: https://www.mediafire.com/?6qbl5dl4btvfd09

  • colandercolander Member Posts: 1,610

    @Socks I was reading it wrong I am thinking he is trying to use a Timer to do something which is what he says in the first two lines not just display a timer, stop watch, etc.

  • IMakeGamesLikeThisIMakeGamesLikeThis Beaverton, OregonMember Posts: 64

    @colander said:
    Socks I was reading it wrong I am thinking he is trying to use a Timer to do something which is what he says in the first two lines not just display a timer, stop watch, etc.

    I know how to display the timer, but I was asking how I could get it to go faster.

  • IMakeGamesLikeThisIMakeGamesLikeThis Beaverton, OregonMember Posts: 64

    @Socks said:
    The time attribute goes to 14 decimal places (minus the number of whole places), more than enough for a 0.01 timer.

    I know it does, but when I was testing it, I didn't notice any difference in any times after 0.1 seconds. For example, 0.0000001 seconds acted the same as 0.1 seconds, which is what was confusing me because it didn't seem like GS does anything faster than 0.1 seconds. Even though you can type more than 0.1 seconds in the timer, it still only does 0.1 when playing the game.

  • SocksSocks London, UK.Member Posts: 12,822
    edited June 2014

    @IMakeGamesLikeThis said:
    I know it does, but when I was testing it, I didn't notice any difference in any times after 0.1 seconds. For example, 0.0000001 seconds acted the same as 0.1 seconds

    Maybe I am confused as to what it is you're trying to achieve, I thought you were trying to increase an attribute by 0.01 every 0.01 seconds, which is quite straightforward, in fact there is already a built-in attribute that already increases by 0.01 every 0.01 seconds (self.time or game.time), I'd just use this - or if you want, use this to drive something else.

    @IMakeGamesLikeThis said:
    which is what was confusing me because it didn't seem like GS does anything faster than 0.1 seconds. Even though you can type more than 0.1 seconds in the timer, it still only does 0.1 when playing the game.

    By 'more' do you mean 'less' ?

  • IMakeGamesLikeThisIMakeGamesLikeThis Beaverton, OregonMember Posts: 64

    @Socks I didn't know about the attribute self.time, so now that you mention it, I could give it a try. As for the 'more' or 'less', I was saying that in the text box for the timer (to tell it after, for, or every how many seconds), you could type 0.00000000000001 seconds or some crazy number like that, but when you tested the game, it still only added o.01 seconds every 0.1 seconds, instead of the amount that was typed in the text box (in this example, 0.00000000000001). I hope this clears things up! I'll check out that attribute and see if that helps.

Sign In or Register to comment.