include div_mul.asm set kernel_options no_blank_lines set romsize 8kSC set smartbranching on const pfres=32 pfclear player0x=10:player0y=7 player0: %11000000 %01100000 %00110001 %00011011 %00001111 %00011111 %00111111 end gameloop COLUP0=15 COLUPF=203 if joy0left then player0x=player0x-1:if player0x<10 then player0x=10 if joy0right then player0x=player0x+1:if player0x>137 then player0x=137 if joy0up then player0y=player0y-1:if player0y<7 then player0y=7 if joy0down then player0y=player0y+1:if player0y>99 then player0y=99 skipjoy if joy0fire then gosub plot drawscreen goto gameloop plot rem convert player position to playfield pixel rem divide by 3 vertically g=(player0y-7)/3 h=(player0x-10)/4 if g=i && j=h then return i=g:j=h pfpixel h g flip return
Also any code that has a, ; , in it will not compile. I know that ; is used for comments but why dose this not work. I am very new at this but I am not new to programing or game design. Please forgive me if my question sound basic but I am trying to start out some where.
This next part is some code that came with on of the IDE and complies and plays but when I try and change something in it like add another player it errors out on me, sometimes even if I only change on thing. I am in the process of reading ATARI 2600 for Newbies so I think after that I might have a few answers. Thanks in advance for any advice that you can give me on this matter. Ohh yeah one last thing for somer reason in this last block of code will work so again you can see why I am stumped. Becasue it goes nothing with what was in the programing guide.
set smartbranching on 10 player1x = 40 : player1y = 40:player0x = 50 : player0y = 50 20 COLUPF = 90:missile0height=4:missile0y=255 25 score=10000 30 COLUP0 = 120 35 COLUP1 = 14 40 scorecolor = 10:NUSIZ0=16 player0:;this is the player %01000010 %11111111 %11111111 %01111110 %00111100 %00011000 %00011000 %00011000 end 46 player1:;this is the enemy %00111100 %00011000 %00011000 %00011000 %11100111 %10100101 %10011001 %00100100 end player2:;this is the enemy %00111100 %00011000 %00011000 %00011000 %11100111 %10100101 %10011001 %00100100 end 47 a = a + 1 : if a < 3 then 55 49 a = 0 50 if player1y < player0y then player1y = player1y + 1 51 if player1y > player0y then player1y = player1y - 1 52 if player1x < player0x then player1x = player1x + 1 53 if player1x > player0x then player1x = player1x - 1 player1x = player1x : player1y = player1y if player2y < player0y then player2y = player2y + 1 if player2y > player0y then player2y = player2y - 1 if player2x < player0x then player2x = player2x + 1 if player2x > player0x then player2x = player2x - 1 player2x = player2x : player2y = player2y 54 player1x = player1x : player1y = player1y 55 if missile0y>240 then 58 57 missile0y=missile0y-2:goto 59 58 if joy0fire then missile0y=player0y-2:missile0x=player0x+4 59 drawscreen 60 if collision(missile0,player1) then score=score+1:player1x=rand/2:player1y=0:missile0y=255 if collision(player0,player1) then score=score-1 if collision(missile0,player2) then score=score+1:player1x=rand/2:player2y=0:missile0y=255 65 if collision(player0,player2) then score=score-1 70 if joy0up then player0y = player0y - 1 80 if joy0down then player0y = player0y + 1 100 if joy0left then player0x = player0x - 1 120 if joy0right then player0x = player0x + 1 140 goto 30
BC
Edited by |*BILLY$CLINT*|, Thu Apr 12, 2007 1:37 AM.













