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

Username:   Password: 
 RegisterRegister   
 how do you draw gif animations turing
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
josh_65665




PostPosted: Fri Mar 14, 2008 10:10 pm   Post subject: how do you draw gif animations turing

i want to make a moving level for a game how do i draw a gif
Sponsor
Sponsor
Sponsor
sponsor
CodeMonkey2000




PostPosted: Fri Mar 14, 2008 10:20 pm   Post subject: RE:how do you draw gif animations turing

I don't think turing can handle gifs.
Nick




PostPosted: Fri Mar 14, 2008 10:25 pm   Post subject: RE:how do you draw gif animations turing

4.1 can I don't know the command though
josh_65665




PostPosted: Fri Mar 14, 2008 11:06 pm   Post subject: turing can handle gifs

i got it to open a gif but it does not play through it and when i do get it to play through it it does not look like the gif i made for example lets say i made a airplane gif and its rotar rotates on turing it would probaly look like a part black screen and part of the screen flashing i need to know how to properly open my gif
Mackie




PostPosted: Fri Mar 14, 2008 11:09 pm   Post subject: RE:how do you draw gif animations turing

From Turing Help (F10)

Turing:

% The "Pic.DrawFrames" program.
% Determine the number of frames in "globe.gif"
const fileName := "%oot/Support/Help/Examples/Data Files/globe.gif"
var numFrames : int := Pic.Frames (fileName)
% Load the picture
var delayTime : int
var pics : array 1 .. numFrames of int
Pic.FileNewFrames (fileName, pics, delayTime)
% Set the window to fit the picture
var w := Pic.Width (pics (1)) + 20
var h := Pic.Height (pics (1)) + 20
View.Set ("graphics:" + intstr (w) + ";" + intstr (h) + ",nobuttonbar")
% Display the pictures
for i : 1 .. 50
    Pic.DrawFrames (pics, 10, 10, picCopy, upper (pics), 50, false)
end for

josh_65665




PostPosted: Fri Mar 14, 2008 11:36 pm   Post subject: that does not work

when i run that sample i get a rotating globe but when i change the path of the globe gif to where my gif is it does not work and if any one needs to know i have turing 4.1.1
Mackie




PostPosted: Fri Mar 14, 2008 11:38 pm   Post subject: RE:how do you draw gif animations turing

What did you enter exactly as the path? As in EVERYTHING in the quotation marks.
Nick




PostPosted: Fri Mar 14, 2008 11:39 pm   Post subject: RE:how do you draw gif animations turing

some gifs do not work
Sponsor
Sponsor
Sponsor
sponsor
josh_65665




PostPosted: Fri Mar 14, 2008 11:39 pm   Post subject: im thinking of just extracting my gif

i would extract my gif file if i have to but theres so many frames in it i dont want to extract it if i dont need to i know theres a way to put my gif on the screen and have it run properly because the globe.gif works just need working code that will do it
josh_65665




PostPosted: Fri Mar 14, 2008 11:44 pm   Post subject: you would think this would work

this code works for the globe gif but not for my gif why is that



code:

const fileName := "C:/Users/josh/Pictures/level5.gif"
var numFrames : int := Pic.Frames (fileName)

var delayTime : int
var pics : array 1 .. numFrames of int
Pic.FileNewFrames (fileName, pics, delayTime)

var w := Pic.Width (pics (1)) + 20
var h := Pic.Height (pics (1)) + 20



View.Set ("graphics:" + intstr (w) + ";" + intstr (h) + ",nobuttonbar")

for i : 1 .. 50
delay (1000)
    Pic.DrawFrames (pics, 10, 10, 0, upper (pics), 50, false)
end for
Mackie




PostPosted: Fri Mar 14, 2008 11:46 pm   Post subject: RE:how do you draw gif animations turing

It's hit or miss. It probably won't work.
josh_65665




PostPosted: Sat Mar 15, 2008 11:51 am   Post subject: any more suggestions?

does any one have any more suggestions
CodeMonkey2000




PostPosted: Sat Mar 15, 2008 12:01 pm   Post subject: RE:how do you draw gif animations turing

Don't use GIFs, store all the images in an array, then draw them one by one.
josh_65665




PostPosted: Sat Mar 15, 2008 12:10 pm   Post subject: ?

how do i do that i dont really know how to use arrays
A.J




PostPosted: Sat Mar 15, 2008 1:43 pm   Post subject: Re: how do you draw gif animations turing

I suggest you check out the Turing Walkthrough page and learn about all the basics (plus there are some advanced stuff like recursion)
first Very Happy!
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  [ 17 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: