Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Is there another way to fork sounds?
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
jamonathin




PostPosted: 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
Sponsor
sponsor
Naveg




PostPosted: Tue May 24, 2005 9:44 pm   Post subject: (No subject)

ran fine on my comp...
jamonathin




PostPosted: 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




PostPosted: 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




PostPosted: Wed May 25, 2005 3:50 pm   Post subject: (No subject)

The more hertz you increase, the more time it takes i guess.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: