[source code] Text Effects
Author |
Message |
Catalyst
|
Posted: 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
|
|
|
Tony
|
Posted: 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
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.
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
santabruzer
|
Posted: 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
|
Posted: 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 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.
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
santabruzer
|
Posted: 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
|
Posted: 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
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
|
Tendulkar
|
Posted: 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
|
Posted: 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
Description: |
|
Download |
Filename: |
Cool Fonts4.t |
Filesize: |
1.62 KB |
Downloaded: |
137 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Tendulkar
|
Posted: 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.
Description: |
|
Download |
Filename: |
Cool Fonts5.t |
Filesize: |
874 Bytes |
Downloaded: |
144 Time(s) |
|
|
|
|
|
|
nis
|
Posted: 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
|
|
|
|
|
|
|
|
|