The Daily Click ::. Forums ::. Klik Coding Help ::. Every 1/100 second and Always problem
 

Post Reply  Post Oekaki 
 

Posted By Message

Nuutti



Registered
  26/10/2003
Points
  1364
2nd July, 2005 at 13:41:14 -

Hi again.
Many people know that in MMF, the every 1/100th second isn't exact. It's almost 3 times too slow. And every 1/100th second means, in mmf, same as Always. Is it possible to make a code that adds 1 to a counter every second hundredth?
I would be greatly happy if this was possible.

Image Edited by the Author.

 
P.S. sorry for my mangled english.

Knudde (Shab)

Administrator
Crazy?

Registered
  31/01/2003
Points
  5125

Has Donated, Thank You!Clickzine StaffKlikCast StarVIP MemberGhostbuster!Dos Rules!I donated an open source project
2nd July, 2005 at 13:50:27 -

hmm, you might be able to use the time X object in some way, I'm not sure, I've never used it for myself.

 
Craps, I'm an old man!

Nuutti



Registered
  26/10/2003
Points
  1364
2nd July, 2005 at 13:53:09 -

I just tried that, but it doesn't work...

 
P.S. sorry for my mangled english.

DaVince

This fool just HAD to have a custom rating

Registered
  04/09/2004
Points
  7998

Game of the Week WinnerClickzine StaffHas Donated, Thank You!Cardboard BoxDos Rules!
2nd July, 2005 at 16:18:25 -

Fastloop exceeds that by far. Solution found!

 
Old member (~2004-2007).

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
2nd July, 2005 at 20:08:15 -

You can only do something about every 1/50 second, as MMF on average performs 50 loops a second. I think your only solution is to always add 2 to the counter instead of 1.

Image Edited by the Author.

 
n/a

Nuutti



Registered
  26/10/2003
Points
  1364
3rd July, 2005 at 03:22:04 -

Ah... all right... I will do something for that. Because i have a timer based custom platformer that i would like to fix, i will fix its timer things with MMFs loops! Anyway I'm going for a trip of 7 days so i won't try it just now...

 
P.S. sorry for my mangled english.

Tigerworks

Klik Legend

Registered
  15/01/2002
Points
  3882
3rd July, 2005 at 13:48:20 -

MMF reads the events 50 times per second, so yes 0.02 of a second. Note however that if the game slows down, events start to be read more slowly in sync with frame drawing. So at a slow part it might only be reading 30 times per second. If you're always adding to a timer this means your timer slows down too!

'Machine independant speed' in Runtime properites, when enabled, stops this synchronisation: events are always read 50 times a second, and if the game starts to slow down, the screen is drawn less frequently to compensate and keep events running 50 times/sec. However this can result in choppy display, but your timers will still be accurate.

 
- Tigerworks

AndyUK

Mascot Maniac

Registered
  01/08/2002
Points
  14586

Game of the Week WinnerSecond GOTW AwardHas Donated, Thank You!VIP Member
3rd July, 2005 at 13:59:54 -

Because i have a timer based custom platformer that i would like to fix

To slow down the jump speed with a custom engine i didn't change the 'code' for the counter or change the timer in any way.
My always event looks more like this

Always - set Y to Y of( "mask1" ) + value( "jump" ) / 4

do you get that? That slows down the speed which the character rises and falls whilst keeping jumps the same height.
Sorry if ive written that in a confusing way.

 
.
   

Post Reply



 



Advertisement

Worth A Click