Retro Lord #1 Posted December 18, 2014 Hello everyone. I'm working on my first game called "Zombie House" and I've come a long way thanks to RandomTerrains webpage. But, I'm having a bit of a hard time grasping missiles. I'm using " set kernel_options player1colors playercolors pfcolors" in my game and it seems I can't use missiles with it. So I resorted to using the ball instead. The thing I'm having trouble with is that the aim of the game is to shoot zombies and as you walk about you fire in the direction your facing, but when you turn the ball turns too instead of going in the fired direction. I want too be able too fire left and right. What advice would you have on this situation? Many thanks in advance. Quote Share this post Link to post Share on other sites
+Random Terrain #2 Posted December 18, 2014 Have you tried replacing the missile with the ball in this example: randomterrain.com/atari-2600-memories-batari-basic-commands.html#sprite_missile_example Quote Share this post Link to post Share on other sites
Retro Lord #3 Posted December 18, 2014 Thank you, I got it working now =) Quote Share this post Link to post Share on other sites
Retro Lord #4 Posted December 18, 2014 Hm, another question, what is the simplest way to do scrolling, either horizontal or vertical? I've experimented with pfscroll but when I add "pfscroll left" it dosn't do anything. And when I add "pfscroll up" the playfield just sort of jerks in a small up and down motion. Is this due to the playfield size? How small or big should it be for it too work? At the moment I have the standard size for a screen. Thanks in advance. Quote Share this post Link to post Share on other sites
Retro Lord #5 Posted December 18, 2014 Nevermind, I figured out how to use pfvline and even how I set the speed. Now, I have another question that is related too pfvline. How would I go about if I wanted a hole too appear at a random spot on the line? I'm using this for my horizontal scrolling: dim rand16 = z pfvline 0 0 10 on pfvline 31 4 8 off pfvline 8 2 4 flipmain u=u+1 if u=15 then u=1 if u=1 then pfscroll left if playfieldpos <> 8 then goto __Skip_Draw temp5 = rand : temp6 = rand/2 if temp5 > temp6 then var44 = 0 : var45 = 0 : var46 = 0 : var47 = 0 : goto __Skip_Draw var44 = rand : var45 = rand : var46 = rand : var47 = rand__Skip_Draw draw_loop goto main Entire game source: rem CODE INSPIRED BY Atarius Maximus at http://www.atariage.com/forums/index.php?showtopic=109288 set smartbranching on player0x = 30 player0y = 50 player1x=135 player1y=50 scorecolor = $68 ballx = 200 bally = 200 dim rand16 = z pfvline 0 0 10 on pfvline 31 4 8 off pfvline 8 2 4 flip main COLUP0 = $2E COLUP1 = $3A COLUPF = $0A dim _P0_L_R = player0x.a dim _P0_U_D = player0y.b dim _P1_L_R = player1x.c dim _P1_U_D = player1y.d g=g u=u+1 if u=15 then u=1 f=f+1 rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME... if f = 10 then player0: %00100100 %00100100 %00100100 %00100100 %00100100 %00011000 %00011000 %00011000 %00011000 %00011000 %00011110 %00000011 %00011000 %00011000 %00011100 %00011000 end if f = 20 then player0: %01000010 %01000010 %01000010 %00100100 %00100100 %00011000 %00011000 %00011000 %00011000 %00011000 %00011110 %00000011 %00011000 %00011000 %00011100 %00011000 end if f=20 then f=0 h=h+1 rem POSSIBLY INEFFICIENT CODE, SEPARATE COLOR INFO FOR EACH FRAME... if h = 10 then player1: %00100100 %00100100 %00100100 %00100100 %00100100 %00011000 %00011000 %00011000 %00011110 %00011000 %00011111 %00000000 %00011000 %00011000 %00011000 %00011000 end if h = 20 then player1: %01000010 %01000010 %01000010 %00100100 %00100100 %00011000 %00011000 %00011000 %00011110 %00011000 %00011111 %00000000 %00011000 %00011000 %00011000 %00011000 end if h=20 then h=0 if u=1 then pfscroll left if playfieldpos <> 8 then goto __Skip_Draw temp5 = rand : temp6 = rand/2 if temp5 > temp6 then var44 = 0 : var45 = 0 : var46 = 0 : var47 = 0 : goto __Skip_Draw var44 = rand : var45 = rand : var46 = rand : var47 = rand __Skip_Draw drawscreen if k > 0 then AUDV0 = 8 : AUDC0 = 7 : AUDF0 = 30 : k = k - 1 : if k = 0 then AUDV0 = 0 if r > 0 then AUDV0 = 8 : AUDC0 = 8 : AUDF0 = 10 : r = r - 1 : if r = 0 then AUDV0 = 0 if joy0up then _P0_U_D = _P0_U_D - 1 if joy0down then _P0_U_D = _P0_U_D + 1 if collision(ball,player1) then player1y=rand:player1x=135 : score=score+10 : ballx=200 : bally=200 : r=10 if player1y < 25 then player1y=rand if player1y > 80 then player1y=rand _P1_L_R=_P1_L_R - 0.3 : REFP1 = 8 if ballx>135 then goto skip ballx = ballx+2:goto draw_loop skip if joy0fire then k=10 : ballx = player0x+7:bally=player0y-12 draw_loop goto main Quote Share this post Link to post Share on other sites
+Random Terrain #6 Posted December 19, 2014 Check out how scrolling was done in Princess Rescue: atariage.com/forums/topic/215171-princess-rescue-batari-basic-source-code/ Quote Share this post Link to post Share on other sites
Retro Lord #7 Posted December 19, 2014 Thank you, Random Terrain! Quote Share this post Link to post Share on other sites