
-----------------------------------
jamonathin
Tue May 24, 2005 8:39 pm

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.
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


-----------------------------------
Naveg
Tue May 24, 2005 9:44 pm


-----------------------------------
ran fine on my comp...

-----------------------------------
jamonathin
Wed May 25, 2005 6:12 am


-----------------------------------
Really?  Maybe it's my dad's crappy comp.  I'll try it at school. . .

-----------------------------------
jamonathin
Wed May 25, 2005 7:42 am


-----------------------------------
Ok, yeah it runs smoother on faster comps, but try this, withotu the if statement, it's twice as slow. .


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
Wed May 25, 2005 3:50 pm


-----------------------------------
The more hertz  you increase, the more time it takes i guess.
