Author Topic: Animated titlescreen optimizing code  (Read 7389 times)

0 Members and 2 Guests are viewing this topic.

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Animated titlescreen optimizing code
« on: October 22, 2011, 04:12:49 am »
The code for my animated titlescreen got really big. Can someone help me optimize it?
Code: [Select]
: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 like my work: why not give me an internet?








Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Animated titlescreen optimizing code
« Reply #1 on: October 22, 2011, 04:20:35 am »
If you stored all the pictures in one GDB variable, the code looks something like this:

Code: [Select]
While(screen active)
copy(gdb+O,L6,768)
O+768^(768*number of frames) ->O
pause 500
end
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Animated titlescreen optimizing code
« Reply #2 on: October 22, 2011, 09:27:55 am »
can u show us the pictures? there is a possibility for optimization there.
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Animated titlescreen optimizing code
« Reply #3 on: October 22, 2011, 09:29:53 am »
I use OS pictures. Those are a given size isn't it? (if it aint there is some space black I can cut off)
« Last Edit: October 22, 2011, 09:30:14 am by Keoni29 »
If you like my work: why not give me an internet?








Offline Camdenmil

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 121
  • Rating: +4/-0
    • View Profile
Re: Animated titlescreen optimizing code
« Reply #4 on: October 22, 2011, 09:42:56 am »
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:

Code: [Select]
Pic1->GDB1
Pic2->GDB2
Copy(GDB1+768,L6,768) ;displays Pic2
It is bad luck to be superstitious.

Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Animated titlescreen optimizing code
« Reply #5 on: October 22, 2011, 09:44:00 am »
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.
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Animated titlescreen optimizing code
« Reply #6 on: October 22, 2011, 09:46:46 am »
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:

Code: [Select]
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.
If you like my work: why not give me an internet?








Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Animated titlescreen optimizing code
« Reply #7 on: October 22, 2011, 09:48:49 am »
can you give us a screeny?
if it fades in and out, you can just use shade()....
« Last Edit: October 22, 2011, 09:48:57 am by Happybobjr »
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Animated titlescreen optimizing code
« Reply #8 on: October 22, 2011, 09:50:37 am »
Nope it's more complex than that.
If you like my work: why not give me an internet?








Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Animated titlescreen optimizing code
« Reply #9 on: October 22, 2011, 10:02:27 am »
can you make a screeny of just the title screen please....
and put it in25% speed in wabbit.
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Animated titlescreen optimizing code
« Reply #10 on: October 22, 2011, 10:05:12 am »
Why? I have posted a screenshot in the post above you.
« Last Edit: October 22, 2011, 10:08:41 am by Keoni29 »
If you like my work: why not give me an internet?








Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Animated titlescreen optimizing code
« Reply #11 on: October 22, 2011, 10:16:54 am »
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?
« Last Edit: October 22, 2011, 10:31:28 am by Happybobjr »
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: Animated titlescreen optimizing code
« Reply #12 on: October 22, 2011, 10:56:43 am »
I love the screenshots. For some reason they are not visible for me. But when I right click them I can view them.


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Animated titlescreen optimizing code
« Reply #13 on: October 22, 2011, 11:13:23 am »
Never mind people. It's optimized a lot right now ;D
If you like my work: why not give me an internet?








Offline Happybobjr

  • James Oldiges
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2325
  • Rating: +128/-20
  • Howdy :)
    • View Profile
Re: Animated titlescreen optimizing code
« Reply #14 on: October 22, 2011, 12:06:42 pm »
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.
School: East Central High School
 
Axe: 1.0.0
TI-84 +SE  ||| OS: 2.53 MP (patched) ||| Version: "M"
TI-Nspire    |||  Lent out, and never returned
____________________________________________________________