Search found 148 matches

by Ralph
Fri Aug 01, 2008 1:59 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: PAINT command
Replies: 3
Views: 5625

I have never used PAINT before, so, you made me do some experimenting! For instance, after a while, I tried CHR$(65) + CHR$(66), then "A" + "B", and, finally, just "AB". Finally, I was using "aaagggooowww". Yes, all horizontal lines. Hmm... ...finally, I changed SCREEN 13 to SCREEN 12, and, I know i...
by Ralph
Thu Jul 31, 2008 2:02 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Understanding code
Replies: 8
Views: 7696

Re: UNDERSTANDING CODE

Thanks for your help. Never seen that before. I wander what language it is. Fortran? I also noted this one: D0 = FNH(D): A0= FNH(A/15) nowhere you can find DEF FNH Basic refuses this direct using of FNH and also refuses a variable For instance: H being an input, N previously calculated, the program...
by Ralph
Thu Jul 31, 2008 12:01 am
Forum: QBASIC and QB64 Questions & Answers
Topic: Understanding code
Replies: 8
Views: 7696

Absolutely! I just tried to respond to your post, as assuming too much will usually just produce more problems. for instance, before the ATN2() function, there might be code that tests for non-zero of the denominator, or the function might do that. Who knows?
by Ralph
Wed Jul 30, 2008 7:54 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Understanding code
Replies: 8
Views: 7696

Your A= ATN2(SIN(L1(0))*COS(E) , COS(L1(0))) MOD 360 seems to me to be the same as A= ATN(SIN(L1(0))*COS(E) / COS(L1(0))) 'radians, or A= 45/ATN(1) * ATN(SIN(L1(0))*COS(E) / COS(L1(0))) 'degrees where the "A" means "Angle" Your ATN2() seems to be a SUB, which simply does the division of the first pa...
by Ralph
Tue Jul 29, 2008 11:01 am
Forum: QBASIC and QB64 Questions & Answers
Topic: plz help me out
Replies: 9
Views: 11309

burger2227: It's sad to feel that some, or most, of the new and young posters here. The way I try tomake sure I'm addressing an honestly interested young person is to ask, first, what their goal might be. If I get that answered, I offer to help review thiere code, etc. That is, I try to base my help...
by Ralph
Tue Jul 29, 2008 8:38 am
Forum: QBASIC and QB64 Questions & Answers
Topic: Need help - Strange tile problem
Replies: 36
Views: 30496

Mentat, you already gave a very good reason NOT to use the GOTO. You are spoiling that by adding trivial reasons, as UNTIL can be substituted - and this is what I have used for years - with a WHILE/WEND. Just let your first, convincing reason why not to use GOTOs in public stand as THE reason, since...
by Ralph
Sun Jul 27, 2008 11:11 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need help - Strange tile problem
Replies: 36
Views: 30496

Well, burger, the difficult thing about not using GOTOs is that I have never used DO/LOOPs for all my normal, small jumps, only GOTOs. So, I never got a good grip on the DO/LOOP method. Now, with my understanding that it's best not to show the new, future programmers how to make spagetti code, I am ...
by Ralph
Sun Jul 27, 2008 2:25 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: plz help me out
Replies: 9
Views: 11309

Kuul, where are you? We expect you to post again, either thanking those who helped you or asking help on some part that you don;t undrstand or can't get to work. Please respond.
by Ralph
Sun Jul 27, 2008 2:19 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need help - Strange tile problem
Replies: 36
Views: 30496

Suber Mario: After considering Mentat's postings, I have accepted eliminating GOTOs, and present the code with the necessary DO/LOOPs substituted. '''July 28, 2008: Changed GOTOs to DO/LOOPs '''July 27, 2008: Changes or additions by Ralph are identified with three 'apostrophes, as in ''' DIM grass(1...
by Ralph
Sun Jul 27, 2008 1:59 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need help - Strange tile problem
Replies: 36
Views: 30496

Mentat: I accept your good explanation, namely, not to teach using GOTOs, to avoid the possibility of difficult-to-follow, spagetti code. It's a good reason for me to avoid it in public and, cetainly, in teaching. I use it, with care and for short jumps, because I learned programming (I consider mys...
by Ralph
Sun Jul 27, 2008 12:23 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need help - Strange tile problem
Replies: 36
Views: 30496

Mentat: I respect your personal opinio, but, I would like to see unbiased and logical PROOF that my use of GOTO is wrong, and that you are ustified in your emotional condemnation, and not just that that is your opinion or strong belief. People using the best and recommended programming methods and p...
by Ralph
Sat Jul 26, 2008 10:03 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need help - Strange tile problem
Replies: 36
Views: 30496

Super Mario: This code DOES work! I've also added the "don't allow scout to get in the water". Please STUDY what I've done, and ask questions. Otherwise, this will be my last post on this thread. '''Changes or additions by Ralph are identified with three apostrophes ''' DIM grass(10, 10), path(10, 1...
by Ralph
Sat Jul 26, 2008 2:37 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need help - Strange tile problem
Replies: 36
Views: 30496

Oops, double entry! I cleard this one out.
by Ralph
Sat Jul 26, 2008 2:36 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need help - Strange tile problem
Replies: 36
Views: 30496

Super Mario: OK, I agree. To check if the new location will be water, I would create a new array DIM tilenumber(30,15) I would then load it, using RESTORE tielnumber FOR Y = 1 TO 15 FOR X = 1 TO 30 READ clr tilenumber(X,y)=clr NEXT X NEXT Y Now, when I read what arrow has been hit, I can check for w...
by Ralph
Sat Jul 26, 2008 1:43 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need help - Strange tile problem
Replies: 36
Views: 30496

Super Mario: As far as the scout not being able to get to the water, one way would be to not allow any scoutx, scouty combination to land the scout in the water. Perhaps something like this: IF p$ = CHR$(0) + CHR$(77) AND scoutx = 29 AND scouty = 1 THEN scoutx = 29 That would work for the first row....
by Ralph
Fri Jul 25, 2008 9:34 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need help - Strange tile problem
Replies: 36
Views: 30496

Read my post, just above yours! Then, report back if you are still experiencing problems. Note that you simply have to GET the area where the scout is to be moved to, as it is ALREADY drawn! You do NOT have to RESTORE anything! Edited by Ralph: OK, I ran your code as is, and, it does work! Congratul...
by Ralph
Fri Jul 25, 2008 9:26 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need help - Strange tile problem
Replies: 36
Views: 30496

Now I understand! If you simply move a sprite, say the scout, you will either have the old scout AND the new one, or you will leave a hole where the old scout was. So, you should GET the area where first scout will be PUTed before it is PUTed, call it, say, OLDAREA. Then, when a move is detected, yo...
by Ralph
Fri Jul 25, 2008 5:55 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need help - Strange tile problem
Replies: 36
Views: 30496

To allow the next READ statement to read the first DATA statement in the tilenumber group, use RESTORE tilenumber. Is this what you mean?
by Ralph
Fri Jul 25, 2008 4:40 pm
Forum: QBASIC and QB64 Questions & Answers
Topic: Need help - Strange tile problem
Replies: 36
Views: 30496

First of all, Super Mario, congratulations on a well-ordered program! After running your program, I came to the conclusion that: The last READ statement is on he "tilenumber" DATA block, and that last READ reads the 3 at the bottom-right of the tilenumber DATA statements. So, in your DO/LOOP, when y...
by Ralph
Fri Jul 18, 2008 10:14 am
Forum: QBASIC and QB64 Questions & Answers
Topic: program help (if you have a free sec)
Replies: 8
Views: 10773

Yes, Dav, but Agent_Firestalker used the other one, Ask and thou shalt receive. And, it worked for the Agent! Ha, ha, couldn't pass that one up. :)