Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 :: Word Fading ::
Index -> Programming, Turing -> Turing Submissions
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
MiX-MaztA-M8riX




PostPosted: Fri Nov 19, 2004 12:16 pm   Post subject: :: Word Fading ::

This is an easy (?) way to do it, I thought it was easy Laughing

:: EDIT ::
You Dont Need The Whole Thing, Just A Itty Bitty Message To Put In There For Fun
:: EDIT ::

code:


setscreen ("position:center;center,nobuttonbar")

colorback (255)
cls

loop

    for a : 16 .. 31
        color (a)
        locate (12, 25)
        put "THIS"
        delay (100)
    end for

    for b : 16 .. 31
        color (b)
        locate (12, 30)
        put "IS"
        delay (100)
    end for

    for c : 16 .. 31
        color (c)
        locate (12, 33)
        put "YOUR"
        delay (100)
    end for

    for d : 16 .. 31
        color (d)
        locate (12, 38)
        put "MIND"
        delay (100)
    end for

    for e : 16 .. 31
        color (e)
        locate (12, 43)
        put "SPEAKING"
        delay (100)
    end for
   
    delay (2000)

    for f : 16 .. 31
        color (f)
        locate (13, 24)
        put "STAY"
        delay (100)
    end for

    for g : 16 .. 31
        color (g)
        locate (13, 29)
        put "IN"
        delay (100)
    end for

    for h : 16 .. 31
        color (h)
        locate (13, 32)
        put "SCHOOL"
        delay (100)
    end for

    for i : 16 .. 31
        color (i)
        locate (13, 39)
        put " !!!!"
        delay (100)
    end for
   
    delay (2000)
cls

end loop

Sponsor
Sponsor
Sponsor
sponsor
MiX-MaztA-M8riX




PostPosted: Fri Nov 19, 2004 2:12 pm   Post subject: (No subject)

nothing.. not even a whisper Crying or Very sad
AsianSensation




PostPosted: Fri Nov 19, 2004 4:32 pm   Post subject: (No subject)

Quit spamming your own posts. People will pay their respect when you have something good that can generate awe amongst us. Posting stuff that can be found in the Text Effect section doesn't qualify as awe inspiring.

I applaud your enthusiasm, but please stop with the spam.
Neo




PostPosted: Sat Nov 20, 2004 1:11 am   Post subject: (No subject)

Mines shorter and looks better! Twisted Evil

code:
setscreen ("position:center;center,nobuttonbar")
colorback (255)
cls
var x := 25
var y := 12
var word : string
loop
    for i : 1 .. 9
        for a : 16 .. 31
            color (a)
            locate (y, x)
            if i = 1 then
                x := 25
                y := 12
                put "THIS"
                word := "THIS"
            elsif i = 2 then
                put "IS"
                word := "IS"
            elsif i = 3 then
                put "YOUR"
                word := "YOUR"
            elsif i = 4 then
                put "MIND"
                word := "MIND"
            elsif i = 5 then
                put "SPEAKING"
                word := "SPEAKING"
            elsif i = 6 then
                x := 30
                y := 13
                put "STAY"
                word := "STAY"
            elsif i = 7 then
                put "IN"
                word := "IN"
            elsif i = 8 then
                put "SCHOOL"
                word := "SCHOOL"
            elsif i = 9 then
                put "!"
                word := "!"
            end if
            delay (100)
        end for
        x += length (word) + 1
    end for
    delay (2000)
    cls
end loop
zomg




PostPosted: Sat Nov 20, 2004 9:38 am   Post subject: (No subject)

its shorter...but how is it "better" they look the same to me
cool dude




PostPosted: Sat Nov 20, 2004 11:13 am   Post subject: (No subject)

i think he means that he could write the exact same code in less lines, which is always better than writing a long code
MihaiG




PostPosted: Sat Nov 20, 2004 1:39 pm   Post subject: (No subject)

the first oone is easier to edit considering you can change each word in one place... while the second version you need to change in two places...
longer=simple-short=complicated
Neo




PostPosted: Sat Nov 20, 2004 2:39 pm   Post subject: (No subject)

ELCOMANDANTE wrote:
the first oone is easier to edit considering you can change each word in one place... while the second version you need to change in two places...
longer=simple-short=complicated

Good point...but your point is no longer viable because I fixed it and reduced it by 8 lines and you dont have to worry about spacing the words out because the program does it for you! Twisted Evil I have no life..........

code:
setscreen ("position:center;center,nobuttonbar")
colorback (255)
cls
var x := 25
var y := 12
var word : string
loop
    for i : 1 .. 9
        for a : 16 .. 31
            color (a)
            locate (y, x)
            if i = 1 then
                x := 25
                y := 12
                word := "THIS"
            elsif i = 2 then
                word := "IS"
            elsif i = 3 then
                word := "YOUR"
            elsif i = 4 then
                word := "MIND"
            elsif i = 5 then
                word := "SPEAKING"
            elsif i = 6 then
                x := 30
                y := 13
                word := "STAY"
            elsif i = 7 then
                word := "IN"
            elsif i = 8 then
                word := "SCHOOL"
            elsif i = 9 then
                word := "!"
            end if
            put word
            delay (100)
        end for
        x += length (word) + 1
    end for
    delay (2000)
    cls
end loop
Sponsor
Sponsor
Sponsor
sponsor
AsianSensation




PostPosted: Sat Nov 20, 2004 3:15 pm   Post subject: (No subject)

This fading thing has been beaten to death already.

And as for the record, try string manipulation if you really want to decrease your line count.

code:
var word := "This Is Your Mind Speaking. Stay In School !!! "
var pos, col := 20
colorback (black)
cls
loop
    exit when word = ""
    for rep : 16 .. 31
        color (rep)
        locate (15, col)
        pos := index (word, " ")
        put word (1 .. pos)
        delay (100)
    end for
    col += length (word (1 .. pos))
    word := word (pos + 1 .. *)
end loop
Neo




PostPosted: Sat Nov 20, 2004 5:28 pm   Post subject: (No subject)

C'mon, must you make me look like a noob in front of these other noobs? Laughing Laughing Laughing Laughing
MiX-MaztA-M8riX




PostPosted: Sun Nov 21, 2004 12:38 pm   Post subject: (No subject)

I'm a noob too Surprised
Andy




PostPosted: Sun Nov 21, 2004 8:08 pm   Post subject: (No subject)

wtf, he said quit spamming -20 bits
MiX-MaztA-M8riX




PostPosted: Mon Nov 22, 2004 11:50 am   Post subject: (No subject)

trying to be friendly and talk to my fellow humans ... Crying or Very sad

you can take some more bits if you want, they do no good to me ... Crying or Very sad
Viper




PostPosted: Mon Nov 22, 2004 2:00 pm   Post subject: (No subject)

whats with all the hostility
Andy




PostPosted: Mon Nov 22, 2004 4:19 pm   Post subject: (No subject)

im guessing u didnt read the rules? *sigh*
go read them.. it says only post relevent stuff
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 18 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: