Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Snake X on May 30, 2010, 05:08:27 pm

Title: sprites scrolling
Post by: Snake X on May 30, 2010, 05:08:27 pm
alright, I need someone to help me make a scrolling BG for my title screen

Code: [Select]
[FFFFFFFFFDFDFDFD]->Pic1
dispgraph
vertical +
for(A,0,95)
pt-off(50,A,Pic1)
pt-on(rand^96,A,Pic1)
end
This is supposed to be a rain/snow effect, so it needs to draw the sprites multiple times, and scroll all at once. Please help.
Title: Re: sprites scrolling
Post by: Raylin on May 30, 2010, 05:25:17 pm
Put your Vertical + command in a Repeat loop.
Title: Re: sprites scrolling
Post by: Snake X on May 30, 2010, 06:05:14 pm
it doesn't display the sprites actually
edit: whoops.. I didn't put a dispgraph in there XD
edit 2: yeah.. didn't make a difference. It's only displaying ONLY one sprite scrolling at one time.. and actually that's all it displays, is just one sprite, then it ends.
Title: Re: sprites scrolling
Post by: Raylin on May 30, 2010, 06:11:40 pm
The program should look like this:

Code: [Select]
:<data goes here>
:<For loop for drawing the sprites here>
:<Repeat loop WITH DISPGRAPH inside here>

And you might just be better off making a Pic of the rain and/or snow and showing that instead.
Title: Re: sprites scrolling
Post by: Builderboy on May 30, 2010, 06:12:23 pm
So exactly what kind of sprite behavior would you like to see?
Title: Re: sprites scrolling
Post by: Snake X on May 30, 2010, 06:32:25 pm
(http://www.omnimaga.org/index.php?action=dlattach;topic=1564.0;attach=762;image)

scrolling down just like that except with my pic1 sprite
Title: Re: sprites scrolling
Post by: Builderboy on May 30, 2010, 06:34:16 pm
aha, so this is probably what you want then

Code: [Select]
[FFFFFFFFFDFDFDFD]->Pic1
While getKey!=15
pt-on(rand^96,A,Pic1)
Vertical +
DispGraph
End
Title: Re: sprites scrolling
Post by: Snake X on May 30, 2010, 06:37:25 pm
ERR: bad symbol (showed it at while getkey!=15)
Title: Re: sprites scrolling
Post by: Builderboy on May 30, 2010, 06:37:49 pm
oh the != is the 'not equal' symbol
Title: Re: sprites scrolling
Post by: Snake X on May 30, 2010, 06:39:50 pm
umm nope, that didn't do it. Sorry, only made a black screen
Title: Re: sprites scrolling
Post by: Builderboy on May 30, 2010, 06:40:59 pm
Well what is this sprite you are adding in?  Your sprite is mostly black so if a new one is being displayed every frame the screen would get black pretty quick.
Title: Re: sprites scrolling
Post by: Snake X on May 30, 2010, 06:42:01 pm
its a 4 pixel high column of blank pixels in a black screen
Title: Re: sprites scrolling
Post by: Builderboy on May 30, 2010, 06:46:22 pm
try this

Code: [Select]
[FFFFFFFFFDFDFDFD]->Pic1
1->A
While getKey!=15
DS<(A,3
pt-on(rand^96,1,Pic1)
End
Vertical +
DispGraph
End
Title: Re: sprites scrolling
Post by: DJ Omnimaga on May 31, 2010, 12:28:12 am
if I remember he wanted to be able to do stuff like in the STARSHIP demo included with Axe Parser and the first program shown in the tribute video. Just not with that many sprites at once