Omnimaga
Calculator Community => Other Calc-Related Projects and Ideas => Topic started by: Munchor on October 29, 2010, 02:45:50 pm
-
I've been playing around with animations and I've done a few interesting things, for now, I'll post a simple animation.
I've made a few more complex and fun, but can't upload them at the moment.
The GIF made in WabbitEmu doesn't look very fast, but it is fast and optimized, is there any trick to save faster GIFs?
Close all problems? Change settings?
Thanks, please tell me what you think. I think these could be used somewhere in a program, but anyways it's for practice mostly.
-
Looks cool! Is it supposed to move up and down or just side to side?
-
Looks cool! Is it supposed to move up and down or just side to side?
It gives the idea it is moving down, but it isn't, check why:
:ClrHome
:For(A,1,100
:Disp ".
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:End
-
Well, I mean, when it moves to the left, it drops down a sprite. Is that intentional?
-
Well, I mean, when it moves to the left, it drops down a sprite. Is that intentional?
Does it?
There are two:
:Disp ".
:Disp ".
That is intentional, is that what you mean?
-
Ah, yeah, that's just because of Disp.
Nice effect. It's not easy to get good animations in BASIC.
-
The GIF made in WabbitEmu doesn't look very fast, but it is fast and optimized, is there any trick to save faster GIFs?
Close all problems? Change settings?
Yep, just change the Framerate setting to 9 or something. That way, it'll look better in certain browsers.
-
A wave animation, I'll do a sea wave animation right away hahah.
Then, I'm gonna do a virus-like animation, which will be quite hard.
How can I do something like this:
Output(1,1,".
Then, wait a second or two and
Output(1,2,".
A second or two and
Output(1,3,".
Have no idea, th0ugh. Thanks :)
-
Put a For(A,0, somenumber): End where you want to pause. For 1 or two seconds I think try like 100 or 200 for somenumber (I forget exactly)
-
How can I do something like this:
Output(1,1,".
Then, wait a second or two and
Output(1,2,".
A second or two and
Output(1,3,".
If you want to make the program wait a bit, use something like rand(100 to waste processing time.
-
It gives the idea it is moving down, but it isn't, check why:
:ClrHome
:For(A,1,100
:Disp ".
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:Disp " .
:End
Nice effect. :)
Here's my code for the same effect:
:ClrHome
:For(A,1,7
:Disp " // Nothing after the quote
:End
:1->A // Current X position
:1->B // Variable to track movement
:Repeat getKey
:Disp " // Again, nothing after the quote
:Output(8,A,".
:A+B->A
:If Ans=10 or Ans=1
:-B->B // That's the negative sign, not minus
:End
What do you think of my code? :)
Nice animation; great job for just starting basic! ;D
-
That gave me a syntax error, though, can't tell which line for now, WabbitEmu.
-
Hmm, I just typed it to makes sure it would work. Did you type the "//" and everything after them? Those are comments and they're not meant to be typed in the code. :)
-
Don't type in the // and the stuff after it; those are his comments
...ninja'd
-
Hmm, I just typed it to makes sure it would work. Did you type the "//" and everything after them? Those are comments and they're not meant to be typed in the code. :)
Of course I removed the //, I'm not that stupid :S
-
A wave animation, I'll do a sea wave animation right away hahah.
My code for that one:
:ClrHome
:For(A,1,7
:Disp " // Nothing after the quote
:End
:DelVar A1->B // A is Current X location, B is Variable to track movement
:Repeat getKey
:Disp " // Again, nothing after the quote
:Output(8,1,sub(".......... ",10-A,10 // 10 periods followed by 9 spaces
:A+B->A
:If Ans=9 or not(Ans
:-B->B // That's the negative sign, not minus
:End
-
try this if the one ztrumpet posted doesn't work:
:Clrhome
:For(A,1,8
:Disp "
:End
:"(7 spaces).(7 spaces)->Str1
:Delvar TWhile 1
:T+1->T
:Disp sub(Str1,T,8
:If T=8
:Delvar T
:End
the Delvar stuff is intentional. ;)
-
Did you try to test your yunhua? :)
If T does not equal 8, it will skip the End. :(
Also, T+->T doesn't quite work either. :(
-
oops. :-[ fixing. :P
done. ;)
-
I prefer to do:
T + 1 -> T
:)
-
yeah, that was a mistake. :P
-
See prgmI13A included with Illusiat 13 game. It contains 54 magic animations in under 2 KB BASIC code. I don't exactly remember which variable need to be initialized before running it, though. You may have to check prgmI13C too. I would post the code but SourceCoder messes it up extremly bad...
-
I made a virus effect image, the only way to shut the program is by clicking "On", is there a way to change this?
Thanks ^^
-
you can use Onblock, an Assembly program which blocks the On button. btw, I see you got Wabbit working. :D
EDIT: link
http://www.ticalc.org/archives/files/fileinfo/330/33039.html
-
Huh, interesting. I had programs that did the wave effects, though when I went back and looked at them they were not optimized at all :P (made when I was just getting back into programing and such :P).
With Pure TI-BASIC, no, unfortunately you can't disable the [ON] break but with Hybrid TI-BASIC and, or as yunhua98 said, assembly you can.
-
That gave me a syntax error, though, can't tell which line for now, WabbitEmu.
What line did it point to?
-
A wave animation, I'll do a sea wave animation right away hahah.
My code for that one:
:ClrHome
:For(A,1,7
:Disp " // Nothing after the quote
:End
:DelVar A1->B // A is Current X location, B is Variable to track movement
:Repeat getKey
:Disp " // Again, nothing after the quote
:Output(8,1,sub(".......... ",10-A,10 // 10 periods followed by 9 spaces
:A+B->A
:If Ans=9 or not(Ans
:-B->B // That's the negative sign, not minus
:End
You can actually shave off ten bytes by having this:
For(A,1,7
Disp "
End
1→A
Ans→B
Repeat getKey
Disp "
Output(8,1,sub("..........",1,A
A+B→A
If max(Ans={1,10
-B→B
End
The reason it works is because Disp works the same as pushing [ENTER] on the homescreen. If you enter a string it will display it on the left side but if it's a number it will display on the right. Therefore, there is no need to accommodate :)
-
Wow, I can't believe I did it the way I did. Thanks for pointing it out! ;D * ZTrumpet feeds himself to the lobster. ^-^
-
No problem :) Simple mistake to make though so no worries :)
-
Ok, I made it working, I did (-B) -> B, and it worked :)
Yeah it is faster, but I could never do something like that :(
:ClrHome
:For(A,1,500
:Output(1,1,"DELETING RAM
:2→A
:Output(A,1,".
:rand(15
:Output(A,2,".
:rand(15
:Output(A,3,".
:rand(15
:Output(A,4,".
:rand(15
:Output(A,5,".
:rand(15
:Output(A,6,".
:rand(15
:Output(A,7,".
:rand(15
:Output(A,8,".
:rand(15
:Output(A,9,".
:rand(15
:Output(A,10,".
:rand(15
:Output(A,11,".
:rand(15
:Output(A,12,".
:rand(15
:Output(A,13,".
:rand(15
:Output(A,14,".
:rand(15
:Output(A,15,".
:rand(15
:Output(A,16,".
:rand(15
:Output(3,1,"RAM DELETED
:A+2→A
:Output(A,1,".
:rand(15
:Output(A,2,".
:rand(15
:Output(A,3,".
:rand(15
:Output(A,4,".
:rand(15
:Output(A,5,".
:rand(15
:Output(A,6,".
:rand(15
:Output(A,7,".
:rand(15
:Output(A,8,".
:rand(15
:Output(A,9,".
:rand(15
:Output(A,10,".
:rand(15
:Output(A,11,".
:rand(15
:Output(A,12,".
:rand(15
:Output(A,13,".
:rand(15
:Output(A,14,".
:rand(15
:Output(A,15,".
:rand(15
:Output(A,16,".
:rand(15
:Output(5,1,"DESTROYING
:A+2→A
:Output(A,1,".
:rand(15
:Output(A,2,".
:rand(15
:Output(A,3,".
:rand(15
:Output(A,4,".
:rand(15
:Output(A,5,".
:rand(15
:Output(A,6,".
:rand(15
:Output(A,7,".
:rand(15
:Output(A,8,".
:rand(15
:Output(A,9,".
:rand(15
:Output(A,10,".
:rand(15
:Output(A,11,".
:rand(15
:Output(A,12,".
:rand(15
:Output(A,13,".
:rand(15
:Output(A,14,".
:rand(15
:Output(A,15,".
:rand(15
:Output(A,16,".
:rand(15
:Output(7,1,"VIRUS FINISH
:A+2→A
:Output(A,1,".
:rand(15
:Output(A,2,".
:rand(15
:Output(A,3,".
:rand(15
:Output(A,4,".
:rand(15
:Output(A,5,".
:rand(15
:Output(A,6,".
:rand(15
:Output(A,7,".
:rand(15
:Output(A,8,".
:rand(15
:Output(A,9,".
:rand(15
:Output(A,10,".
:rand(15
:Output(A,11,".
:rand(15
:Output(A,12,".
:rand(15
:Output(A,13,".
:rand(15
:Output(A,14,".
:rand(15
:Output(A,15,".
:rand(15
:Output(A,16,".
:rand(15
:End
-
What is the purpose of your for loop? Since you're using 2→A at the start of the loop, A will have the same value every time the loop is run, and the only thing that will happen when you run the loop more than once is that the what you've already drawn will be drawn on top on itself.
The code can also be rewritten to save space by using other for loops.
:ClrHome
:Output(1,1,"DELETING RAM
:For(A,1,16
:Output(2,A,".
:rand(15
:End
:Output(3,1,"RAM DELETED
:For(A,1,16
:Output(4,A,".
:rand(15
:End
:Output(5,1,"DESTROYING
:For(A,1,16
:Output(6,A,".
:rand(15
:End
:Output(7,1,"VIRUS FINISH
:For(A,1,16
:Output(8,A,".
:rand(15
:End
Or even like this:
:ClrHome
:For(B,2,8,2
:If B=2
:Output(1,1,"DELETING RAM
:If B=4
:Output(3,1,"RAM DELETED
:If B=6
:Output(5,1,"DESTROYING
:If B=8
:Output(7,1,"VIRUS FINISH
:For(A,1,16
:Output(B,A,".
:rand(15
:End
:End
-
The Virus program is interesting. Maybe you could have it display the "Mem Cleared" screen at the end.