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

Username:   Password: 
 RegisterRegister   
 Need some help with animated letters in disctinct order
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
cubera




PostPosted: Sun Jan 08, 2012 6:32 pm   Post subject: Need some help with animated letters in disctinct order

What is it you are trying to achieve?
Having an animated title heading before the game starts for my class project. Something similar to a turing game i found called breakout by kensou.
I will provide his code.

What is the problem you are having?
Im still new to this so im not quite sure how. I found one amazing example in another turing code game called breakout by some guy named kensou. *ill provide the example below
His way seems rather complex and is alot more advanced then what i can do with my ability. So I'm not sure how to individually create all the letters similar to him. The letters i need are
"J, n, y, W" using his method (example below). If someone could help me create these letters, i would be truly grateful or at least help me get the following two commands underneath work together.


Describe what you have tried to solve this problem
I used one code to get the similar affect but the size of the font is ridiculous small. So then i used a font.size code but im not sure how to put them together.

Post any relevant code (You may choose to attach the file instead of posting the code if it is too long)
% This code gives the font size
var fontID : int
fontID := Font.New ("Palatino:72:bold")
Font.Draw ("Example" + chr (209), 20, 100, fontID, black)


%This command line lets the words appear in a nice fashion similar to Kensou's example but the text is too small..
const test : string (6) := "example test"
for c : 1 .. length (test)
locate (10, maxcol div 2 - length (test) + c + 4)
put test (c) ..
delay (100)
end for

Turing:

%the type of effect i want, its from a game by Kensou called Breakout
var box_l, box_h, box_x, box_y : int

    box_x := maxx div 4
    box_y := maxy - 50
    box_l := maxx div 2
    box_h := 80

%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DRAW "B" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    drawfillbox (box_x + 10, box_y - 10, box_x + 15, box_y - box_h + 10,
        1)
    drawfillarc (box_x + 15, box_y - box_h div 3, 20, 15, -90, 90, 1)
    drawfillarc (box_x + 17, box_y - box_h div 3, 10, 10, -90, 90, 0)
    drawfillarc (box_x + 15, box_y - box_h div 3 * 2 - 2, 20, 15, -90,
        90,
        1)
    drawfillarc (box_x + 17, box_y - box_h div 3 * 2 - 2, 10, 10, -90,
        90,
        0)
    delay (100)
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%% DRAW "R" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    drawline (box_x + 45, box_y - 40, box_x + 60, box_y - box_h + 10, 1)
    drawline (box_x + 50, box_y - 40, box_x + 65, box_y - box_h + 10, 1)
    drawline (box_x + 60, box_y - box_h + 10, box_x + 65, box_y - box_h +
        10, 1)
    drawline (box_x + 45, box_y - 40, box_x + 50, box_y - 40, 1)
    drawfill (box_x + 63, box_y - box_h + 12, 1, 1)

    drawfillbox (box_x + 45, box_y - 10, box_x + 50, box_y - box_h + 10,
        1)
    drawfillarc (box_x + 47, box_y - box_h div 3, 20, 15, -90, 90, 1)
    drawfillarc (box_x + 49, box_y - box_h div 3, 10, 10, -90, 90, 0)
    delay (100)
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%% DRAW "E" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    drawfillbox (box_x + 75, box_y - 10, box_x + 80, box_y - box_h + 10,
        1)
    drawfillbox (box_x + 75, box_y - 10, box_x + 95, box_y - 15, 1)
    drawfillbox (box_x + 75, box_y - 35, box_x + 90, box_y - 40, 1)
    drawfillbox (box_x + 75, box_y - box_h + 15, box_x + 95, box_y -
        box_h
        + 10, 1)
    delay (100)
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%% DRAW "A" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    drawline (box_x + 110, box_y - 10, box_x + 100, box_y - box_h + 10,
        1)
    drawline (box_x + 115, box_y - 10, box_x + 105, box_y - box_h + 10,
        1)
    drawline (box_x + 110, box_y - 10, box_x + 115, box_y - 10, 1)
    drawline (box_x + 100, box_y - box_h + 10, box_x + 105, box_y -
        box_h +
        10, 1)
    drawfill (box_x + 105, box_y - box_h + 20, 1, 1)

    drawline (box_x + 112, box_y - 10, box_x + 122, box_y - box_h + 10,
        1)
    drawline (box_x + 118, box_y - 10, box_x + 128, box_y - box_h + 10,
        1)
    drawline (box_x + 112, box_y - 10, box_x + 117, box_y - 10, 1)
    drawline (box_x + 122, box_y - box_h + 10, box_x + 128, box_y -
        box_h +
        10, 1)
    drawfill (box_x + 125, box_y - box_h + 20, 1, 1)

    drawfillbox (box_x + 110, box_y - 40, box_x + 120, box_y - 45, 1)
    delay (100)
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%% DRAW "K" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    drawfillbox (box_x + 135, box_y - 10, box_x + 140, box_y - box_h +
        10, 1)

    drawline (box_x + 135, box_y - 40, box_x + 155, box_y - box_h + 10,
        1)
    drawline (box_x + 140, box_y - 40, box_x + 160, box_y - box_h + 10,
        1)
    drawline (box_x + 135, box_y - 40, box_x + 140, box_y - 40, 1)
    drawline (box_x + 155, box_y - box_h + 10, box_x + 160, box_y -
        box_h +
        10, 1)
    drawfill (box_x + 150, box_y - 60, 1, 1)

    drawline (box_x + 135, box_y - 40, box_x + 155, box_y - 10, 1)
    drawline (box_x + 140, box_y - 40, box_x + 160, box_y - 10, 1)
    drawline (box_x + 135, box_y - 40, box_x + 140, box_y - 40, 1)
    drawline (box_x + 155, box_y - 10, box_x + 160, box_y - 10, 1)
    drawfill (box_x + 150, box_y - 20, 1, 1)
    delay (100)
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%% DRAW "O" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    drawfilloval (box_x + 180, box_y - box_h div 2, 15, 30, 1)
    drawfilloval (box_x + 180, box_y - box_h div 2, 9, 25, 0)
    delay (100)
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%% DRAW "U" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    drawfillarc (box_x + 220, box_y - 10, 15, 60, 180, 0, 1)
    drawfillarc (box_x + 220, box_y - 10, 10, 55, 180, 0, 0)
    delay (100)
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%% DRAW "T" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    drawfillbox (box_x + 245, box_y - 10, box_x + 270, box_y - 15, 1)
    drawfillbox (box_x + 255, box_y - 10, box_x + 260, box_y - box_h +
        10, 1)
    delay (100)
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%% DRAW "C" %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    drawfilloval (box_x + 290, box_y - 30, 15, 15, 1)
    drawfilloval (box_x + 290, box_y - 30, 12, 12, 0)

    drawfillarc (box_x + 290, box_y - 30, 8, 8, 30, 330, 4)
    drawfilloval (box_x + 290, box_y - 30, 5, 5, 0)
    delay (100)




Please specify what version of Turing you are using
4.1
Sponsor
Sponsor
Sponsor
sponsor
Dreadnought




PostPosted: Sun Jan 08, 2012 6:49 pm   Post subject: Re: Need some help with animated letters in disctinct order

cubera wrote:
Turing:
% This code gives the font size
var fontID : int
fontID := Font.New ("Palatino:72:bold")
Font.Draw ("Example" + chr (209), 20, 100, fontID, black)

Why not just Font.Draw each letter individually. (or Font.Draw the first letter, then the first 2, the first 3, etc.)
cubera




PostPosted: Sun Jan 08, 2012 7:20 pm   Post subject: Re: Need some help with animated letters in disctinct order

Dreadnought @ Sun Jan 08, 2012 6:49 pm wrote:
cubera wrote:
Turing:
% This code gives the font size
var fontID : int
fontID := Font.New ("Palatino:72:bold")
Font.Draw ("Example" + chr (209), 20, 100, fontID, black)

Why not just Font.Draw each letter individually. (or Font.Draw the first letter, then the first 2, the first 3, etc.)


oh my god dude... thx alot, i feel retarded now for not thinking about that...

once again thx
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 3 Posts ]
Jump to:   


Style:  
Search: