cannot maintain variables in the subs

If you have questions about any aspect of QBasic programming, or would like to help fellow programmers solve their problems, check out this board!

Moderators: Pete, Mods

Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

:) I played Super Mario World,. its what started my programing dream,. :D After that, I just had to know how it was done,. would be years latter that I'd come across QB, :cry: , but I'm here, and I'm not that bad of a QBer... Am I?? :D
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

*So silent you can here the crickets cricket: Cricket....Cricket...Cricket....*

Just kidden lol :lol: .

Ya...Ummm...I said Wario not Mario.....heh...

hmm...oohhhh I love that theme song....
The periods represent the length in between...the words, the sond you make, you have to substitute for the pitch

Do.Do..Do..Do.Do..Do......Do

DO 'the loop kind

Dow....Dow....Dow.....Dow.Dow.Dow.Dow..Dow.Dow..Dow.Dow..Dow..Dow..Dow.Dow.Dow..

Dow....Dow....Dow.....Dow.Dow.Dow.Dow..Dow.Dow..Dow.Dow..Dow..Dow..Do.Do.Do...

Dow.Dow..Dow..Dow.Dow..Dow.Dow..Dow.Dow...Dow.Dow..Dow..Dow.Dow..Dow..Tig.Tig.Tig...

Dow.Dow..Dow..Dow.Dow..Dow.Dow..Dow.Dow......Do.Do..Do..Do.Do..Do......Do

LOOP

Ya I know that's not the full song but close enough....
"But...It was so beutifully done"
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

I could replicate that in PLAY, heh heh, :shock: , Wait, I need to solve the jamming prob with PLAY on a realtime game.. :( If I get time 2day, I'll work on that.. :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

The Jamming prob?

Ummm I'm not familiar....
"But...It was so beutifully done"
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

I made a Fire sfx and when I fired the laser, it paused for a second, using PLAY "MB" and all,. I'll sort it out I hope.. :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

Where did you put the MB code?

When you shot it?

If so try only 1 at the beging of the program to make all music MB that will probally work without that "Jamming"
"But...It was so beutifully done"
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

I did, :) , cept on every LOOP, maybe thats it, but it only jams when the note plays so... even on MB with a long music piece, it takes a few seconds for it to take effect... :) hmm, I don't think MS made the PLAY statment to perfect, hmm... :roll: :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

When do they ever? lol

Mabey you should make a peice of code that PLAYs two seconds BEFORE the person shoots....LOL :lol:

Or just delay the shooting 2 seconds if that's more pratical.... :D


Or better yet don't USE the PLAY statment and use the SOUND statement.....

Or better yet do your own music!!
"But...It was so beutifully done"
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

Not to make my comp sound any worse, but my sound is shot and I don't have a SB, so that leaves the My Own Music option out... :(

Sound, does that play in the backround or somthing, I thought it didn't.. I think if I step up tempo to 273, set to L64, and play just one note, it might work, but I havn't got round to it..

I actualy havn't got to much on SW really after my last bit, time, my time is shot... me and programming, I need to get in the flow with the code,. and well, that for me takes concentration and time to find that too... (ei: I'd set for the whole day doing parts to RoboRaider.. but now I can't even find this on weekends! :? )

And weekdays, my mind is shot from school, uggh.. :roll: nevermind, my probs getting the comp are uncountable,... :P :wink: so enough of that, I'll get to it sooner or later. :D ,. And I will finish what I started,.. its been advertived to big not to,. just look in the last QB Exspress in the Gallery.. :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

Well lets just add that to your list of bad computerness....

Ya well I prog when I can....

I made a lot more stuff in my game AND I'm making a secondary weapon for the mouse's left button :D .

Heh, other programers that I know call me crazy when it comes to programming, I climb big things with small rope, and I guess they're right....he he... :D
"But...It was so beutifully done"
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

Commenting on "big things little rope":
Heh heh, yeah, Nathan1993 asked (or sorta asked) were you were over at QBNews,. I said you hadn't regestered there yet, and I also threw in the you were a great QBer (soon FBer) who loves to type (warning other user of QBN when ever you do regester) :wink:

Heh heh, yeah, its crap, but it gets me where I want to go, can't be too harsh on it,. :wink: (PS:, its scared of thunder storms, and/or rain (other wise, wont work to well on a rainy day) why, I don't know,.) :lol: :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

*sacrcastiky*

Oh ya, thanks... :P
"But...It was so beutifully done"
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

:) Did I say something wrong? you gave me the Razz smily? :D
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

He, he ummm not really.... :D

Just that you warned QBnews already that I might, although I have no intention cause too crowded, go over there and to watch out for me....he he but that's it.... :D

Oh ya, but really, thank you for the good programmer part.... :wink:

Or was that a joke? lol :lol:

I hope you have your crap (using the word you named it) attached to a power surge protector....Cause the last think you need is for a lightning strike to take out your RoboRider....he he :D, not to mention your Dell monitor... :wink:
"But...It was so beutifully done"
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

:) Ah yeah, its on somesort of a surge protect I think.. those board plugs with all the pretty lights and reset swich,.. :wink:

Say, have you ever played RoboRaider yet?? :) , Not that its alsome, but it has loads of mazes that got me lost, heh heh.. :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

No...not yet
"But...It was so beutifully done"
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

:) Heh heh,... yeah, I'm going to redo it in FB, maybe 3D with SDL & OpenGL if I get the hang of 'em... which I mean too! :wink:
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

3D, eh?

Well Good Luck, that's a difficult concept to learn without knowing any trig, you know trig right? Might I recommend Rel's tuts? :wink:
"But...It was so beutifully done"
Rattrapmax6
Veteran
Posts: 1055
Joined: Sun Jan 02, 2005 2:11 pm
Location: At my computer
Contact:

Post by Rattrapmax6 »

:) heh heh, OpenGL seems to do all the trig for ya, tho learing trig wouldn't bother me, looking over the file using the lib, you put in the cords around a center point u specify, and you put in codes that tell it how to rotate... its real cool,.

you'll see when you get there, and you knowing(I'm going to learn!!) Rel's 3D stuff... TYPE Point3D n stuff.. he did that in a OpenGL demo, effects are sweet fast and smooth... you could redo you secret over in it and well, the secret look more real on the screen,.. tho finish it in QB, that be cool.. :wink: :D
-Kevin (aka:Rattra)
(x.t.r.GRAPHICS)
User avatar
Mitth'raw'nuruodo
Veteran
Posts: 839
Joined: Sat Jan 22, 2005 11:04 am
Location: Eastern Coast of US
Contact:

Post by Mitth'raw'nuruodo »

Ok, but its as smooth as any 3D graphics I seen, AND IT PURE QB! It also goes fast, but that might have something to do with my 3.0Ghz...He, he. :wink:

I can make it go faster though, just replace my bubblesort, increase degree of rotation per LOOP, and there I go!

But this is a REALLY smooth engine and Rel did a great tut, but the goodness of it slowly slipped away by the vector issue....It got confusing :? But still I managed after long hours to do it! :D

Of course most of my structers are identical to his tut, but I did learn it and made some new changes in it, and modified it to my needs, and am giving Rel credit for his tuts. BTW I didn't just copy and paste I understood as I RETYPED everything, why it was there, chose to change or to take out as I needed as well. But isn't that what a good tut is suppose to do?

But it's still mine. :wink:

Oh, yeah here's my new rasing eyebrow thing: ?-\
"But...It was so beutifully done"
Post Reply