Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Testers needed...
#1
hi

im working on coding a project called lynns legacy as some of you know.

well, there have ben many issues about the timing of the prog, and i am starting to seriously consider the fact that the timer statement in FB is seriously flawed.

http://members.aol.com/rubentbstk/nxtll.rar

this is the latest build of the engine. everything runs smooth, perfectly on my comp. but on josiahs, it blazes out of control.

after coming up with several tests, i finally came up with this addition to the code: (keep in mind "delay#" is set to equal TIMER on the start of every loop)




Code:
Do: inc# +=1: Loop Until Timer - delay# >= .008
? inc#
inc# = 0
? delay#
? Timer
? Date$
? time$

Now, "? Timer" should increment once a second on EVERY computer. but he said that the readout was blazing faster than he can read. this just doesn't make sense to me. Also, inc# reads as 1, meaning the loop was skipped. this makes no sense considering i sent him this code:

Code:
Screen 13
Do
p# = Timer
Locate 1:? Timer
? p#
Do:empcyc# += 1:Loop Until Timer - p# > .050
? empcyc#
empcyc# = 0
Loop Until MultiKey(1)

and it functioned correctly.

could you please try to run it and let me know how fast the PRINT TIMER goes? thanks...
Reply
#2
I'll gladly download lynn's legacy. It's been something i've been looking forward to for a while.

I've noticed the timer bug(?) for a while now, but haven't said anything... Timer just doesn't seem to do it's job... just wait, i'll upload my example sometime...
Jumping Jahoolipers!
Reply
#3
Quote:I'll gladly download lynn's legacy. It's been something i've been looking forward to for a while.
It's gonna be awhile... :lol:
@Cha0s: TOLD you you shoulda reported the timer bug! Tongue
Reply
#4
If it's Windows 9x, the resolution is max 50 ms, using anything below that and it will be imprecise.. it's not much better in NT, max 10ms, if i remember.
Reply
#5
okay, i updated the exe to print these 2 values

? Trim$(Str$(Int(Timer Mod 10)))
? Right$(Time$, 1)

the first one displays the ones digit of the system timer, the second displays the current second on the system clock. these numbers should increment at the exact same speed, they do not necessarily need to be the exact same number.

so anyone who downloads it tell me how close the speeds are of the 2 numbers. thx. the link again is

http://members.aol.com/rubentbstk/nxtll.rar in case you are too lazy to scroll XD




thanks


edit: i may have come up with a fix for this:


Code:
seconds = Val(Right$(Time$, 2))

Do
  pullseconds = Val(Right$(Time$, 2))

Loop Until pullseconds <> seconds

p# = Timer
setsecond = pullseconds

If setsecond = 59 Then setsecond = -1

Do
  pullseconds = Val(Right$(Time$, 2))

Loop Until pullseconds > setsecond

diff# = Timer - p#


Do
  delay# = Timer

  [do some code...]


  Do:inc# +=1:Loop Until (Timer / diff#) - (delay# / diff#) >= .007 Or MultiKey(1)

Loop


this is only tested on my machine but it works, and i think the theory is sound...


edited more:

well, that didnt work, so i tried this


Code:
seconds = Val(Right$(Time$, 2))

Do
  pullseconds = Val(Right$(Time$, 2))

Loop Until pullseconds <> seconds

setsecond = pullseconds
If setsecond = 59 Then setsecond = -1

Do
  pullseconds = Val(Right$(Time$, 2))
  f# += 1

Loop Until pullseconds > setsecond

Do

  Do
    dumb = Val(Right$(Time$, 2))
    dumber# += 1

  Loop Until dumber# >= (f# \ 200)
  
  dumber# = 0

Loop


and that seemed prettttty friggin close to 5 milliseconds.
Reply
#6
It works fine here on WinMe. Confusedhifty:


...looks cool too! Tongue
Reply
#7
thanks for testing it =)

for anyone who hasnt tested it, the latest build is with (what seems to be) the universal timing method, so im still curious as to whether or not it works on ALL systems o.o thanks again to those who try :bounce:
Reply
#8
"Sorry, we cannot find that page" it says to me, as i try to download. Is it missing?
Reply
#9
I'm getting that error too. That's AOL for ya... :roll:

No offense intended. It's a cool acting demo. Keep up the good work! Tongue
Reply
#10
Nope, the demo was taken down due to... Well, basically I don't like my graphics to be seen until the final product is ready, except when testing is NEEDED, and since we're fine at the moment I whined at and bugged cha0s til he took it down. Smile
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)