|
Post by David on Jan 8, 2003 0:36:54 GMT -5
I was coding a bit tonight and i ran across a problem, i have a Fairly simple program that displays a pic(of a gun) and then displays points that make up a bullet here is kinda what the code is except it's long (just with more points that make up the bullet)(Note:My window is 23.5 and 15.5 so that it is .5 for each little dot)
Clr Home Clr Draw Recall Pic 5 8->A:8->B:8.5->C8->D Lbl A Pt-On(A,B Pt-On(C,D Lbl B A>A C>C Goto A
Now...everything works perfectly except that the bullet copys it self as oopssed to cutting, so in other words the orinal stays there so i have a line of bullets, How do i make it have 1 at a time...Also if i want to make it move faster but still have it show up every 2 how would i do that? I was playing other games such as galaxian it doesnt not seem as if a regular A+1->A was used because it responds 10x faster and if you hold it down it keeps going with out a stall? How do you do this? There is no Getkey Involved at all(and for now i dont want any) Since it's not text i couldnt put a space before it..Any help would be great. I hope this makes sense! Thanks again
|
|
|
Post by Chris on Jan 9, 2003 9:18:52 GMT -5
*cough* user *cough* galaxian is written in asm, not basic
first off, clrhome clears the home screen, not the graph, point and pixel statements are done on the graph, so you can get rid of that
second, you can get rid of the 8->B and 8->D and just put 8 in the point statments since variables are used when a value is changing, this'll make it run faster
third, labels cause MAJOR program slowdown, try replacing it with a a for or a repeat statement
fourth, what is with the A>A and C>C? all that does is it tests to see if A is greater than A, then if it's true stores a 1 in Ans, and if it's false (which will always happen because A can never be greater than itself) it'll put a 0 in Ans, the same goes for C>C
fifth, how do you plan on maknig your program stop? the way it's set up now it'll be stuck in an infinate loop
and sixth, try this code (this is considering that you have your window range set to -15,15,-10,10)
ClrDraw RecallPic 5 For(A,8,15 Pt-On(A,8 Pt-Off(A-.5,8 End
it should give you what you're looking for with a decent speed
|
|
|
Post by Kelfaup on Sept 25, 2019 5:48:49 GMT -5
Amoxicillin Used In Abortions Canadian Pharmacy Largo Fl <a href=http://bpdrugs.com>cialis canada</a> Buy Doxycycline 100mg Propecia Carlo Libido Venlafaxine 150mg India
|
|