Michael2_3B wrote:
Do you have a delay on the planes, so that they have a certain speed? Obviously doing rand() or something like that would slow it down, so the way you would have to do it is keep adding to a variable a certain number of times, and every Nth number you move a character. That way, you don't hinder the getKey response time when a user presses a key. You can also reset the variable, if you need to. If you need more of an explanation, perhaps you can look at my avalanche plus code.
Then again, I don't exactly know if this is the case. Could we maybe see your code so far?
honestly though, I would recommend hybrid basic or something if you don't want to sacrifice speed too much.
I do have a delay set in. Every time the point moves one, I have a Txt( command that tells you how many people are left in London. Without this, the program becomes so fast that the point zooms across the screen, making it impossible to shoot.
Some code:
Code: ClrHome
Menu("AIM AND FIRE!","FIGHT",1,"RETREAT",2
Lbl 2
ClrHome
Output(1,1,"YOU HAVE ABANDONED ALL OF LONDON!!! NOOOOOOOO.....
Pause :ClrHome
Stop
End
Lbl 1
ClrDraw:0->B:0->C:0->A:randInt(~7,8)->D:~9->E:100->G:8173941->F:1->theta:1000->M:10->L1(1):0->L2(1)
Horizontal ~10
startTmr->H
Repeat A=45 or theta=0 or F=0 or G=0
checkTmr(H)->I
Text(1,1,"AMMO:",G," PEOPLE LEFT:",F,"
getKey->A
If A=22:Then
Pause
End
F-1->F
B-(A=24)+(A=26+(B<=~9)-(B>=9)->B
C-(A=34)+(A=25)-(C>=9)+(C<=~9)->C
If G=25:Then
startTmr->J
End
checkTmr(J)->K
If K=15:Then
randInt(~5,5)->L:Pt-On(L,M
10->M
End
If B=L and C=M:Then
100->G:10->L:10->M
End
Pt-On(L,M,14
Pt-On(E,D,11
Pt-Off(E-1,D
Pt-On(8,~9.5,2
Pt-On(B,C,3
Pt-Off(B+1,C,3
Pt-Off(B-1,C,3
Pt-Off(B,C+1,3
Pt-Off(B,C-1,3
If I>=1:Then
E+1->E:M-1->M:startTmr->H
End
If E=9:Then
theta-1->theta
randInt(~7,8)->D:~9->E
End
If A=21:Then
Line(8,~9.5,B,C,12,1
Line(8,~9.5,B,C,20
G-1->G
If B=E and C=D:Then
Pt-Off(E,D):randInt(~7,8)->D:~9->E
End
End
End:ClrHome
Screenshots: