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

Username:   Password: 
 RegisterRegister   
 [source code] Text Effects
Index -> Programming, Turing -> Turing Submissions
Goto page Previous  1, 2, 3, 4, 5
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Catalyst




PostPosted: Sun Nov 02, 2003 8:58 pm   Post subject: (No subject)

using the RGB functions can make whatdotcolor not function correctly, so beware
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Sun Nov 02, 2003 10:58 pm   Post subject: (No subject)

I'm sure it would... Since whatdotcolor returns an integer representing color on 255 pallet. RGB ofcourse has 255^3 colors, which is much much more Laughing

If you really need to, you can keep a vertual buffer in an array, so instead of drawing to screen, you draw to your buffer, which later draws to screen (just like View.Update works). The thing is - you'd have to rewrite all the Draw. module and you'll have major speed issues if your buffer gets too large.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
santabruzer




PostPosted: Sun Nov 16, 2003 8:59 pm   Post subject: (No subject)

Holy crap i should pay attention to computer science classes.... this stuff is amazing.. dudes... the font thingies....
Tony




PostPosted: Sun Nov 16, 2003 9:11 pm   Post subject: (No subject)

yeah... well... you aren't going to learn any special effects in CS classes Confused This is all self-taught. Though you should pay attention to learn new syntax and understand how programing works, then you can imagine an effect you want to achieve and figure out a way of doing so.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
santabruzer




PostPosted: Mon Nov 17, 2003 4:53 pm   Post subject: (No subject)

I was told by the teacher i'm a self learner.. now how smart is the teacher? oh well.. i'm in the very first course... and i dunnu.. it's boring like hell.. problem solving... oh well...
Tony




PostPosted: Mon Nov 17, 2003 6:28 pm   Post subject: (No subject)

exactly... thats why you got to find your own challange and figure out your way to achieve that. Variaous text effects are fun to play with Laughing
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Tendulkar




PostPosted: Tue Nov 25, 2003 10:24 pm   Post subject: Re: [source code] Text Effects

tony wrote:
I've seen a lot of people trying to make RPG games in turing and some turned out quite nice actually. As Dan about QFTB, he has it posted somewhere.

Most of typical RPGs have plots (atleast they should) and chats with other NPCs. Basically you'll end up displaying a lot of text. In this post I will be posting source codes for different text effects that you can use throughout your games and other applications.




% HERE IS YOUR CODE:
var fullscreen := Window.Open ("fullscreen")
drawfillbox (0, 0, maxx, maxy, black)
var word : string
var x, c : int
colour (brightred)
colourback (black)
put "Enter The Word: " ..
colour (brightgreen)
get word : *
x := 50
var font : int := Font.New ("Lucida Handwriting:" + intstr (30))
var xwidth : int := Font.Width (word, font)
% THE NAME AT THE BOTTOM
process name2
loop
for i : 1 .. 250
Font.Draw (word, maxx div 2 - (Font.Width (word, font) div 2), 10, font, i)
delay (80)
end for
end loop
end name2
fork name2
% THE NAME IN THE MIDDLE
x := maxx div 2 - (Font.Width (word, font) div 2)
for i : 1 .. length (word)
if i = 7 then
c := 29
else
c := i
end if
Font.Draw (word (i), x, maxy div 2 - 10, font, c)
x := x + 30
delay (100)
end for

% THE NAME IN THE MIDDLE
process name
loop
x := maxx div 2 - (Font.Width (word, font) div 2)
for i : 1 .. length (word)
randint (c, 1, 35)
if c = 7 then
c := 45
else
end if
Font.Draw (word (i), x, maxy div 2 - 10, font, c)
x := x + 30
delay (50)
end for
end loop
end name
fork name


% THE TOP NAME WHICH IS MOVING
drawfillbox (0, 0, maxx, maxy, black)
loop
for i : 1 .. maxx + Font.Width (word, font) - 100
if i > 250 then
randint (c, 0, 15)
else
end if
Font.Draw (word, i, maxy - 50, font, c)
delay (15)
Font.Draw (word, i, maxy - 50, font, black)
end for
end loop
Tendulkar




PostPosted: Tue Nov 25, 2003 11:31 pm   Post subject: Re: [source code] Text Effects

HEY HERE IS THE CODE FOR TEXT EFFECTS::


Check this out



Cool Fonts4.t
 Description:

Download
 Filename:  Cool Fonts4.t
 Filesize:  1.62 KB
 Downloaded:  137 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Tendulkar




PostPosted: Tue Nov 25, 2003 11:32 pm   Post subject: Re: [source code] Text Effects

Hey I also have one other program for text effects:


Check it out, too.



Cool Fonts5.t
 Description:

Download
 Filename:  Cool Fonts5.t
 Filesize:  874 Bytes
 Downloaded:  144 Time(s)

nis




PostPosted: Wed Nov 26, 2003 11:48 pm   Post subject: Glowing Text

Just a very very simple program i made

code:

setscreen ("offscreenonly,graphics:800;600,nobuttonbar")

var font1 : int := Font.New ("Comic Sans:200:Bold")
var x, y : int
x := 100
y := 200

drawfillbox (0, 0, maxx, maxy, 7)
loop
    for i : 19 .. 31
        Font.Draw ("N!$", 99, 200, font1, i)
        Font.Draw ("N!$", 100, 201, font1, i)
        Font.Draw ("N!$", 100, 200, font1, 7)
        View.Update
        delay (25)
    end for
    for decreasing i : 31 .. 19
        Font.Draw ("N!$", 99, 200, font1, i)
        Font.Draw ("N!$", 100, 201, font1, i)
        Font.Draw ("N!$", 100, 200, font1, 7)
        View.Update
        delay (25)
    end for
end loop
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 5 of 5  [ 70 Posts ]
Goto page Previous  1, 2, 3, 4, 5
Jump to:   


Style:  
Search: