Author Topic: Animations  (Read 9804 times)

0 Members and 1 Guest are viewing this topic.

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Animations
« Reply #30 on: October 30, 2010, 08:33:49 am »
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.

Code: [Select]
: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:

Code: [Select]
: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

Offline MRide

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 711
  • Rating: +14/-0
  • You can't see this.
    • View Profile
Re: Animations
« Reply #31 on: October 30, 2010, 09:46:12 am »
The Virus program is interesting.  Maybe you could have it display the "Mem Cleared" screen at the end.