Jump to content

Retrospect

Member
  • Posts

    28
  • Joined

  • Last visited

  • Days Won

    1

Retrospect last won the day on February 14 2023

Retrospect had the most liked content!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Retrospect's Achievements

  1. really sorry about that Omega. I posted yet another bug fix to you in your messages. suppose i should put it in here too. then i'm gonna go sit in the toilet and cry. AVARIS-G.BIN It won't make any difference for the video unless you spot any roaming enemy missiles that shouldn't be there, this version fixes that issue, is all. I'm fed up. Had enough. Taking a break. I've done the one thing that causes my anxiety to spike and that's releasing a game, thinking it's done, and then finding bug after bug that weren't apparent the first time i playtested. 😞
  2. AVR2-G.BIN Avaris 2 bug fix. Fixed bug with crashing to ground sending player back to 1st wave. Reason this bug existed is because Retrospect is an imbecile. New font added Warning system now sounds different if it's warning about saucers, because they're evil, aren't they? Ground scrolls faster, because it can. Starfield had slight jump issue, not anymore it doesn't. Game starts in attract mode. Player can press fire to start, or crash with ground to start.
  3. hey you made a PDF .. thanks omega 🙂
  4. Yes this is the finished product. I did a total re-write of the code but kept most of the graphics. Since I had the graphics and knew roughly what I was doing the re-write took 24 hours. The name "Avaris II" was the official name anyhow until I thought of Anubis , it is the follow-on to Avaris. But then Alan (OLD CS1) started with his Anagrams and came up with BI ANUS so I changed it back to Avaris II ! 🙂 I'd love you to do a video of it and thankyou. Your videos are always of a good quality.
  5. I've no idea how you managed to retrieve that but hey thanks. I found I couldn't upload ZIP files here so I thought it was a lost cause. 🙂
  6. AVAR2-G.BIN << Solid State Software cartridge image Have fun guys n gals ! 😉
  7. thankyou Omega, brilliant video 🙂 Nice to see my games being enjoyed
  8. We now have enemy - player missile collisions as well as player - enemy missile collisions. For now, when player "dies" it just jumps back to main loop after player explosion. In near future, "lives" , "score" , and "best score" will be displayed and the variables needed for those will be introduced and used. ! CODE TO BE PASTED INTO EXTENDED BASIC AND COMPILED USING THE WILHELM COMPILER ! OTHERWISE IT'LL BE RAAAAAATHER SLOOOOOOW ! E$ ARRAY FOR ENEMY ANIMATION 1 DIM E$(11)::FOR Q=1 TO 11::READ E$(Q)::NEXT Q 2 DATA 00000003075FBFFF030000000000000000000080C0FCFEFE8000000000000000,00000003076FDFFF030000000000000000000080C0FCFEFE8000000000000000 3 DATA 000000030777EFFF030000000000000000000080C0FCFEFE8000000000000000,00000003057DFBFF030000000000000000000080C0FCFEFE8000000000000000 4 DATA 00000003067EFEFF030000000000000000000080C0FCFEFE8000000000000000,00000003077FFFFF030000000000000000000080407CBEFE8000000000000000 5 DATA 00000003077FFFFF030000000000000000000080C0BCDEFE8000000000000000,00000003077FFFFF030000000000000000000080C0DCEEFE8000000000000000 6 DATA 00000003077FFFFF030000000000000000000080C0ECF6FE8000000000000000,00000003077FFFFF030000000000000000000080C0F4FAFE8000000000000000 7 DATA 00000003077FFFFF030000000000000000000080C0FCFEFE8000000000000000 ! * GRAPHICS DEFS ! 36 PLAYER SHIP ! 40 PLAYER MISSILE ! 96 ENEMY (USES THE E$(XX) ARRAY FOR ANIMATION) ! 100 ENEMY MISSILE ! 104 ENEMY EXPLOSION ! 108 PLAYER EXPLOSION BIT 10 CALL CHAR(36,"00000006061E7FFFFFFFFF0000000000000000C0C0F0FCFEFEFEFE0000000000") 20 CALL CHAR(40,"0103030101010000000000000000000000808000000000000000000000000000") 25 CALL CHAR(96,E$(1)) 30 CALL CHAR(100,"0000000000000000000103010301010000000000000000000080008000800000") 35 CALL CHAR(104,"0000040210080130010810020400000000809020040840864008042090800000") 40 CALL CHAR(108,"00000000000001010000000000000000000000000080C0C08000000000000000") ! * ENEMY ALIVE ARRAY, 4 ELEMENTS, FOR FOUR ENEMIES 50 DIM EA(4) ! * SCREEN CLEAR, BLACK SCREEN, MAGNIFYx3 SPRITES 100 CALL CLEAR :: CALL SCREEN(2)::CALL MAGNIFY(3) ! * GET THE SPRITES ON SCREEN, PLAYING NOT FIRING (PF=0), NO RECOIL (RC=0), ENEMY NOT F‏IRING (EF=0) ! NOTE: EVEN NULL VARIABLES HAVE TO BE DECLARED FOR THE COMPILER OTHERWISE IT'LL CRASH. ! ET=0 , THIS IS THE ENEMY TIMER FOR ANIMATION. ETM=4 IS MAXIMUM DELAY VALUE, IT TAKES INTO ACCOUNT IF PLAYER IS FIRING AND ALTERS ACCORDINGLY ! WAIT=1 , MEANS WE ARE WAITING FOR AN ENEMY, SHORT DELAY BEFORE THEY APPEAR WITH "WT" INCREMENTING UP TO 100 THEN WAIT=0 AND ENEMIES ON SCREEN ! EP DECLARED AS NILL, THIS IS FOR ANIMATING ENEMY PATTERNS ! XP1 DECLARED AS NILL, THIS IS FOR ENEMY EXPLODING ! XP1T IS USED FOR A TIMER FOR XP WHEN IT IS "ON" ! XP2 DECLARED AS NILL, THIS IS FOR PLAYER EXPLOSION. IF XP2 IS 1, THEN PLAYER CANNOT ACCESS JOYSTICK OR FIRE KEY 1000 CALL SPRITE(#1,36,7,160,120,#2,40,16,160,120)::PF=0::PFS=0::RC=0::EF=0::ET=0::ETM=4::WAIT=1::WT=0::EP=0::XP1=0::XP2=0 ! * MAIN LOOP 1100 GOSUB 4100 ! JOY 1105 GOSUB 4200 ! FIRE PRESSED? 1110 GOSUB 4300 ! INCREMENT PLAYER MISSILE? 1115 GOSUB 4400 ! PLAYER FIRING SOUND? 1120 GOSUB 4500 ! RECOIL? 1125 GOSUB 4600 ! WAITING FOR ENEMY? 1130 GOSUB 4700 ! ANIMATE ENEMY? 1135 GOSUB 4800 ! CAN ENEMY FIRE? 1140 GOSUB 4900 ! TRACK ENEMY MISSILE? 1145 GOSUB 5000 ! ENEMY EXPLODING? 1150 GOSUB 5100 ! PLAYER EXPLODING? 1199 GOTO 1100 ! * JOY ! ! CALL JOYSTICK AND FIRE KEY. IF RECOIL IS *NOT* ACTIVE THEN IT WILL MOVE THE SHIP ACCORDINGLY IN AUTOMOTION ! IF YOU'RE FIRING, IT MOVES *ONLY* THE SHIP OTHERWISE BOTH SHIP AND MISSILE MOVE. ! IF XP2 IS SET TO 1 THEN PLAYER CANNOT ACCESS JOYSTICK OR FIRE KEY 4100 IF XP2=1 THEN 4199 4101 CALL JOYST(1,JY,JX) :: CALL KEY(1,K,ST) :: IF RC=0 THEN 4105 ELSE 4199 4105 IF PF=0 THEN 4110 ELSE 4120 4110 CALL MOTION(#1,0,JY*6,#2,0,JY*6)::GOTO 4199 4120 CALL MOTION(#1,0,JY*6) 4199 RETURN ! * FIRE PRESSED? ! ! SCAN K FOR VALUE 18 WHICH IS THE FIRE KEY ON JOYSTICK (Q OR TAB ON EMULATORS) ! GETS POSITION OF SHIP AND SETS RECOIL, RECOIL TICKER, RECOIL TIMER "X", PLAYER FIRING SOUND, PLAYER FIRING SOUND TICKER ! WHEN PLAYER MISSILE IS ACTIVE, ETM (MAX DELAY FOR ENEMY ANIMATIONS) IS SET TO HALF IT'S NORMAL VALUE. 4200 IF PF=1 THEN 4299 ELSE IF RC=1 THEN 4299 4205 IF K=18 THEN 4210 ELSE 4299 4210 CALL POSITION(#2,F1,F2)::PF=1::RC=1::RCT=0::RCX=0::PFS=1::PFST=0::ETM=2 4299 RETURN ! * INCREMENT PLAYER MISSILE? ! ! PF "PLAYER FIRING" ON OR OFF. ! F1 IS THE ROW POSITION OF THE PLAYER MISSILE, THIS DECREMENTS IN STEPS OF 8 PIXELS AT A TIME. ! F2 THE THE COLUMN POSITION THIS DOES NOT ALTER DURING MISSILE TRAVEL, IT'S ATTAINED FROM YOUR SHIP'S POSITION WHEN YOU FIRED. ! WHEN F1 REACHES <8 IT RELOCATES THE MISSILE WITHIN THE PLAYER SHIP AND SWITCHES OFF "PF" ! IF "PF" IS NILL, THEN "ETM" IS SET BACK TO 4 ! NOW LINE 4320 HAS BEEN MODIFIED TO SUB TO A CALL COINC 4300 IF PF=0 THEN 4399 4310 F1=F1-8::IF F1<8 THEN 4315 ELSE 4320 4315 CALL POSITION(#1,P1,P2)::CALL LOCATE(#2,P1,P2)::PF=0::ETM=4::GOTO 4399 4320 CALL LOCATE(#2,F1,F2)::IF WAIT=0 THEN GOSUB 8000 4399 RETURN ! * PLAYER FIRING SOUND? ! ! IT'S NOT THE BEST SOUND REALLY. BUT YOU CAN ALTER IT. ! PFS IS "PLAYER FIRING SOUND" ON OR OFF ... PFST IS THE "TICKER" TO TAKE IT THROUGH 4 STAGES. ! THE FOURTH STAGE TURNS OFF PFS 4400 IF PFS=0 THEN 4499 4405 PFST=PFST+1 :: ON PFST GOTO 4410,4420,4430,4440 4410 VL=6000::GOTO 4450 4420 VL=5000::GOTO 4450 4430 VL=4000::GOTO 4450 4440 PFS=0::CALL SOUND(-1,110,30)::GOTO 4499 4450 CALL SOUND(-500,110,30,110,30,VL,30,-8,0) 4499 RETURN ! * RECOIL? ! ! THE RECOIL IS *NOT* DONE IS PLAYER IS GOING THROUGH EXPLOSION ROUTINE ! RC IS THE RECOIL ON OR OFF VARIABLE. ! RCX IS USED TO SLOW DOWN THE ANIMATION OF THE RECOIL AND CAN BE ALTERED AS SUCH TO MAKE IT QUICKER OR SLOWER ! RCT IS THE "TICKER" TO STEP THROUGH STAGES OF RECOIL ! P1,P2 ARE THE PLAYER CALLED POSITION ! Z STORES A NUMBER TO ADD TO THE SHIP'S POSITION, THIS CHANGES THROUGH STEPS WITH "ON RCT" AT LINE 4505 4500 IF RC=0 THEN 4599 ELSE IF XP2=1 THEN 4599 4501 RCX=RCX+1::IF RCX>1 THEN 4505 ELSE 4599 4505 RCX=0::RCT=RCT+1 :: ON RCT GOTO 4510,4520,4530,4540,4550,4560,4508 4506 CALL POSITION(#1,P1,P2)::CALL LOCATE(#1,P1+Z,P2)::GOTO 4599 4507 CALL POSITION(#1,P1,P2)::CALL LOCATE(#1,P1-Z,P2)::GOTO 4599 4508 RC=0::GOTO 4599 4510 Z=3::GOTO 4506 4520 Z=2::GOTO 4506 4530 Z=1::GOTO 4506 4540 Z=1::GOTO 4507 4550 Z=2::GOTO 4507 4560 Z=3::GOTO 4507 4599 RETURN ! * WAITING FOR ENEMY? ! ! WAIT AND WT ARE USED HERE FOR A SHORT DELAY UNTIL YOU SEE THE ENEMY RATHER THAN THEM JUST BEING THERE RIGHT FROM THE START 4600 IF WAIT=0 THEN 4699 4605 WT=WT+1 :: IF WT>99 THEN 4610 ELSE 4699 4610 WAIT=0 :: WT=0 :: EA(1)=1::EA(2)=1::EA(3)=1::EA(4)=1 4615 CALL SPRITE(#3,96,16,32,16,0,16,#4,96,16,64,32,0,16,#5,96,16,96,48,0,16,#6,96,16,128,64,0,16) 4699 RETURN ! * ANIMATE ENEMY? ! ! ET IS USED HERE, COUNTS UP TO ETM AND THEN INCREMENTS THE ENEMY USING CALL CHAR ALONG WITH "EP" BEING INCREMENTED UP TO 11 ! FIRST OFF, CHECK IF THEY'RE ACTUALLY HERE OR NOT .... 4700 IF WAIT=1 THEN 4799 4705 ET=ET+1 :: IF ET>ETM THEN 4710 ELSE 4799 4710 ET=0::EP=EP+1 :: IF EP>11 THEN EP=1 4715 CALL CHAR(96,E$(EP)) 4799 RETURN ! * CAN ENEMY FIRE? ! ! IF ENEMY IS NOT ALREADY FIRING, THEN LET A RANDOM ENEMY THAT IS "ALIVE" FIRE A MISSILE ! AGAIN CHECK IF WAIT IS ON OR NOT OTHERWISE IT'S FAIRLY POINTLESS..... 4800 IF EF=1 THEN 4899 4805 IF WAIT=1 THEN 4899 4810 R=INT(4*RND)+1 :: IF EA(R)=1 THEN 4815 ELSE 4899 4815 CALL POSITION(#R+2,EF1,EF2)::CALL SPRITE(#7,100,6,EF1,EF2,32,0)::EF=1 4899 RETURN ! * TRACK ENEMY MISSILE? ! ! IF THE ENEMY HAS ALREADY FIRED THEN WE SHOULD REALLY CHECK WHERE THE MISSILE IS AS IT'S IN AUTOMOTION. ! DOESN'T LOOK GOOD IF IT WRAPS THE SCREEN.... ! THIS ROUTINE NOW CHECKS FOR ENEMY MISSILE vs PLAYER SHIP. IF THERE'S A COLLIDE THEN XP2 IS SET TO 1 AND XP2T IS USED FOR IT'S TIMER 4900 IF EF=0 THEN 4999 4905 CALL POSITION(#7,C1,C2)::IF C1>180 THEN 4910 ELSE 4920 4910 CALL DELSPRITE(#7)::EF=0::GOTO 4999 4920 CALL COINC(#7,#1,8,H)::IF H=-1 THEN 4925 ELSE 4999 4925 CALL DELSPRITE(#7)::EF=0::CALL MOTION(#1,0,0)::CALL DELSPRITE(#2)::PF=0 4930 CALL SOUND(-1,110,30)::CALL POSITION(#1,P1,P2) 4935 CALL SPRITE(#11,108,16,P1,P2,-16,-16,#12,108,16,P1,P2,-19,-12,#13,108,16,P1,P2,-19,12,#14,108,16,P1,P2,-16,16) 4940 XP2=1::XP2T=0::CALL DELSPRITE(#1) 4999 RETURN ! * ENEMY EXPLODING? ! ! IF XP1 IS 1 , THEN XPT INCREMENTS UNTIL 20 AND THEN TURNS OFF THE EXPLOSION SPRITE 5000 IF XP1=0 THEN 5099 5005 XP1T=XP1T+1 :: IF XP1T>19 THEN 5010 ELSE 5099 5010 CALL DELSPRITE(#10)::XP1=0 5099 RETURN ! * PLAYER EXPLODING? ! ! IF XP2 IS SET TO 1 THEN THE PLAYER IS GOING THROUGH EXPLOSION SEQUENCE. XP2T IS THE TIMER FOR THIS. ! WHEN EXPLOSION IS FINISHED, FOR NOW THERE'S A DELAY THEN IT GOES BACK TO THE START OF THE MAIN LOOP. ! NORMALLY WE'D LOSE A LIFE AT THIS POINT, AND IF ALL LIVES ARE LOST THEN IT WOULD BE GAME OVER. 5100 IF XP2=0 THEN 5199 5105 XP2T=XP2T+1 :: IF XP2T>32 THEN 5110 ELSE 5199 5110 XP2=0::CALL DELSPRITE(#11,#12,#13,#14)::FOR DELAY=1 TO 5000::NEXT DELAY::CALL DELSPRITE(ALL)::GOTO 1000 5199 RETURN ! * CALL COINC ROUTINE FOR PLAYER MISSILE ! ! GOES THROUGH A LOOP OF 1 TO 4, IF THE EA() ARRAY FOR "L" IS SET TO ZERO IT'S IGNORED AND MOVES TO THE NEXT. ! IF THE EA() ARRAY IS SET TO 1 AND THE ENEMY WAS ACTIVE, AND THAT ENEMY IS HIT, THEN IT EA(XX) IS SET TO NILL AND EXPLOSION IS SET TO 1 ! ALSO PLAYER MISSILE IS TURNED OFF IF AN ENEMY IS HIT, THIS IS DONE BY SUBBING TO 4315 WHICH HAS IT'S OWN RETURN SO WE CAN DO IT THAT WAY. 8000 FOR L=1 TO 4 8001 IF EA(L)=1 THEN 8002 ELSE 8010 8002 CALL COINC(#2,#2+L,8,H)::IF H=-1 THEN 8003 ELSE 8010 8003 CALL MOTION(#2+L,0,0)::CALL POSITION(#2+L,P1,P2)::CALL SPRITE(#10,104,16,P1,P2)::CALL DELSPRITE(#2+L) 8004 XP1=1::XP1T=0::EA(L)=0::PF=0::GOSUB 4315 8010 NEXT L 8099 RETURN
  9. Here we have a little more code added to the example above. We now have four animated enemies with the ability to fire. As yet, no collision detection or death routines are in place. ! CODE TO BE PASTED INTO EXTENDED BASIC AND COMPILED USING THE WILHELM COMPILER ! OTHERWISE IT'LL BE RAAAAAATHER SLOOOOOOW ! E$ ARRAY FOR ENEMY ANIMATION 1 DIM E$(11)::FOR Q=1 TO 11::READ E$(Q)::NEXT Q 2 DATA 00000003075FBFFF030000000000000000000080C0FCFEFE8000000000000000,00000003076FDFFF030000000000000000000080C0FCFEFE8000000000000000 3 DATA 000000030777EFFF030000000000000000000080C0FCFEFE8000000000000000,00000003057DFBFF030000000000000000000080C0FCFEFE8000000000000000 4 DATA 00000003067EFEFF030000000000000000000080C0FCFEFE8000000000000000,00000003077FFFFF030000000000000000000080407CBEFE8000000000000000 5 DATA 00000003077FFFFF030000000000000000000080C0BCDEFE8000000000000000,00000003077FFFFF030000000000000000000080C0DCEEFE8000000000000000 6 DATA 00000003077FFFFF030000000000000000000080C0ECF6FE8000000000000000,00000003077FFFFF030000000000000000000080C0F4FAFE8000000000000000 7 DATA 00000003077FFFFF030000000000000000000080C0FCFEFE8000000000000000 ! * GRAPHICS DEFS ! 36 PLAYER SHIP ! 40 PLAYER MISSILE ! 96 ENEMY (USES THE E$(XX) ARRAY FOR ANIMATION) ! 100 ENEMY MISSILE 10 CALL CHAR(36,"00000006061E7FFFFFFFFF0000000000000000C0C0F0FCFEFEFEFE0000000000") 20 CALL CHAR(40,"0103030101010000000000000000000000808000000000000000000000000000") 25 CALL CHAR(96,E$(1)) 30 CALL CHAR(100,"0000000000000000000103010301010000000000000000000080008000800000") ! * ENEMY ALIVE ARRAY, 4 ELEMENTS, FOR FOUR ENEMIES 50 DIM EA(4) ! * SCREEN CLEAR, BLACK SCREEN, MAGNIFYx3 SPRITES 100 CALL CLEAR :: CALL SCREEN(2)::CALL MAGNIFY(3) ! * GET THE SPRITES ON SCREEN, PLAYING NOT FIRING (PF=0), NO RECOIL (RC=0), ENEMY NOT F‏IRING (EF=0) ! NOTE: EVEN NULL VARIABLES HAVE TO BE DECLARED FOR THE COMPILER OTHERWISE IT'LL CRASH. ! ET=0 , THIS IS THE ENEMY TIMER FOR ANIMATION. ETM=4 IS MAXIMUM DELAY VALUE, IT TAKES INTO ACCOUNT IF PLAYER IS FIRING AND ALTERS ACCORDINGLY ! WAIT=1 , MEANS WE ARE WAITING FOR AN ENEMY, SHORT DELAY BEFORE THEY APPEAR WITH "WT" INCREMENTING UP TO 100 THEN WAIT=0 AND ENEMIES ON SCREEN ! EP DECLARED AS NILL, THIS IS FOR ANIMATING ENEMY PATTERNS 1000 CALL SPRITE(#1,36,7,160,120,#2,40,16,160,120)::PF=0::PFS=0::RC=0::EF=0::ET=0::ETM=4::WAIT=1::WT=0::EP=0 ! * MAIN LOOP 1100 GOSUB 4100 ! JOY 1105 GOSUB 4200 ! FIRE PRESSED? 1110 GOSUB 4300 ! INCREMENT PLAYER MISSILE? 1115 GOSUB 4400 ! PLAYER FIRING SOUND? 1120 GOSUB 4500 ! RECOIL? 1125 GOSUB 4600 ! WAITING FOR ENEMY? 1130 GOSUB 4700 ! ANIMATE ENEMY? 1135 GOSUB 4800 ! CAN ENEMY FIRE? 1140 GOSUB 4900 ! TRACK ENEMY MISSILE? 1145 GOTO 1100 ! * JOY ! ! CALL JOYSTICK AND FIRE KEY. IF RECOIL IS *NOT* ACTIVE THEN IT WILL MOVE THE SHIP ACCORDINGLY IN AUTOMOTION ! IF YOU'RE FIRING, IT MOVES *ONLY* THE SHIP OTHERWISE BOTH SHIP AND MISSILE MOVE. 4100 CALL JOYST(1,JY,JX) :: CALL KEY(1,K,ST) :: IF RC=0 THEN 4105 ELSE 4199 4105 IF PF=0 THEN 4110 ELSE 4120 4110 CALL MOTION(#1,0,JY*6,#2,0,JY*6)::GOTO 4199 4120 CALL MOTION(#1,0,JY*6) 4199 RETURN ! * FIRE PRESSED? ! ! SCAN K FOR VALUE 18 WHICH IS THE FIRE KEY ON JOYSTICK (Q OR TAB ON EMULATORS) ! GETS POSITION OF SHIP AND SETS RECOIL, RECOIL TICKER, RECOIL TIMER "X", PLAYER FIRING SOUND, PLAYER FIRING SOUND TICKER ! WHEN PLAYER MISSILE IS ACTIVE, ETM (MAX DELAY FOR ENEMY ANIMATIONS) IS SET TO HALF IT'S NORMAL VALUE. 4200 IF PF=1 THEN 4299 ELSE IF RC=1 THEN 4299 4205 IF K=18 THEN 4210 ELSE 4299 4210 CALL POSITION(#2,F1,F2)::PF=1::RC=1::RCT=0::RCX=0::PFS=1::PFST=0::ETM=2 4299 RETURN ! * INCREMENT PLAYER MISSILE? ! ! PF "PLAYER FIRING" ON OR OFF. ! F1 IS THE ROW POSITION OF THE PLAYER MISSILE, THIS DECREMENTS IN STEPS OF 8 PIXELS AT A TIME. ! F2 THE THE COLUMN POSITION THIS DOES NOT ALTER DURING MISSILE TRAVEL, IT'S ATTAINED FROM YOUR SHIP'S POSITION WHEN YOU FIRED. ! WHEN F1 REACHES <8 IT RELOCATES THE MISSILE WITHIN THE PLAYER SHIP AND SWITCHES OFF "PF" ! IF "PF" IS NILL, THEN "ETM" IS SET BACK TO 4 4300 IF PF=0 THEN 4399 4310 F1=F1-8::IF F1<8 THEN 4315 ELSE 4320 4315 CALL POSITION(#1,P1,P2)::CALL LOCATE(#2,P1,P2)::PF=0::ETM=4::GOTO 4399 4320 CALL LOCATE(#2,F1,F2) 4399 RETURN ! * PLAYER FIRING SOUND? ! ! IT'S NOT THE BEST SOUND REALLY. BUT YOU CAN ALTER IT. ! PFS IS "PLAYER FIRING SOUND" ON OR OFF ... PFST IS THE "TICKER" TO TAKE IT THROUGH 4 STAGES. ! THE FOURTH STAGE TURNS OFF PFS 4400 IF PFS=0 THEN 4499 4405 PFST=PFST+1 :: ON PFST GOTO 4410,4420,4430,4440 4410 VL=6000::GOTO 4450 4420 VL=5000::GOTO 4450 4430 VL=4000::GOTO 4450 4440 PFS=0::CALL SOUND(-1,110,30)::GOTO 4499 4450 CALL SOUND(-500,110,30,110,30,VL,30,-8,0) 4499 RETURN ! * RECOIL? ! ! RC IS THE RECOIL ON OR OFF VARIABLE. ! RCX IS USED TO SLOW DOWN THE ANIMATION OF THE RECOIL AND CAN BE ALTERED AS SUCH TO MAKE IT QUICKER OR SLOWER ! RCT IS THE "TICKER" TO STEP THROUGH STAGES OF RECOIL ! P1,P2 ARE THE PLAYER CALLED POSITION ! Z STORES A NUMBER TO ADD TO THE SHIP'S POSITION, THIS CHANGES THROUGH STEPS WITH "ON RCT" AT LINE 4505 4500 IF RC=0 THEN 4599 4501 RCX=RCX+1::IF RCX>1 THEN 4505 ELSE 4599 4505 RCX=0::RCT=RCT+1 :: ON RCT GOTO 4510,4520,4530,4540,4550,4560,4508 4506 CALL POSITION(#1,P1,P2)::CALL LOCATE(#1,P1+Z,P2)::GOTO 4599 4507 CALL POSITION(#1,P1,P2)::CALL LOCATE(#1,P1-Z,P2)::GOTO 4599 4508 RC=0::GOTO 4599 4510 Z=3::GOTO 4506 4520 Z=2::GOTO 4506 4530 Z=1::GOTO 4506 4540 Z=1::GOTO 4507 4550 Z=2::GOTO 4507 4560 Z=3::GOTO 4507 4599 RETURN ! * WAITING FOR ENEMY? ! ! WAIT AND WT ARE USED HERE FOR A SHORT DELAY UNTIL YOU SEE THE ENEMY RATHER THAN THEM JUST BEING THERE RIGHT FROM THE START 4600 IF WAIT=0 THEN 4699 4605 WT=WT+1 :: IF WT>99 THEN 4610 ELSE 4699 4610 WAIT=0 :: WT=0 :: EA(1)=1::EA(2)=1::EA(3)=1::EA(4)=1 4615 CALL SPRITE(#3,96,16,32,16,0,16,#4,96,16,64,32,0,16,#5,96,16,96,48,0,16,#6,96,16,128,64,0,16) 4699 RETURN ! * ANIMATE ENEMY? ! ! ET IS USED HERE, COUNTS UP TO ETM AND THEN INCREMENTS THE ENEMY USING CALL CHAR ALONG WITH "EP" BEING INCREMENTED UP TO 11 ! FIRST OFF, CHECK IF THEY'RE ACTUALLY HERE OR NOT .... 4700 IF WAIT=1 THEN 4799 4705 ET=ET+1 :: IF ET>ETM THEN 4710 ELSE 4799 4710 ET=0::EP=EP+1 :: IF EP>11 THEN EP=1 4715 CALL CHAR(96,E$(EP)) 4799 RETURN ! * CAN ENEMY FIRE? ! ! IF ENEMY IS NOT ALREADY FIRING, THEN LET A RANDOM ENEMY THAT IS "ALIVE" FIRE A MISSILE ! AGAIN CHECK IF WAIT IS ON OR NOT OTHERWISE IT'S FAIRLY POINTLESS..... 4800 IF EF=1 THEN 4899 4805 IF WAIT=1 THEN 4899 4810 R=INT(4*RND)+1 :: IF EA(R)=1 THEN 4815 ELSE 4899 4815 CALL POSITION(#R+2,EF1,EF2)::CALL SPRITE(#7,100,6,EF1,EF2,32,0)::EF=1 4899 RETURN ! * TRACK ENEMY MISSILE? ! ! IF THE ENEMY HAS ALREADY FIRED THEN WE SHOULD REALLY CHECK WHERE THE MISSILE IS AS IT'S IN AUTOMOTION. ! DOESN'T LOOK GOOD IF IT WRAPS THE SCREEN.... WE'LL PUT COLLISION DETECTION IN LATER, FOR ENEMY MISSILE vs PLAYER SHIP ! AND VICE-VERSA... 4900 IF EF=0 THEN 4999 4905 CALL POSITION(#7,C1,C2)::IF C1>180 THEN 4910 ELSE 4999 4910 CALL DELSPRITE(#7)::EF=0 4999 RETURN
  10. ! CODE TO BE PASTED INTO EXTENDED BASIC AND COMPILED USING THE WILHELM COMPILER ! OTHERWISE IT'LL BE RAAAAAATHER SLOOOOOOW ! * GRAPHICS DEFS ! 36 PLAYER SHIP ! 40 PLAYER MISSILE 10 CALL CHAR(36,"00000006061E7FFFFFFFFF0000000000000000C0C0F0FCFEFEFEFE0000000000") 20 CALL CHAR(40,"0103030101010000000000000000000000808000000000000000000000000000") ! * SCREEN CLEAR, BLACK SCREEN, MAGNIFYx3 SPRITES 100 CALL CLEAR :: CALL SCREEN(2)::CALL MAGNIFY(3) ! * GET THE SPRITES ON SCREEN 1000 CALL SPRITE(#1,36,7,160,120,#2,40,16,160,120)::PF=0::PFS=0::RC=0 ! * MAIN LOOP 1100 GOSUB 4100 ! JOY 1105 GOSUB 4200 ! FIRE PRESSED? 1110 GOSUB 4300 ! INCREMENT PLAYER MISSILE? 1115 GOSUB 4400 ! PLAYER FIRING SOUND? 1120 GOSUB 4500 ! RECOIL? 1125 GOTO 1100 ! * JOY ! ! CALL JOYSTICK AND FIRE KEY. IF RECOIL IS *NOT* ACTIVE THEN IT WILL MOVE THE SHIP ACCORDINGLY IN AUTOMOTION ! IF YOU'RE FIRING, IT MOVES *ONLY* THE SHIP OTHERWISE BOTH SHIP AND MISSILE MOVE. 4100 CALL JOYST(1,JY,JX) :: CALL KEY(1,K,ST) :: IF RC=0 THEN 4105 ELSE 4199 4105 IF PF=0 THEN 4110 ELSE 4120 4110 CALL MOTION(#1,0,JY*6,#2,0,JY*6)::GOTO 4199 4120 CALL MOTION(#1,0,JY*6) 4199 RETURN ! * FIRE PRESSED? ! ! SCAN K FOR VALUE 18 WHICH IS THE FIRE KEY ON JOYSTICK (Q OR TAB ON EMULATORS) ! GETS POSITION OF SHIP AND SETS RECOIL, RECOIL TICKER, RECOIL TIMER "X", PLAYER FIRING SOUND, PLAYER FIRING SOUND TICKER 4200 IF PF=1 THEN 4299 ELSE IF RC=1 THEN 4299 4205 IF K=18 THEN 4210 ELSE 4299 4210 CALL POSITION(#2,F1,F2)::PF=1::RC=1::RCT=0::RCX=0::PFS=1::PFST=0 4299 RETURN ! * INCREMENT PLAYER MISSILE? ! ! PF "PLAYER FIRING" ON OR OFF. ! F1 IS THE ROW POSITION OF THE PLAYER MISSILE, THIS DECREMENTS IN STEPS OF 8 PIXELS AT A TIME. ! F2 THE THE COLUMN POSITION THIS DOES NOT ALTER DURING MISSILE TRAVEL, IT'S ATTAINED FROM YOUR SHIP'S POSITION WHEN YOU FIRED. ! WHEN F1 REACHES <8 IT RELOCATES THE MISSILE WITHIN THE PLAYER SHIP AND SWITCHES OFF "PF" 4300 IF PF=0 THEN 4399 4310 F1=F1-8::IF F1<8 THEN 4315 ELSE 4320 4315 CALL POSITION(#1,P1,P2)::CALL LOCATE(#2,P1,P2)::PF=0::GOTO 4399 4320 CALL LOCATE(#2,F1,F2) 4399 RETURN ! * PLAYER FIRING SOUND? ! ! IT'S NOT THE BEST SOUND REALLY. BUT YOU CAN ALTER IT. ! PFS IS "PLAYER FIRING SOUND" ON OR OFF ... PFST IS THE "TICKER" TO TAKE IT THROUGH 4 STAGES. ! THE FOURTH STAGE TURNS OFF PFS 4400 IF PFS=0 THEN 4499 4405 PFST=PFST+1 :: ON PFST GOTO 4410,4420,4430,4440 4410 VL=6000::GOTO 4450 4420 VL=5000::GOTO 4450 4430 VL=4000::GOTO 4450 4440 PFS=0::CALL SOUND(-1,110,30)::GOTO 4499 4450 CALL SOUND(-500,110,30,110,30,VL,30,-8,0) 4499 RETURN ! * RECOIL? ! ! RC IS THE RECOIL ON OR OFF VARIABLE. ! RCX IS USED TO SLOW DOWN THE ANIMATION OF THE RECOIL AND CAN BE ALTERED AS SUCH TO MAKE IT QUICKER OR SLOWER ! RCT IS THE "TICKER" TO STEP THROUGH STAGES OF RECOIL ! P1,P2 ARE THE PLAYER CALLED POSITION ! Z STORES A NUMBER TO ADD TO THE SHIP'S POSITION, THIS CHANGES THROUGH STEPS WITH "ON RCT" AT LINE 4505 4500 IF RC=0 THEN 4599 4501 RCX=RCX+1::IF RCX>1 THEN 4505 ELSE 4599 4505 RCX=0::RCT=RCT+1 :: ON RCT GOTO 4510,4520,4530,4540,4550,4560,4508 4506 CALL POSITION(#1,P1,P2)::CALL LOCATE(#1,P1+Z,P2)::GOTO 4599 4507 CALL POSITION(#1,P1,P2)::CALL LOCATE(#1,P1-Z,P2)::GOTO 4599 4508 RC=0::GOTO 4599 4510 Z=3::GOTO 4506 4520 Z=2::GOTO 4506 4530 Z=1::GOTO 4506 4540 Z=1::GOTO 4507 4550 Z=2::GOTO 4507 4560 Z=3::GOTO 4507 4599 RETURN ------------------------------------------------------------- Copy this code into Classic99 and use the wilhelm compiler that you get with it , to compile it ... see what it does. Alter the code, experiment with the code, play with it, make something with it ... put in enemies and checks for collisions ... enemy movement routines .... Have fun!
  11. BLAST2-G.BIN < Morg Blaster II MORG-G.BIN < Morg Blaster 1 COSMIC-G.BIN < Cosmic Hero
  12. The TI GPL programming language came about for a couple of reasons, the reasons I understand are that firstly TI thought 9900 assembly might put people off programming for it (I don't know why?) and secondly, they didn't have a working CPU when they were developing the 99/4 and Dimension-4 computers, as the 8 bit CPU they wanted kept failing, so GPL was used for the OS and it's internal BASIC. It was recommended by one of the TI employees to use the Zilog Z80 cpu. I think they shot him. They went with the 9900 and GPL along with the so-called GROMs.
  13. More progress. Off to bed now! * Enemies can now fire (but no player death yet) * There's loads more enemies.
  14. I've become aware there's an Atari game with the same name, well I didn't know about that game , so this I can assure you is not a copy of it, or any other. It came about because I had the graphics already plotted out in my little folder from what I call "Graphics Sunday" where some sundays I just plot graphics and hoard them.
  15. It does look good. It's about the only reason I'd buy a Nintendo of any variety. I'm a coder not a gamer but this looks enticing. Maybe one day!
×
×
  • Create New...