playMaker

Author Topic: Wait Action (Faster than 0.01)  (Read 6857 times)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Wait Action (Faster than 0.01)
« on: November 06, 2015, 11:19:42 AM »
Hi!

I have a bonus timer which will countdown to zero at the end of the level, but Wait 0.01 is to slow. It takes to long time to countdown. Is it a way to make it faster than 0.01?
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

KellyRay

  • Full Member
  • ***
  • Posts: 170
Re: Wait Action (Faster than 0.01)
« Reply #1 on: November 06, 2015, 11:36:48 AM »
Have you tried .001?

rik

  • Full Member
  • ***
  • Posts: 246
Re: Wait Action (Faster than 0.01)
« Reply #2 on: November 06, 2015, 11:44:53 AM »
use 0.001

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Wait Action (Faster than 0.01)
« Reply #3 on: November 06, 2015, 11:56:06 AM »
I have tried that, but the limit is 0.01 sec. 0.001 doesn't make it faster.
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Wait Action (Faster than 0.01)
« Reply #4 on: November 06, 2015, 12:33:26 PM »
have you tried 'Next Frame Event' or 'Wait late Update' actions ??

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Wait Action (Faster than 0.01)
« Reply #5 on: November 06, 2015, 12:42:32 PM »
I have tried Next Frame Event, but it's as fast as Wait 0.01. Where can I find Wait Late Update? I don't have that
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

dudebxl

  • Hero Member
  • *****
  • Posts: 602
Re: Wait Action (Faster than 0.01)
« Reply #6 on: November 06, 2015, 01:14:04 PM »
on the ecosystem.. but i don't think it will help you. Maybe you should use the countdown action. It is somewhere in this forum then format the string. Anyway, maybe you could explain more..

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Wait Action (Faster than 0.01)
« Reply #7 on: November 06, 2015, 03:28:26 PM »
Hi,
Countdown Timer is also on the EcoSystem

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Wait Action (Faster than 0.01)
« Reply #8 on: November 06, 2015, 07:20:47 PM »
It didn't help with Countdown Action. Too slow, but I got it to work anyway, with a little bit help from 600 from JabbR. I can use Float Interpolate or Ease Float. Only tried with the first one, but it works very well. Of course I got some problems, since I need to add the bonus to the score in one state. I had to find a way to update the score.

If you want, I can show how I did it. :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

djaydino

  • Administrator
  • Hero Member
  • *****
  • Posts: 7616
    • jinxtergames
Re: Wait Action (Faster than 0.01)
« Reply #9 on: November 07, 2015, 02:11:16 AM »
Hi,
yes indeed that will work and yes you can show how you did it.
there will always be someone happy with it :)

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Wait Action (Faster than 0.01)
« Reply #10 on: November 07, 2015, 10:19:10 PM »
Instead of give an explanation which I am not good to do, I upload the file so people who want can take a look. It's no explanation, but it's only two states with Actions, so it should not be that difficulty to understand. It's better to ask me if you need help! :)

I created another FSM also which accelerate the timer, so it starts slowly and increase the speed over time.

Hope it can be useful for someone! :)
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

Rabagast

  • Hero Member
  • *****
  • Posts: 683
    • Homepage
Re: Wait Action (Faster than 0.01)
« Reply #11 on: November 07, 2015, 10:21:31 PM »
Just one thing:
You need the uGUI Package from the Ecosystem.
Check out our homepage. http://www.walsberg.no
Or my personal game blog for news about my games. http://retro-tetro.walsberg.no

phannDOTde

  • Full Member
  • ***
  • Posts: 237
    • Peter Hann .de
Re: Wait Action (Faster than 0.01)
« Reply #12 on: November 14, 2015, 08:13:20 PM »
There is also an Int interpolate in the ecosystem that I found really helpful to do this. The upside with interpolate versus a "wait" solution is that you can exactly define how long it takes for the "Bonus Score" to show up no matter how many points the Player archived.

ManicMinerUK

  • Junior Playmaker
  • **
  • Posts: 51
Re: Wait Action (Faster than 0.01)
« Reply #13 on: November 15, 2015, 11:11:33 PM »
its probably worth bearing in mind that by default, 0.02 seconds is the duration of a frame in Unity, so if you want delays shorter than that, you will need to go to the project settings/Time and shorten the default timestep.

This might be why you are having problems with your waits as well?

Lane

  • Administrator
  • Hero Member
  • *****
  • Posts: 2511
  • Mender of the past
    • Cleverous
Re: Wait Action (Faster than 0.01)
« Reply #14 on: November 16, 2015, 12:00:31 AM »
Basically, you cannot Wait for a period of time shorter than the time it takes for the hardware to process the frame.

The timer will be analyzed on the next tick (as soon as possible) and decide at that point but it always takes a minimum of one frame so at that (rather instantaneous) speed, you are constrained by the framerate.

 It can be perceived as slowness if you are relying on it to do many tasks in rapid succession because they will always take one frame to do each one. If that's the case you have to manually throttle how many tasks are done per frame (more than one), based on current framerate or some arbitrary number that seems good.
Products by Cleverous
|| Vault Core : Database
|| Vault Inventory : Multiplayer Inventory
|| Vault Attributes : Character Stats
|| That Hurt! : Dmg Floaties
|| Quinn : 3D