Omnimaga
Calculator Community => TI Calculators => Axe => Topic started by: Keoni29 on October 22, 2011, 04:12:49 am
-
The code for my animated titlescreen got really big. Can someone help me optimize it?
:Lbl TITLE
:copy(GDB20,L6,768
:DispGraph
:Pause 500
:copy(GDB21,L6,768
:DispGraph
:Pause 500
:Lbl F
:copy(GDB22,L6,768
:DispGraph
:Pause 500
:copy(GDB23,L6,768
:DispGraph
:Repeat getKey(54)
:For(30)
:SinReg1640,4000
:End
:For(A,0,300
:If getKey(15)
:Return
:End
:SinReg1100,1000
:End
:End
:For(A,0,5
:sub(NOISE,10,500
:copy(GDB22,L6,768
:DispGraph
:sub(NOISE,15,500
:copy(GDB23,L6,768
:DispGraph
:Pause 20
:End
:ClrDraw
:DrawInv
:DispGraph
:Pause 1000
-
If you stored all the pictures in one GDB variable, the code looks something like this:
While(screen active)
copy(gdb+O,L6,768)
O+768^(768*number of frames) ->O
pause 500
end
-
can u show us the pictures? there is a possibility for optimization there.
-
I use OS pictures. Those are a given size isn't it? (if it aint there is some space black I can cut off)
-
They can be different sizes but you have to create them with axe. You can make a program that will copy all the pics you use into one and you could get rid of the unused black space in the process. note: if you defined all the pics one right after another, they are all right after eachother in memory. Example:
Pic1->GDB1
Pic2->GDB2
Copy(GDB1+768,L6,768) ;displays Pic2
-
well, it is highly likely in an animated title screen, that the next frame will have similarities with the prior, thus we oonly have to do a little shifting around.
-
They can be different sizes but you have to create them with axe. You can make a program that will copy all the pics you use into one and you could get rid of the unused black space in the process. note: if you defined all the pics one right after another, they are all right after eachother in memory. Example:
Pic1->GDB1
Pic2->GDB2
Copy(GDB1+768,L6,768) ;displays Pic2
Do I have to export in plain hex code?
well, it is highly likely in an animated title screen, that the next frame will have similarities with the prior, thus we oonly have to do a little shifting around.
Nah it's a fading in/out animation. You cant do that.
-
can you give us a screeny?
if it fades in and out, you can just use shade()....
-
Nope it's more complex than that.
(http://www15.speedyshare.com/files/30865978/download/Herocore%20footage2.gif)
-
can you make a screeny of just the title screen please....
and put it in25% speed in wabbit.
-
Why? I have posted a screenshot in the post above you.
(http://www11.speedyshare.com/files/30867315/download/Titlescreen.gif)
-
i see the screeny for 40 sec or so. only 3 of which are the title screen....
thanks
HOw many bytes is it right now?
-
I love the screenshots. For some reason they are not visible for me. But when I right click them I can view them.
-
Never mind people. It's optimized a lot right now ;D
-
I love the screenshots. For some reason they are not visible for me. But when I right click them I can view them.
they disappear for some reason on me. then after 80 or so refreshes, they reappear.
-
Ye happens to me too, but it's just a bad host I guess.