Jump to content

Retro Lord

Members
  • Content Count

    367
  • Joined

  • Last visited

Everything posted by Retro Lord

  1. I'm having some problems with the movement of the ghost. I'm trying to have it follow the player arround, and this is my code for the ghost: q is the random counter that rolls everytime when you enter a room to see if a ghost will appear. If q=1 then the ghost is in the room. p is the flickering mechanic that flickers between the ghost sprite and the lightsource of the player. I tried using a counter for making the ghost follow the player : w. If w=1 then the ghost should follow but it dosn't. Does anybody have any pointers on this? rem makes the ghost appear when entering a room if q=1 && p=2 then player1x=50 : player1y=50 : w=1 if q=1 && p=2 && w=1 && player1x<player0x then _P1_L_R=_P1_L_R+0.30 if q=1 && p=2 && w=1 && player1x>player0x then _P1_L_R=_P1_L_R-0.30 if q=0 && p=2 then player1y=255 : player1x=255 : u=0 default.bas
  2. I'm killing this project, I don't really have any ambition on completing it, I just wanted to see what I could do and share my findings so that others hopefully has some use of it. Use the source if you want =)
  3. Nevermind, I figured it out. I used a counter, when you walk up j=j+1 until it reaches 60, then if j>60 pfscroll down and j=60 So simple, haha =) Implemented features: 8 direction rotation of eyes. Light effect around the eyes. Scrolling rooms up and down. Randomly appearing ghost and dot(placehold item) 3 hearts I use flicker for player1 so I can have both the light and the ghost on the screen at the same time, I couldn't capture it on the printscreen sadly. Planned features for the next version: Moving ghost Techdemo: Boo, Scary House 0.2.bin
  4. I haven't figured this one out yet, but I believe the answer is math. The scrolling in haunted house, how would it be coded so that it stops scrolling up or down at the desired location? Tech demo of Haunted House clone: default.bas.bin You can walk around, and go to 3 different rooms, 1 to the right and 1 to the left of the blue room. No hit detection.
  5. Thanks for the help atari2600land. Yes, Arenafoot, it's a bug. this demo is all a bug-infested mess, I mostly focus on the key stuff and leave most bugs that aren't totally gamebreaking for last.
  6. Hm, I skipped having moving humans, they are instead stationary, but they turn red sometimes and you can't eat them when they are red, they'll kill you. I put in 3 levels but it dosn't really work switching between them when you get 10 points, no idea why...Any pointers? set kernel_options no_blank_lines dim level=p dim _P0_L_R = player0x.v dim _P0_U_D = player0y.w rem turn on smartbranching set smartbranching on c=1 rem a, b, c, d, e, f, g, h, i, k, l, m, n, o, s, t, u begin_level pfclear d=0 e=1 a=2 : b=1 f=2 : g=1 h=10 : i=1 missile1x=26 : missile1y=15 k=0 : l=0 : m=0 : n=0 : o=0 q=0 : z{1}=0 s=2 : t=11 level_designs if level=1 then goto level_1 if level=2 then goto level_2 if level=3 then goto level_3 level_1 playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end player0: %00000000 %00000000 %00100100 %00011000 %00111100 %00000000 %00011000 %00011000 end goto get_man_y level_2 playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X..............................X X..............................X X..............................X X....X....................X....X X....XXXXXXXXXXXXXXXXXXXXXX....X X....X....................X....X X..............................X X..............................X X..............................X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end level_3 playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X..............................X X..............................X X..............................X X....XXXXXXXXX...X.........X...X X....X.......X...X.........X...X X....X.......X...XXXXXXXXXXX...X X..............................X X..............................X X..............................X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end get_man_y if !z{0} then player0y=rand if player0y<15 then goto get_man_y if player0y>80 then goto get_man_y get_man_x if !z{0} then player0x=rand if player0x<20 then goto get_man_x if player0x>135 then goto get_man_x z{0}=1 main if q=10 then level=level+1 : goto begin_level rem snakeface down if d=4 then player1: %00111100 %01000010 %10000001 %10100101 %11111111 %11011011 %10111101 %11111111 %01111110 end rem snakeface up if d=3 then player1: %00111100 %01111110 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %01111110 end rem snakface right if d=2 then player1: %00111100 %01110010 %11100000 %11100001 %11110111 %11111101 %11111011 %11111111 %01111110 end if d=1 then player1: %00111100 %01001110 %00000111 %10000111 %11101111 %10111111 %11011111 %11111111 %01111110 end scorecolor=$D6 COLUPF=$D6 : COLUBK=$00 : COLUP1=$22 if joy0left then d=1 if joy0right then d=2 if joy0up then d=3 if joy0down then d=4 if d>0 then c=c+5 pfpixel f g on if !z{0} then goto get_man_y drawscreen if d=1 && i=1 && c>30 then k{0}=1 if d=2 && i=1 && c>30 then k{1}=1 if d=3 && i=1 && c>30 then k{2}=1 if d=4 && i=1 && c>30 then k{3}=1 if d=1 && i=2 && c>30 then k{4}=1 if d=2 && i=2 && c>30 then k{5}=1 if d=3 && i=2 && c>30 then k{6}=1 if d=4 && i=2 && c>30 then k{7}=1 if d=1 && i=3 && c>30 then l{0}=1 if d=2 && i=3 && c>30 then l{1}=1 if d=3 && i=3 && c>30 then l{2}=1 if d=4 && i=3 && c>30 then l{3}=1 if d=1 && i=4 && c>30 then l{4}=1 if d=2 && i=4 && c>30 then l{5}=1 if d=3 && i=4 && c>30 then l{6}=1 if d=4 && i=4 && c>30 then l{7}=1 if d=1 && i=5 && c>30 then m{0}=1 if d=2 && i=5 && c>30 then m{1}=1 if d=3 && i=5 && c>30 then m{2}=1 if d=4 && i=5 && c>30 then m{3}=1 if d=1 && i=6 && c>30 then m{4}=1 if d=2 && i=6 && c>30 then m{5}=1 if d=3 && i=6 && c>30 then m{6}=1 if d=4 && i=6 && c>30 then m{7}=1 if d=1 && i=7 && c>30 then n{0}=1 if d=2 && i=7 && c>30 then n{1}=1 if d=3 && i=7 && c>30 then n{2}=1 if d=4 && i=7 && c>30 then n{3}=1 if d=1 && i=8 && c>30 then n{4}=1 if d=2 && i=8 && c>30 then n{5}=1 if d=3 && i=8 && c>30 then n{6}=1 if d=4 && i=8 && c>30 then n{7}=1 if d=1 && i=9 && c>30 then o{0}=1 if d=2 && i=9 && c>30 then o{1}=1 if d=3 && i=9 && c>30 then o{2}=1 if d=4 && i=9 && c>30 then o{3}=1 if d=1 && i=10 && c>30 then o{4}=1 if d=2 && i=10 && c>30 then o{5}=1 if d=3 && i=10 && c>30 then o{6}=1 if d=4 && i=10 && c>30 then o{7}=1 if i>s then i=1 if c>30 && d=1 then e=e+1 : f=f-1 : i=i+1 : h=h+1 : missile1x=missile1x-4 if c>30 && d=2 then e=e+1 : f=f+1 : i=i+1 : h=h+1 : missile1x=missile1x+4 if c>30 && d=3 then e=e+1 : g=g-1 : i=i+1 : h=h+1 : missile1y=missile1y-8 if c>30 && d=4 then e=e+1 : g=g+1 : i=i+1 : h=h+1 : missile1y=missile1y+8 if d=2 then player1x=missile1x : player1y=missile1y+1 if d=3 then player1x=missile1x-3 : player1y=missile1y if d=4 then player1x=missile1x-3 : player1y=missile1y+7 if d=1 then player1x=missile1x-6 : player1y=missile1y+1 j=j+1 if j=60 then u=(rand&3) : j=0 if u=0 then COLUP0=$2E if u=1 then COLUP0=$2E if u=2 then COLUP0=$42 if u=3 then COLUP0=$2E if collision(player0,playfield) then player0x=rand : player0y=rand if player0x<20 then player0x=rand : player0y=rand if player0x>135 then player0x=rand : player0y=rand if player0y<10 then player0x=rand : player0y=rand if player0y>80 then player0x=rand : player0y=rand if c>30 && pfread(f,g) then goto begin_level if c>30 then c=0 if collision(player1,player0) && u=0 then score=score+1 : q=q+1 : z{0}=0 : z{1}=1 : s=s+1 : t=t+1 if collision(player1,player0) && u=1 then score=score+1 : q=q+1 : z{0}=0 : z{1}=1 : s=s+1 : t=t+1 if collision(player1,player0) && u=3 then score=score+1 : q=q+1 : z{0}=0 : z{1}=1 : s=s+1 : t=t+1 if collision(player1,player0) && u=2 then reboot if c=0 && e>s then pfpixel a b off : e=50 : goto read_pf if d>0 && c<10 then AUDV1=6 : AUDC1=1 : AUDF1=15 else AUDV1=0 goto main read_pf if h>t then h=10 if h=10 then goto read_pf_k if h=11 then goto read_pf_l if h=12 then goto read_pf_m if h=13 then goto read_pf_n if h=14 then goto read_pf_o if h=15 then goto read_pf_p if h=16 then goto read_pf_q if h=17 then goto read_pf_r if h=18 then goto read_pf_s if h=19 then goto read_pf_t read_pf_k if k{0} then a=a-1 if k{1} then a=a+1 if k{2} then b=b-1 if k{3} then b=b+1 k{0}=0 : k{1}=0 : k{2}=0 : k{3}=0 goto main read_pf_l if k{4} then a=a-1 if k{5} then a=a+1 if k{6} then b=b-1 if k{7} then b=b+1 k{4}=0 : k{5}=0 : k{6}=0 : k{7}=0 goto main read_pf_m if l{0} then a=a-1 if l{1} then a=a+1 if l{2} then b=b-1 if l{3} then b=b+1 l{0}=0 : l{1}=0 : l{2}=0 : l{3}=0 goto main read_pf_n if l{4} then a=a-1 if l{5} then a=a+1 if l{6} then b=b-1 if l{7} then b=b+1 l{4}=0 : l{5}=0 : l{6}=0 : l{7}=0 goto main read_pf_o if m{0} then a=a-1 if m{1} then a=a+1 if m{2} then b=b-1 if m{3} then b=b+1 m{0}=0 : m{1}=0 : m{2}=0 : m{3}=0 goto main read_pf_p if m{4} then a=a-1 if m{5} then a=a+1 if m{6} then b=b-1 if m{7} then b=b+1 m{4}=0 : m{5}=0 : m{6}=0 : m{7}=0 goto main read_pf_q if n{0} then a=a-1 if n{1} then a=a+1 if n{2} then b=b-1 if n{3} then b=b+1 n{0}=0 : n{1}=0 : n{2}=0 : n{3}=0 goto main read_pf_r if n{4} then a=a-1 if n{5} then a=a+1 if n{6} then b=b-1 if n{7} then b=b+1 n{4}=0 : n{5}=0 : n{6}=0 : n{7}=0 goto main read_pf_s if o{0} then a=a-1 if o{1} then a=a+1 if o{2} then b=b-1 if o{3} then b=b+1 o{0}=0 : o{1}=0 : o{2}=0 : o{3}=0 goto main read_pf_t if o{4} then a=a-1 if o{5} then a=a+1 if o{6} then b=b-1 if o{7} then b=b+1 o{4}=0 : o{5}=0 : o{6}=0 : o{7}=0 goto main Source: Anaconda.bas
  7. Hm, got it working somewhat now. There are a few times when the human still runs and hides in the walls but most times he bounces of them. Demo : Anaconda.bas.bin Source : Anaconda.bas Code: set kernel_options no_blank_lines dim level=p dim _P0_L_R = player0x.v dim _P0_U_D = player0y.w rem turn on smartbranching set smartbranching on level=1 rem a, b, c, d, e, f, g, h, i, k, l, m, n, o, s, t, u begin_level pfclear d=0 e=1 a=2 : b=1 c=1 : f=2 : g=1 h=10 : i=1 u=4 missile1x=26 : missile1y=15 k=0 : l=0 : m=0 : n=0 : o=0 q=0 : z{1}=0 s=2 : t=11 level_designs if level=1 then goto level_1 if level=2 then goto level_2 level_1 playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end player0: %00000000 %00100100 %00100100 %00011000 %01011010 %00111100 %00000000 %00011000 %00011000 end goto get_man_y level_2 playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X..............................X X..............................X X..............................X XXXXXXXXXX...XXXXXX...XXXXXXXXXX XXXXXXXXXX...XXXXXX...XXXXXXXXXX XXXXXXXXXX...XXXXXX...XXXXXXXXXX X............XXXXXX............X X............XXXXXX............X X............XXXXXX............X XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX end get_man_y if !z{0} then player0y=rand if player0y<15 then goto get_man_y if player0y>80 then goto get_man_y get_man_x if !z{0} then player0x=rand if player0x<20 then goto get_man_x if player0x>135 then goto get_man_x z{0}=1 main if q=10 then level=level+1 : goto begin_level rem snakeface down if d=4 then player1: %00111100 %01000010 %10000001 %10100101 %11111111 %11011011 %10111101 %11111111 %01111110 end rem snakeface up if d=3 then player1: %00111100 %01111110 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %01111110 end rem snakface right if d=2 then player1: %00111100 %01110010 %11100000 %11100001 %11110111 %11111101 %11111011 %11111111 %01111110 end if d=1 then player1: %00111100 %01001110 %00000111 %10000111 %11101111 %10111111 %11011111 %11111111 %01111110 end scorecolor=$D6 COLUPF=$D6 : COLUBK=$00 : COLUP1=$22 if level=1 then COLUP0=64 if level=2 then COLUP0=64 if joy0left then d=1 if joy0right then d=2 if joy0up then d=3 if joy0down then d=4 if d>0 then c=c+5 pfpixel f g on if !z{0} then goto get_man_y drawscreen if z{1} then r=r+1 if z{1} && r<20 then AUDV0=6 : AUDC0=12 : AUDF0=10 if z{1} && r>20 then r=0 : z{1}=0 : AUDV0=0 if d=1 && i=1 && c>30 then k{0}=1 if d=2 && i=1 && c>30 then k{1}=1 if d=3 && i=1 && c>30 then k{2}=1 if d=4 && i=1 && c>30 then k{3}=1 if d=1 && i=2 && c>30 then k{4}=1 if d=2 && i=2 && c>30 then k{5}=1 if d=3 && i=2 && c>30 then k{6}=1 if d=4 && i=2 && c>30 then k{7}=1 if d=1 && i=3 && c>30 then l{0}=1 if d=2 && i=3 && c>30 then l{1}=1 if d=3 && i=3 && c>30 then l{2}=1 if d=4 && i=3 && c>30 then l{3}=1 if d=1 && i=4 && c>30 then l{4}=1 if d=2 && i=4 && c>30 then l{5}=1 if d=3 && i=4 && c>30 then l{6}=1 if d=4 && i=4 && c>30 then l{7}=1 if d=1 && i=5 && c>30 then m{0}=1 if d=2 && i=5 && c>30 then m{1}=1 if d=3 && i=5 && c>30 then m{2}=1 if d=4 && i=5 && c>30 then m{3}=1 if d=1 && i=6 && c>30 then m{4}=1 if d=2 && i=6 && c>30 then m{5}=1 if d=3 && i=6 && c>30 then m{6}=1 if d=4 && i=6 && c>30 then m{7}=1 if d=1 && i=7 && c>30 then n{0}=1 if d=2 && i=7 && c>30 then n{1}=1 if d=3 && i=7 && c>30 then n{2}=1 if d=4 && i=7 && c>30 then n{3}=1 if d=1 && i=8 && c>30 then n{4}=1 if d=2 && i=8 && c>30 then n{5}=1 if d=3 && i=8 && c>30 then n{6}=1 if d=4 && i=8 && c>30 then n{7}=1 if d=1 && i=9 && c>30 then o{0}=1 if d=2 && i=9 && c>30 then o{1}=1 if d=3 && i=9 && c>30 then o{2}=1 if d=4 && i=9 && c>30 then o{3}=1 if d=1 && i=10 && c>30 then o{4}=1 if d=2 && i=10 && c>30 then o{5}=1 if d=3 && i=10 && c>30 then o{6}=1 if d=4 && i=10 && c>30 then o{7}=1 if i>s then i=1 if c>30 && d=1 then e=e+1 : f=f-1 : i=i+1 : h=h+1 : missile1x=missile1x-4 if c>30 && d=2 then e=e+1 : f=f+1 : i=i+1 : h=h+1 : missile1x=missile1x+4 if c>30 && d=3 then e=e+1 : g=g-1 : i=i+1 : h=h+1 : missile1y=missile1y-8 if c>30 && d=4 then e=e+1 : g=g+1 : i=i+1 : h=h+1 : missile1y=missile1y+8 j=j+1 if j=30 then u=(rand&3) : j=0 if d=2 then player1x=missile1x : player1y=missile1y+1 if d=3 then player1x=missile1x-3 : player1y=missile1y if d=4 then player1x=missile1x-3 : player1y=missile1y+7 if d=1 then player1x=missile1x-6 : player1y=missile1y+1 if u=0 then _P0_L_R=_P0_L_R+0.30 if u=1 then _P0_L_R=_P0_L_R-0.30 if u=2 then _P0_U_D=_P0_U_D+0.30 if u=3 then _P0_U_D=_P0_U_D-0.30 if u=0 && collision(player0,playfield) then u=1 if u=1 && collision(player0,playfield) then u=0 if u=2 && collision(player0,playfield) then u=3 if u=3 && collision(player0,playfield) then u=2 if player0x<20 then player0x=20 if player0x>135 then player0x=135 if player0y<20 then player0y=20 if player0y>80 then player0y=80 if c>30 && pfread(f,g) then goto begin_level if c>30 then c=0 if collision(player1,player0) then u=(rand&3) : score=score+1 : q=q+1 : z{0}=0 : z{1}=1 : s=s+1 : t=t+1 if c=0 && e>s then pfpixel a b off : e=50 : goto read_pf if d>0 && c<10 then AUDV1=6 : AUDC1=1 : AUDF1=15 else AUDV1=0 goto main read_pf if h>t then h=10 if h=10 then goto read_pf_k if h=11 then goto read_pf_l if h=12 then goto read_pf_m if h=13 then goto read_pf_n if h=14 then goto read_pf_o if h=15 then goto read_pf_p if h=16 then goto read_pf_q if h=17 then goto read_pf_r if h=18 then goto read_pf_s if h=19 then goto read_pf_t read_pf_k if k{0} then a=a-1 if k{1} then a=a+1 if k{2} then b=b-1 if k{3} then b=b+1 k{0}=0 : k{1}=0 : k{2}=0 : k{3}=0 goto main read_pf_l if k{4} then a=a-1 if k{5} then a=a+1 if k{6} then b=b-1 if k{7} then b=b+1 k{4}=0 : k{5}=0 : k{6}=0 : k{7}=0 goto main read_pf_m if l{0} then a=a-1 if l{1} then a=a+1 if l{2} then b=b-1 if l{3} then b=b+1 l{0}=0 : l{1}=0 : l{2}=0 : l{3}=0 goto main read_pf_n if l{4} then a=a-1 if l{5} then a=a+1 if l{6} then b=b-1 if l{7} then b=b+1 l{4}=0 : l{5}=0 : l{6}=0 : l{7}=0 goto main read_pf_o if m{0} then a=a-1 if m{1} then a=a+1 if m{2} then b=b-1 if m{3} then b=b+1 m{0}=0 : m{1}=0 : m{2}=0 : m{3}=0 goto main read_pf_p if m{4} then a=a-1 if m{5} then a=a+1 if m{6} then b=b-1 if m{7} then b=b+1 m{4}=0 : m{5}=0 : m{6}=0 : m{7}=0 goto main read_pf_q if n{0} then a=a-1 if n{1} then a=a+1 if n{2} then b=b-1 if n{3} then b=b+1 n{0}=0 : n{1}=0 : n{2}=0 : n{3}=0 goto main read_pf_r if n{4} then a=a-1 if n{5} then a=a+1 if n{6} then b=b-1 if n{7} then b=b+1 n{4}=0 : n{5}=0 : n{6}=0 : n{7}=0 goto main read_pf_s if o{0} then a=a-1 if o{1} then a=a+1 if o{2} then b=b-1 if o{3} then b=b+1 o{0}=0 : o{1}=0 : o{2}=0 : o{3}=0 goto main read_pf_t if o{4} then a=a-1 if o{5} then a=a+1 if o{6} then b=b-1 if o{7} then b=b+1 o{4}=0 : o{5}=0 : o{6}=0 : o{7}=0 goto main
  8. Yeah it's all pretty early so things are very basic and makeshift.I'll try out your idea with the +-1 movement instead and see how that goes. Extra lives are coming later on, and a better maze too.
  9. Okay, I found a solution to the problem. Now, in this version of "Snake" you eat people. And people move around so you have to chase them and eat them. Now, I have setup level 2 as bit of a maze and I was wondering if there is any elegant solution for preventing player0 from overlapping the walls? The first level is just a big empty square so there I have events that prevents player0 from going outside the screen by seeing if player0 is greater or lesser then certain x and y positions and if greater or lesser player0 is sent back to the last location. Like this: if player0x<20 then player0x=20 if player0x>135 then player0x=135 if player0y<20 then player0y=20 if player0y>80 then player0y=80 This is the movement code for the snake and the human. Player1 is the snake, player0 is the human: if c>30 && d=1 then u=(rand&3) : e=e+1 : f=f-1 : i=i+1 : h=h+1 : missile1x=missile1x-4 if c>30 && d=2 then u=(rand&3) : e=e+1 : f=f+1 : i=i+1 : h=h+1 : missile1x=missile1x+4 if c>30 && d=3 then u=(rand&3) : e=e+1 : g=g-1 : i=i+1 : h=h+1 : missile1y=missile1y-8 if c>30 && d=4 then u=(rand&3) : e=e+1 : g=g+1 : i=i+1 : h=h+1 : missile1y=missile1y+8 if c>30 then the snake moves 1 square. and u is selecting a random direction for the human to go too. This is the u values for the human: if u=0 then player0x=player0x+8 : u=4 if u=1 then player0x=player0x-8 : u=4 if u=2 then player0y=player0y+8 : u=4 if u=3 then player0y=player0y-8 : u=4 When u=4 then the human stands still. Any tips on how to get a wall detection system for the human? My own idea would be something like: if u=0 && collision(player0,playfield) then player0x=player0x-8 : u=4 if u=1 && collision(player0,playfield) then player0x=player0x+8 : u=4 if u=2 && collision(player0,playfield) then player0y=player0y-8 : u=4 if u=3 && collision(player0,playfield) then player0y=player0y+8 : u=4 Demo: Anaconda.bas.bin Source: Anaconda.bas
  10. Well, I can determine I can't program music at all, I suck at music, and I couldn't figure out a nice way to do near-hit colisions with more then 1 car on the screen, so I'm saying this game is complete for now atleast. As always, if you encounter bugs let me know so I can fix them.
  11. First of all I'd like to thank atari2600land for his work on his tapeworm game. It gave me huge information on how to deal with pfpixels. So I decided I wanted to do a snake game too, but this one will have something no other snake game has on the 2600. An actual head on the snake. I got the game licked I think, my only bug is that after you've grown a bit long your tail breaks off...I can't figure out why. Any ideas? Screenshot of the snakes very cool face: Bin : Anaconda.bin Source : Anaconda.bas
  12. Here's the setup. I'm doing a snake version where you are infinitely long, and you just continue painting the playfield in 1 color. So far so good. Now I was pondering about if it's possible to have a 2 player version where both players where of 2 different colors? The game idea is that you compete to cover the playfield with your own color. The player with the most covered playfield wins. Think: Splatoon demake.
  13. Thank you, that minikernel was a lifesaver
  14. Cheers for the tips! I'll decide on the paddles later, I don't think I can have both joysticks and paddles at the same time, that's beyond my coding knowledge at the moment. I've been working hard trying to do a small musical jingle for the screen where you advance to the next level, and I can say music is not something I am good at at all.
  15. A small 2 player pong game I made. It's my first 2 player game and I think it's a lot of fun. How to play: When the game starts the ball is neutral. Player1 controls the red paddle and player 2 controls the blue paddle. When either player hits the ball the arena and the ball turns into that players color and the other player has to stop the ball from entering the goal which is behind you. If player1 hit the ball last player1 gets 1 point. If player2 hit the ball last player2 gets 1 point. The first player to score 9 points is the winner! Then you can push reset or press the joystick button for a rematch! Controls: Push the joystick left and right to move your paddles. Press the resetswitch anytime you want to restart the game. EDIT : Fixed a small glitch DOWNLOAD : Zong.bin
  16. Retro Lord

    Zong

    A small 2 player pong game I made. It's my first 2 player game and I think it's a lot of fun. How to play: When the game starts the ball is neutral. Player1 controls the red paddle and player 2 controls the blue paddle. When either player hits the ball the arena and the ball turns into that players color and the other player has to stop the ball from entering the goal which is behind you. If player1 hit the ball last player1 gets 1 point. If player2 hit the ball last player2 gets 1 point. The first player to score 9 points is the winner! Then you can push reset or press the joystick button for a rematch! Controls: Push the joystick left and right to move your paddles. Press the resetswitch anytime you want to restart the game. Edit: Fixed a small glitch. DOWNLOAD - Zong.bin
  17. Okay! That cleared a lot of things up for me, I got ball movement and hit detection up and running perfectly. But I have yet another question about scoring with 2 players. I want 2 separate scores, one on the left side and one on the right side both starting at 0, and if respective player scores a point their score goes up. The only way I figured out how to do it is with sprite flicker and a counter, but that would take a little to much memory for my taste. Is there a better aproach to this?
  18. Got it working with the playfield now but it's a bit wonky when it comes to hitting the paddles, any pointers or ideas? if a=0 && joy0fire then a=1 rem ball going up and left if a=1 then ballx=ballx-1 : bally=bally-1 rem ball going up and right if a=2 then ballx=ballx+1 : bally=bally-1 rem ball going down and left if a=3 then ballx=ballx-1 : bally=bally+1 rem ball going down and right if a=4 then ballx=ballx+1 : bally=bally+1 if bally=10 && a=1 then a=3 if bally=10 && a=2 then a=4 if ballx<20 && a=3 then a=4 if ballx<20 && a=1 then a=2 if ballx>120 && a=2 then a=1 if ballx>120 && a=4 then a=3 if collision(ball,player0) && a=3 then a=2 if collision(ball,player0) && a=4 then a=1
  19. I'm having a bit of trouble with the ball movement in a pong game. I've set the ball movement up like this and it just gets stuck in the wall. There must be a better way? rem pushing the button starts the balls movement if a=0 && joy0fire then a=1 rem ball going up and left if a=1 then ballx=ballx-1 : bally=bally-1 rem ball going up and right if a=2 then ballx=ballx+1 : bally=bally-1 rem ball going down and left if a=3 then ballx=ballx-1 : bally=bally+1 rem ball going down and right if a=4 then ballx=ballx+1 : bally=bally+1 if collision(ball,playfield) && a=1 then a=3 if collision(ball,playfield) && a=2 then a=4 if collision(ball,playfield) && a=3 then a=4 if collision(ball,playfield) && a=4 then a=5 Entire code: set kernel_options no_blank_lines player1x=85 player1y=80 player0x=85 player0y=70 ballx=85 : bally=30 main playfield: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X X..............................X end player0: %11111111 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 end player1: %11111111 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 end COLUPF=$0E COLUP0=$0E COLUP1=$0E NUSIZ0=$30 NUSIZ1=$30 ballheight = 2 : rem * Ball 4 pixels high. CTRLPF = $21 : rem * Ball 4 pixels wide. drawscreen if a=0 && joy0fire then a=1 rem ball going up and left if a=1 then ballx=ballx-1 : bally=bally-1 rem ball going up and right if a=2 then ballx=ballx+1 : bally=bally-1 rem ball going down and left if a=3 then ballx=ballx-1 : bally=bally+1 rem ball going down and right if a=4 then ballx=ballx+1 : bally=bally+1 if collision(ball,playfield) && a=1 then a=3 if collision(ball,playfield) && a=2 then a=4 if collision(ball,playfield) && a=3 then a=4 if collision(ball,playfield) && a=4 then a=5 if joy0left then player0x=player0x-1 if joy0right then player0x=player0x+1 if joy1left then player1x=player1x-1 if joy1right then player1x=player1x+1 goto main
  20. Okay, I got paddle controls figured out, contemplating if I should use it. Did a small game demo with it to learn and it seemed weird to me, but I've never used paddle controllers before. Are there any racing games for the 2600 I should play to get a feel for the paddle controllers?
  21. Okay! I installed the latest version of Stella and now it works after fiddling about with the settings. My version must've been to old, hehe.
  22. Yeah I looked them over, and as far as I see I've set things up like in the examples. I also tried playing the example games in Stella and I could not get paddle controls to work with them either so it must be something wrong with Stella. I tried setting up the controllers like your page said. I'm using version 4.2 of Stella.
×
×
  • Create New...