Advanced Question 2 - Keeping time compared to device time - help

Mr HansonMr Hanson Member Posts: 94
edited October 2012 in Working with GS (Mac)
Good day everyone

Another (of what i think is an advanced question) issue in which i was wondering was true.

In Our game, players can earn coins by doing certain missions, solving problems, selling items and beating bots ect, However to get them more engaged and coming back, i was hoping i could have it so that they get so many coins for free every 6 hours (6 hours is just example, i would like to be able to know how to change the value of it so i know i can go from 1 min to 24 hours.)

So when they open the app back up, the attributes will compare the time it has closed and the time it was open, find the difference between the two, then work out how many, for example, 6 hour intervals have occurred and then change their coins to "the amount of coins they get" * "how many 6 hour intervals".

Hopefully that makes sense. I tried learning how to use the device times but had no luck, so if someone could help with my problem, or show how t use the time i could maybe work it out myself.

If need more information, just ask.

All the best
JonApp

Comments

  • Bad wolf GuyBad wolf Guy Member Posts: 206
    I am a newbie so i don't really know what i am talking about. But it could help :)
    Couldn't you just make a game.attribute called last time or something. Maybe constrain it to the real time. Then when the game is reloaded just do an equation like current time - last time. Then you could convert that to hours, or minutes, or seconds. Then if it if more than, lets say ten minutes, minus ten minutes from the answer you got previously and added 100 coins, or what ever you want to give. If your answer is 24 minutes, then you should get 200 coins and have 4 minutes remaining. I don't know if i helped or i just repeated what you said, but thought i would try.

    On another note, thanks for the Early Bird Game Template, it is still in work with level design. Thanks heaps :)
    Be watching this also for an answer.
  • Mr HansonMr Hanson Member Posts: 94
    Hello @123App

    Thanks, thats what we had thought at first, but then we thought, maybe something like this was impossible with GS. Thats why we needed to know could it be done. From what we have gathered and tested with time, i that there is going to be quite a lot of rules (then we might make it smaller if it starts working).

    As we have never dealt with time in GS before, we decided it could be a good challenge and would go great with our game.

    Glad you like the template :)

    So if anyone can provide any info or hints or starter advice, would love to hear.

    All the best
    JonApp
  • Mr HansonMr Hanson Member Posts: 94
    Thanks @uptimistik

    Yes, we have already seen this template from the ones that come with GS. And yes, we know its not for beginners, we have a very skilled team in graphics and design. However we are not that professional in GameSalad. Thats where i come in :). For that last year and a bit i have created three games that are clones of other games but these run well but are never going to be released because its a clone. So we have gained a bit experience. However i personally never dealt with time and decided i was brave enough to tackle it.

    From what i learnt so far is that for this to work, which mentioned as above, (and in another thread which you helped also) i would need to game to compare the device time with the last active time and tell me how many 10 minute intervals have occurred. With the remaining time goes to the count down which will show how long left the player has before they earn more free coins.

    Its going to take a bit of planning we understand, but if you have any experience with this or can provide and tips or hints that would be 'awesome' :)

    Otherwise now begins a long skill learning time in my life......Can't wait

    All the best
    JonApp
  • RUPASRUPAS Member Posts: 823
    @JonApp I'm interested in the same question as you, has managed to make the system of exchange over time?
  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    I think the problem here could be if the app is quit in the multitask menu you'd need to have access to the current date and year at the next open of the app. Not sure we have access to that info via GS.
  • RUPASRUPAS Member Posts: 823
    Ice Cap gives coins every day in their games, and have been developed with GameSalad
  • Mr HansonMr Hanson Member Posts: 94
    Hello @RUPAS and @FryingBaconStudios

    Sorry for late reply but we currently no longer use GameSalad at this point of time. It only use to quickly test out ideas out before working with a different non drag and drop software.

    To answer your question we did do a few test on this but never really tested it on device to prove if it worked.

    But what we had to do was have a rule that constrains the device time to an attribute and always save it.

    Then when the app is open it would have a rule that would have current device time minus saved device time ect.

    With ice cap games because it's everyday it should be easy to have a rule that says if date is equal Any of dates listed then give coins. It doesn't really compare times in my opinion.

    All the best
    JonApp
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I think the problem here could be if the app is quit in the multitask menu you'd need to have access to the current date and year at the next open of the app. Not sure we have access to that info via GS.
    It's there in Devices-->Clock-->Year | Month | Day, etc.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922
    Ah yeah wasn't sure. I don't do much with device time.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    Ah yeah wasn't sure. I don't do much with device time.
    I don't either but in my latest game I wanted to be able to display the last date that a student used the app, so I looked for it.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • RUPASRUPAS Member Posts: 823
    then no one has a solution? Or a rule that works to do something with the clock? regards
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    @RUPAS Did you look at the OSTime Demo that Uptimistik posted above? Seems like that would give you a good starting point.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    @RUPAS -- sorry, but can you restate your exact question. Is it something more than recording a previous timestamp and then subtracting it from the current timestamp?
  • RUPASRUPAS Member Posts: 823
    @RUPAS -- sorry, but can you restate your exact question. Is it something more than recording a previous timestamp and then subtracting it from the current timestamp?
    If I repeat the question and forgive my inability to express myself properly but I do not speak English, imagine a game like "pet animals" you have to feed him, take him to the doctor, washing, etc as you might do to their levels of hunger, health , hygiene, fall even when you can not open app. I'm sure you can thanks to the clocks, but would not know how to do it well. thanks
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    @RUPAS -- This seems to be covered in the OSTime Demo.

    The second scene of the demo shows how to keep a flower healthy. It uses four (one minute) increments to progressively show the flower wilting. In order to make the flower healthy again, the user needs to water the flower. (Then the four minute timer starts over again.)

    It also demonstrates how to save the timestamp so that the user can close the game (and/or device). Then when the game starts again it does not simply continue from where it left off. Instead it takes into account the time that has elapsed from closing the game and then restarting it.

    Isn't that demo helpful? What extra are you asking for?
Sign In or Register to comment.