Hello User.
I am trying to program a Game, but my basic knowledge of BASIC is very limited - so I have some Problems with the Collision.
The Goal is to land the Plane (yes, I know, it is just a dot ) on the grey Area
If you land on the black area, you´ll crash.
The Collision should be in Line 360 ...
Does anyboy can help me with this?? And of course: If anybody have any Ideas to make the Game better: do it...
Greetings and thanx
Jens
Collision-Problems on my Game "Carrier-Landing"
Collision-Problems on my Game "Carrier-Landing"
eyerything will be okay in the end.
if it´s not okay, it´s not the end.
and: uıɐbɐ ʎɐqǝ uo pɹɐoqʎǝʞ ɐ ʎnq ɹǝʌǝ ɹǝʌǝu ןןıʍ ı
if it´s not okay, it´s not the end.
and: uıɐbɐ ʎɐqǝ uo pɹɐoqʎǝʞ ɐ ʎnq ɹǝʌǝ ɹǝʌǝu ןןıʍ ı
Re: Collision-Problems on my Game "Carrier-Landing"
First
line 330 must be
330 LET P=P+1
rest follows later
line 330 must be
330 LET P=P+1
rest follows later
Re: Collision-Problems on my Game "Carrier-Landing"
362 LET F=P-X-X-1
363 IF F>0 THEN IF F<7 THEN GOTO WIN
You may solve the error that occurs when you land
363 IF F>0 THEN IF F<7 THEN GOTO WIN
You may solve the error that occurs when you land
Re: Collision-Problems on my Game "Carrier-Landing"
Hi Jens,
There is a particularity with the PLOT command… it's like the PRINT AT command !
Using PRINT AT 10,10 set the DF_CC to the display memory offset.
PLOT set the DF_CC on the right display character, after the "dot" character.
Test the next character after the ploted dot. space or grey char.
The bottom character will be tested on :
120 IF PEEK( (PEEK 16399*256+PEEK 16398)+32)<>0 THEN STOP
Left char:
120 IF PEEK( (PEEK 16399*256+PEEK 16398)-2)<>0 THEN STOP
Up char tested on :
120 IF PEEK( (PEEK 16399*256+PEEK 16398)-34)<>0 THEN STOP
Note: Don't use PRINT AT between the PLOT and the IF test...
Have fun !
There is a particularity with the PLOT command… it's like the PRINT AT command !
Using PRINT AT 10,10 set the DF_CC to the display memory offset.
PLOT set the DF_CC on the right display character, after the "dot" character.
Code: Select all
10 FOR A=0 TO 18
20 PRINT TAB 17;"½"
30 NEXT A
100 FOR B=0 TO 64
110 PLOT B,10
120 IF PEEK (PEEK 16399*256+PEEK 16398)<>0 THEN STOP
130 NEXT B
The bottom character will be tested on :
120 IF PEEK( (PEEK 16399*256+PEEK 16398)+32)<>0 THEN STOP
Left char:
120 IF PEEK( (PEEK 16399*256+PEEK 16398)-2)<>0 THEN STOP
Up char tested on :
120 IF PEEK( (PEEK 16399*256+PEEK 16398)-34)<>0 THEN STOP
Note: Don't use PRINT AT between the PLOT and the IF test...
Have fun !
Xavier ...on the Facebook groupe : "Zx81 France"(fr)