
-----------------------------------
josh_65665
Fri Mar 14, 2008 10:10 pm

how do you draw gif animations turing
-----------------------------------
i want to make a moving level for a game how do i draw a gif

-----------------------------------
CodeMonkey2000
Fri Mar 14, 2008 10:20 pm

RE:how do you draw gif animations turing
-----------------------------------
I don't think turing can handle gifs.

-----------------------------------
Nick
Fri Mar 14, 2008 10:25 pm

RE:how do you draw gif animations turing
-----------------------------------
4.1 can I don't know the command though

-----------------------------------
josh_65665
Fri Mar 14, 2008 11:06 pm

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
Fri Mar 14, 2008 11:09 pm

RE:how do you draw gif animations turing
-----------------------------------
From Turing Help (F10)


% 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
Fri Mar 14, 2008 11:36 pm

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
Fri Mar 14, 2008 11:38 pm

RE:how do you draw gif animations turing
-----------------------------------
What did you enter exactly as the path? As in EVERYTHING in the quotation marks.

-----------------------------------
Nick
Fri Mar 14, 2008 11:39 pm

RE:how do you draw gif animations turing
-----------------------------------
some gifs do not work

-----------------------------------
josh_65665
Fri Mar 14, 2008 11:39 pm

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
Fri Mar 14, 2008 11:44 pm

you would think this would work
-----------------------------------
this code works for the globe gif but not for my gif why is that




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
Fri Mar 14, 2008 11:46 pm

RE:how do you draw gif animations turing
-----------------------------------
It's hit or miss.  It probably won't work.

-----------------------------------
josh_65665
Sat Mar 15, 2008 11:51 am

any more suggestions?
-----------------------------------
does any one have any more suggestions

-----------------------------------
CodeMonkey2000
Sat Mar 15, 2008 12:01 pm

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
Sat Mar 15, 2008 12:10 pm

?
-----------------------------------
how do i do that i dont really know how to use arrays

-----------------------------------
A.J
Sat Mar 15, 2008 1:43 pm

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 :D!

-----------------------------------
Nick
Sat Mar 15, 2008 10:07 pm

Re: how do you draw gif animations turing
-----------------------------------
plus there are some advanced stuff like recursion

explain how recursion is needed for drawing images in an array, the way I see it, recursion is not needed

-----------------------------------
DaveAngus
Tue Mar 18, 2008 10:47 am

RE:how do you draw gif animations turing
-----------------------------------
Does anyone know how to make a Mario type game?

Please message me
