Is there another way to fork sounds?
Author |
Message |
jamonathin
|
Posted: Tue May 24, 2005 8:39 pm Post subject: Is there another way to fork sounds? |
|
|
Here's my problem. I'm trying to make a game entirely in turing (no pics, music, ect.) and the actual program is pretty good, it just gets kinda boring without sounds. Here's an example of what happens in my program, the first ball drops smooth, but the oher one tries to incorporate sounds, and get choppy/laggy.
Turing: | setscreen ("graphics:200;500,nobuttonbar,offscreenonly,position:center;center")
colorback (9)
process sounds (blah : int)
sound (blah + 300, 1)
end sounds
for decreasing i : maxy .. 1
cls
drawfilloval (maxx div 2, i, 10, 10, 10)
View.Update
delay (2)
end for
for decreasing i : maxy .. 1
cls
drawfilloval (maxx div 2, i, 10, 10, 10)
if i mod 20 = 0 then
fork sounds (i )
end if
View.Update
delay (2)
end for
|
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Naveg
|
Posted: Tue May 24, 2005 9:44 pm Post subject: (No subject) |
|
|
ran fine on my comp... |
|
|
|
|
|
jamonathin
|
Posted: Wed May 25, 2005 6:12 am Post subject: (No subject) |
|
|
Really? Maybe it's my dad's crappy comp. I'll try it at school. . . |
|
|
|
|
|
jamonathin
|
Posted: Wed May 25, 2005 7:42 am Post subject: (No subject) |
|
|
Ok, yeah it runs smoother on faster comps, but try this, withotu the if statement, it's twice as slow. .
Turing: |
setscreen ("graphics:200;500,nobuttonbar,offscreenonly,position:center;center")
colorback (9)
process sounds (blah : int)
sound (blah + 800, 1)
end sounds
for decreasing i : maxy .. 1
cls
drawfilloval (maxx div 2, i, 10, 10, 10)
View.Update
delay (2)
end for
for decreasing i : maxy .. 1
cls
drawfilloval (maxx div 2, i, 10, 10, 10)
fork sounds (i )
View.Update
delay (2)
end for
|
|
|
|
|
|
|
MysticVegeta
|
Posted: Wed May 25, 2005 3:50 pm Post subject: (No subject) |
|
|
The more hertz you increase, the more time it takes i guess. |
|
|
|
|
|
|
|