Animated TITLE
Animated TITLE
Can QBASIC writes a TITLE point by point, by some animation in order to see each letter drawing itself slowly on the screen? Is this existing somewhere?
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
-
- Veteran
- Posts: 1055
- Joined: Sun Jan 02, 2005 2:11 pm
- Location: At my computer
- Contact:
Using a PRINT style comand, and a hiddin control SUB I've done something of the sort, You need a good understanding of LEN(), MID$(), and logic(for putting it in a workable way)... also delays,.. hmm, here's a rough code..
there the example,. ,. hope it helps, just find a betta delay, or make a user setting on your game for speed control, or I seen one like that b4..
EDIT: I know you want a GFX one, but this should help a lil,
Code: Select all
DECLARE SUB TYPTEXT (y!, x!, text$)
DIM SHARED delay
delay = 45000 'ajust for correct speed
TYPTEXT 1, 1, "Hello!"
SUB TYPTEXT (y!, x!, text$)
cont = 0
DO
cont = cont + 1
ltr$ = MID$(text$, cont, 1)
phr$ = phr$ + ltr$
LOCATE y, x: PRINT phr$
IF cont = LEN(text$) THEN EXIT DO
FOR i = 1 TO delay: NEXT
LOOP
END SUB
EDIT: I know you want a GFX one, but this should help a lil,
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
(x.t.r.GRAPHICS)
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
Ya, I thought she ment pixels and not Letters...
Here's some psuedocode (if this is confusing please someone clear it up).
Umm, Just make the title in pixels, define an array, define it as a TYPE which has these elements in it: Idx, X, Y, Col, Status.
Intizalize all of the array.status = 0. Intizalize all of your array.x (x-coordinate of title pixel), and array.y (y-coordinate of the title pixel), and array.col (color of the title pixel) to where the pixels are in your title. Now array.Idx, intizalize this point as when you want it to activate the pixel. ie. array.Idx = 1 the pixel will show before array.Idx = 12.
Now have a DO LOOP with a delay, now put a FOR in it between LBOUND() and UBOUND() of your array. Now check IF Status = 0. If it is then check if array.Idx = the FOR LOOP index if it is then PSET (array.x, array.y), array.col. Also put array.status = 1. and that's it until all of the array.status = 1.
Well I hope that helps
Here's some psuedocode (if this is confusing please someone clear it up).
Umm, Just make the title in pixels, define an array, define it as a TYPE which has these elements in it: Idx, X, Y, Col, Status.
Intizalize all of the array.status = 0. Intizalize all of your array.x (x-coordinate of title pixel), and array.y (y-coordinate of the title pixel), and array.col (color of the title pixel) to where the pixels are in your title. Now array.Idx, intizalize this point as when you want it to activate the pixel. ie. array.Idx = 1 the pixel will show before array.Idx = 12.
Now have a DO LOOP with a delay, now put a FOR in it between LBOUND() and UBOUND() of your array. Now check IF Status = 0. If it is then check if array.Idx = the FOR LOOP index if it is then PSET (array.x, array.y), array.col. Also put array.status = 1. and that's it until all of the array.status = 1.
Well I hope that helps
"But...It was so beutifully done"
-
- Veteran
- Posts: 1055
- Joined: Sun Jan 02, 2005 2:11 pm
- Location: At my computer
- Contact:
Umm, I was getting to the basics of typing,... you could make a array like:
Hope me and Mitth are of help,. ,.you prob betta off with his code tho,.
Code: Select all
DIM color(80, 80)
'Cast pixal color info thru array in order you want
'x first b4 y in this case to have x read first
'Now read it across the screen,
'This one is primative, and what ever
'Mitth is on sounds more advance and
'is probaly more what you want....
FOR x = 1 TO 80
FOR y = 1 TO 80
PSET (x, y), color(x, y)
FOR i = 1 TO 1000: NEXT
NEXT
NEXT
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
(x.t.r.GRAPHICS)
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
- {Nathan}
- Veteran
- Posts: 1169
- Joined: Thu Aug 19, 2004 6:08 pm
- Location: The wetlands of central Ohio, USA
- Contact:
WILL THE FOR/NEXT DELAY MADNESS EVER END?!?Rattrapmax6 wrote: Umm, I was getting to the basics of typing,... you could make a array like:
Hope me and Mitth are of help,. ,.you prob betta off with his code tho,.Code: Select all
DIM color(80, 80) 'Cast pixal color info thru array in order you want 'x first b4 y in this case to have x read first 'Now read it across the screen, 'This one is primative, and what ever 'Mitth is on sounds more advance and 'is probaly more what you want.... FOR x = 1 TO 80 FOR y = 1 TO 80 PSET (x, y), color(x, y) FOR i = 1 TO 1000: NEXT NEXT NEXT
-
- Veteran
- Posts: 1055
- Joined: Sun Jan 02, 2005 2:11 pm
- Location: At my computer
- Contact:
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
No comment...Nathan1993 wrote:>Why am I such a loossseerrr?!
1. Why did you post that stuff
2. Why did you post stuff without reading other peoples posts
3. Show us a better way than FOR/NEXT delay Nate since you critizied it. Of course I'm not diagreeing with you.
"But...It was so beutifully done"
-
- Veteran
- Posts: 1055
- Joined: Sun Jan 02, 2005 2:11 pm
- Location: At my computer
- Contact:
Nate, um, loser??? your 11 right? my bro is 11 and all he knows of QB is PRINT and LINE(x,y)-(x,y),color, B or BF.... & you pulled that parser that had me scrathing my head for a minute tell I saw what it was doing... then I found the bug,... it was a alsome code and I learned alot from it. , n I'm 18... yes leaning from you a 11 year old, your not a loser..
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
(x.t.r.GRAPHICS)
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
WEll, I don't know about you but that didn't leave my head scratching....
It was good and I understood how/what he did from the moment he told us what it was suppose to do...
And I'm right in between you and him in age. BTW I wasn't coding in QB for 2 years yet. Still, an AI for QB?
Still I think six graders are hyper little energizer bunnies....lol
It was good and I understood how/what he did from the moment he told us what it was suppose to do...
And I'm right in between you and him in age. BTW I wasn't coding in QB for 2 years yet. Still, an AI for QB?
Still I think six graders are hyper little energizer bunnies....lol
"But...It was so beutifully done"
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
Ok, what if I have a RANDOMIZE TIMER?
No, no that wouldn't work...Cause its just waiting from whereever it is...
What if RANDOMIZE TIMER is in between those two statments....
Ha got you there....
No, No I still don't that wouldn't work either...crap...
RANDOMIZE TIMER doesn't make the TIMER random....instead TIMER is just the seed for the RND statement....
Ok you got me that will work. Heh....No more FOR/NEXT delays for me!
No, no that wouldn't work...Cause its just waiting from whereever it is...
What if RANDOMIZE TIMER is in between those two statments....
Ha got you there....
No, No I still don't that wouldn't work either...crap...
RANDOMIZE TIMER doesn't make the TIMER random....instead TIMER is just the seed for the RND statement....
Ok you got me that will work. Heh....No more FOR/NEXT delays for me!
"But...It was so beutifully done"
-
- Veteran
- Posts: 1055
- Joined: Sun Jan 02, 2005 2:11 pm
- Location: At my computer
- Contact:
Well, I never looked into MID$() LEN() and all varible reading statments, that was the first code evey I saw them used like that,. never mind.. I been playing with GFX n stuff for the most of my programing years.. , not parsers, its still a sweet cade and help me build alot of things like my HTML decrypter..
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
(x.t.r.GRAPHICS)
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
-
- Veteran
- Posts: 1055
- Joined: Sun Jan 02, 2005 2:11 pm
- Location: At my computer
- Contact:
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact:
- Mitth'raw'nuruodo
- Veteran
- Posts: 839
- Joined: Sat Jan 22, 2005 11:04 am
- Location: Eastern Coast of US
- Contact: