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

Username:   Password: 
 RegisterRegister   
 Need help with my animation.
Index -> Programming, Turing -> Turing Help
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
kickflipto50-50tobigspin




PostPosted: Sun Jun 11, 2006 12:50 pm   Post subject: Need help with my animation.

Okay I have an animation it runs fine but it iesn't too good, so can someone tell me what I can fix up on it and tell me how please. This is my best work, I spent hours on it, if I don't get a good mark on this I fail the class, and with my science and turing exam on monday and tuesday I have so much work to do. Here is my animation:
code:

colourback (11)
cls

for col : 1 .. maxy by 25
    drawfilloval (95, col, 64, 64, yellow)
    drawfilloval (470, 15, 240, 150, brown)
    drawfilloval (130, 10, 250, 180, brown)
    delay (64)
   
    drawfilloval (95, col, 64, 64, 11)
    drawfilloval (470, 15, 240, 150, brown)
    drawfilloval (130, 10, 250, 180, brown)
end for
drawfilloval (470, 15, 240, 150, brown)
drawfilloval (130, 10, 250, 180, brown)
colourback (black)
cls

for col : 1 .. maxy by 10000
    drawfilloval (95, 330, 30, 30, yellow)
    delay (1)


    drawfilloval (470, 15, 240, 150, brown)
    drawfilloval (130, 10, 250, 180, brown)
    for : 1 .. 255
        drawfilloval (300, 350, 1, 1, yellow)

        drawfilloval (400, 350, 1, 1, yellow)

        drawfilloval (400, 320, 1, 1, yellow)

        drawfilloval (320, 300, 1, 1, yellow)

        drawfilloval (450, 300, 1, 1, yellow)

        drawfilloval (420, 250, 1, 1, yellow)

        drawfilloval (200, 300, 1, 1, yellow)

        drawfilloval (150, 350, 1, 1, yellow)

        drawfilloval (170, 225, 1, 1, yellow)

        drawfilloval (250, 320, 1, 1, yellow)

        drawfilloval (320, 300, 1, 1, yellow)

        drawfilloval (230, 345, 1, 1, yellow)

        drawfilloval (520, 270, 1, 1, yellow)

        drawfilloval (920, 245, 1, 1, yellow)

        drawfilloval (320, 270, 1, 1, yellow)

        drawfilloval (500, 350, 1, 1, yellow)

        drawfilloval (100, 250, 1, 1, yellow)
        delay (64)
    end for
    cls
end for

for decreasing count : maxy .. 1
    drawfilloval (95, count, 64, 64, yellow)
    drawfilloval (470, 15, 240, 150, brown)
    drawfilloval (130, 10, 250, 180, brown)
    delay (11)
    drawfilloval (95, count, 64, 64, black)
    drawfilloval (470, 15, 240, 150, brown)
    drawfilloval (130, 10, 250, 180, brown)

end for


Sponsor
Sponsor
Sponsor
sponsor
Cervantes




PostPosted: Sun Jun 11, 2006 12:56 pm   Post subject: (No subject)

You might want to use double buffering to reduce flickering.
kickflipto50-50tobigspin




PostPosted: Sun Jun 11, 2006 1:04 pm   Post subject: (No subject)

Okay hopefully that will help a bit but not make my program go wow that's amazing. I'll tyr to do more work on my animation, after I study for my science exam 2mro and work on this animation so I can hand it in 2mro as well. Crying or Very sad
kickflipto50-50tobigspin




PostPosted: Sun Jun 11, 2006 6:08 pm   Post subject: (No subject)

I don't get how to put offscreenonly, do I just type in offscreenonly and it will stop fickering?
Cervantes




PostPosted: Sun Jun 11, 2006 6:13 pm   Post subject: (No subject)

kickflipto50-50tobigspin wrote:
I don't get how to put offscreenonly, do I just type in offscreenonly and it will stop fickering?

No. Read the tutorial that I linked to my last post.
kickflipto50-50tobigspin




PostPosted: Sun Jun 11, 2006 6:23 pm   Post subject: (No subject)

Cervantes wrote:
kickflipto50-50tobigspin wrote:
I don't get how to put offscreenonly, do I just type in offscreenonly and it will stop fickering?

No. Read the tutorial that I linked to my last post.

I'm starting to get it a little but my teacher didn't teach us View.Set ("graphics,offscreenonly") so if I use it he'll be like how did he do that. He's good at turing but I'm 100% sure that you guys on the forums are much better than him. Is there anyway to stop the flickering by using delays or something like that? Also what else can I add to my animation?
kickflipto50-50tobigspin




PostPosted: Sun Jun 11, 2006 6:41 pm   Post subject: (No subject)

okay I can fix my animation by using delay and by such and such, but it takes a long time for the next thing to pop up on the screen. How do I want to add a song in the backround so can someone tell me how to add a wmv or mp3 file to play on my turing program? Also when my moon comes down i nthe animation I can get it to come behind the ground but it starts to mix colours with the ground how do I get it to stop that. I can live with that but I'd rather know how to add music to it. Wink
Cervantes




PostPosted: Sun Jun 11, 2006 6:47 pm   Post subject: (No subject)

kickflipto50-50tobigspin wrote:
How do I want to add a song in the backround so can someone tell me how to add a wmv or mp3 file to play on my turing program?


Did your teacher not tell you how to do that? If not, then why are you doing it? You're teacher will be suspicious.

The point is, it's okay to learn outside of the classroom. In fact, it's encouraged. Especially with a course like Computer Science, such much of the material can be self taught, and it is often to the student's advantage to self-teach him or herself.

Music.PlayFile or something like that. Check the Music module in the Turing Help manual (press F10 when in the Turing window).

kickflipto50-50tobigspin wrote:
Also when my moon comes down i nthe animation I can get it to come behind the ground but it starts to mix colours with the ground how do I get it to stop that.

I'm not quite sure what you mean. (I'll let you in on a little secret: I haven't even run your code!) I'm guessing the problem is that you're drawing the moon after your drawing the ground. Try drawing it before you draw the ground, so that the ground will overlap the moon.
Sponsor
Sponsor
Sponsor
sponsor
kickflipto50-50tobigspin




PostPosted: Sun Jun 11, 2006 6:58 pm   Post subject: (No subject)

Cervantes wrote:
kickflipto50-50tobigspin wrote:
How do I want to add a song in the backround so can someone tell me how to add a wmv or mp3 file to play on my turing program?


Did your teacher not tell you how to do that? If not, then why are you doing it? You're teacher will be suspicious.

The point is, it's okay to learn outside of the classroom. In fact, it's encouraged. Especially with a course like Computer Science, such much of the material can be self taught, and it is often to the student's advantage to self-teach him or herself.

Music.PlayFile or something like that. Check the Music module in the Turing Help manual (press F10 when in the Turing window).

kickflipto50-50tobigspin wrote:
Also when my moon comes down i nthe animation I can get it to come behind the ground but it starts to mix colours with the ground how do I get it to stop that.

I'm not quite sure what you mean. (I'll let you in on a little secret: I haven't even run your code!) I'm guessing the problem is that you're drawing the moon after your drawing the ground. Try drawing it before you draw the ground, so that the ground will overlap the moon.

Okay people in my class have music so he won't be suspicious, I just don't know how to do it, so I put Music.PlayFile in my program but how will I be able to pick the song? Okay I have the moon first and then the ground, but when it starts to come behind the hill it starts to mix colours. do you understand now?
Cervantes




PostPosted: Sun Jun 11, 2006 7:29 pm   Post subject: (No subject)

kickflipto50-50tobigspin wrote:
I put Music.PlayFile in my program but how will I be able to pick the song?

Look at the Turing Help manual. You'll see that this procedure accepts one parameter, and that is a string that is the path and the filename of the file you want to play. You can omit the path and it will search in the directory that your turing program is in.

kickflipto50-50tobigspin wrote:

Okay I have the moon first and then the ground, but when it starts to come behind the hill it starts to mix colours. do you understand now?

No. I don't see how the colours can 'mix'. The only way that could happen is if you are manually mixing the colours using the RGB module, which I'm quite certain you're not.
kickflipto50-50tobigspin




PostPosted: Sun Jun 11, 2006 8:28 pm   Post subject: (No subject)

Okay it still doesn't work, I did this
code:
process DoMusic
    loop
        Music.PlayFile ("@##@$%$^#.mp3")
    end loop
end DoMusic

fork DoMusic

do I have to put the location of the song?
kickflipto50-50tobigspin




PostPosted: Sun Jun 11, 2006 8:34 pm   Post subject: (No subject)

NVM I got it working, but if I send it to my teacher and present it to the class won't there be no music does the the song have to be on the computer?
TheOneTrueGod




PostPosted: Sun Jun 11, 2006 8:35 pm   Post subject: (No subject)

well, does "@##@$%$^#.mp3" exist in the directory that your program is in? if not, then of course it won't work. Read Cervantes' posts.
kickflipto50-50tobigspin




PostPosted: Sun Jun 11, 2006 8:48 pm   Post subject: (No subject)

okay it works for one of my animation but not for good animation with delays will it not work for that one?
kickflipto50-50tobigspin




PostPosted: Sun Jun 11, 2006 10:28 pm   Post subject: (No subject)

Okay when I add View.Set ("graphics,offscreenonly") the program doesn't appear.
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 2  [ 23 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: