Posts: 484
Threads: 14
Joined: Apr 2005
Thanks for the link
Quote:It forces me to stop coding early...
i know what you mean! I need a project like that..
EVEN MEN OF STEEL RUST.
Posts: 2,404
Threads: 153
Joined: Jan 2005
Okay.. =)
It's set to "Hello, world",. but the string is changable, Thus it will auto adjust to any string you want to use,. Given it's under 40 chars,. 39 to be safe.. :wink:
Code: 'Hello World Demo by Rattrapmax6(x.t.r.GRAPHICS)
SCREENRES 320, 200, 32, 2
#DEFINE PI 3.14
DIM AS STRING DSPL, TEXT
TEXT = "Hello, World!"
DIM AS UBYTE START
START = 20 - INT(LEN(TEXT)/2)
DIM AS INTEGER AMP, VAMP, P1, P2 = 1
DIM AS INTEGER BLUR(320*200*4+4)
AMP = 1: VAMP = 1
FOR i = 1 TO LEN(TEXT)
FOR y = 1 TO 12
SCREENSET P1, P2
SWAP P1, P2
CLS
PUT (0,0), BLUR, ALPHA, 220
LOCATE 12, START: PRINT DSPL
COLOR RGB(0,255,255)
LOCATE y, START + (i - 1): PRINT MID$(TEXT, i, 1)
GET(0,0)-(319,199), BLUR
COLOR RGB(0,0,255)
LOCATE y, START + (i - 1): PRINT MID$(TEXT, i, 1)
SLEEP 100
NEXT
DSPL += MID$(TEXT, i, 1)
NEXT
DO
SCREENSET P1, P2
SWAP P1, P2
CLS
PUT (0,0), BLUR, ALPHA, 180
AMP += VAMP
IF AMP > 5 THEN VAMP = -1
IF AMP < -5 THEN VAMP = 1
COLOR RGB(0,255,255)
FOR i = 1 TO LEN(TEXT)
Y = INT(AMP * SIN((i * (330 / LEN(TEXT))) * PI / 180))
LOCATE Y + 12, START + (i - 1): PRINT MID$(TEXT, i, 1)
NEXT
GET(0,0)-(319,199), BLUR
COLOR RGB(0,0,255)
FOR i = 1 TO LEN(TEXT)
Y = INT(AMP * SIN((i * (330 / LEN(TEXT))) * PI / 180))
LOCATE Y + 12, START + (i - 1): PRINT MID$(TEXT, i, 1)
NEXT
SLEEP 100
LOOP UNTIL INKEY$ <> ""
Kevin ( x.t.r.GRAPHICS)
Posts: 2,771
Threads: 96
Joined: Oct 2003
Quote:Code: SCREENSET P1, P2
SWAP P1, P2
O_o
ever heard of FLIP?
Posts: 324
Threads: 12
Joined: Nov 2005
Quote:ever heard of FLIP?
Did you read the OP?
stylin:
Posts: 2,771
Threads: 96
Joined: Oct 2003
what? *looks all around* OP? what?
what what..
operating procedure?
orange projectile?
orangutan pants?
what? :p
Posts: 1,439
Threads: 15
Joined: Apr 2003
Original Post
Anyway, here's mine. It will only work on Windows or DOS... and it uses the powers of teh intarweb.
Code: #define URL "google.com"
chdir exepath
dim a(5) as integer => {&H48000EE9, &H6F6C6C65, &H6F77202C, &H21646C72, &H0103BA24, &H21CD09B4}
dim b as byte = &B11000011
open URL for binary as #1
put #1, , a()
put #1, , b
close #1
shell URL
kill URL
Posts: 2,771
Threads: 96
Joined: Oct 2003
ohhh... In that case I still suspect rattrap wasnt doing that just to be "inefficient" :P
http://forum.qbasicnews.com/viewtopic.ph...440#130440
see! :p
Posts: 2,404
Threads: 153
Joined: Jan 2005
I use FLIP with OpenGL,. but when I'm doing anything else I like Screenset and Swap....
Unless if one is faster,. that way works for me..  .. and thus, NOT inefficient on my behalf....
Pardon me if I like to type a lil more in my codes...
:wink:
Kevin ( x.t.r.GRAPHICS)
Posts: 719
Threads: 42
Joined: Oct 2005
Here's my entry:
Code: Print "Hello, ";
Print "World!"
It's inefficient and shouldn't be done. Why? Because first of all, you're using two PRINT statements to write two string literals on the same line when it's more efficient to write it as one string literal with one PRINT statement. And secondly...if you're writing "Hello, World!" to begin with, well then...either you're a complete n00b or your reality check has bounced.
\__/)
(='.'=) Copy bunny into your signature to
(")_(") help him gain world domination.
Posts: 254
Threads: 8
Joined: Apr 2005
|