-
Content Count
163 -
Joined
-
Last visited
Content Type
Profiles
Member Map
Forums
Blogs
Gallery
Calendar
Store
Everything posted by Captain Spazer
-
Pfpixel height and screen resolution
Captain Spazer replied to Captain Spazer's topic in batari Basic
Phew, well, I'm slowly but steadely getting into this whole DPC+ thing, and I've almost managed to convert my whole project over, DPC+ is just so amazing, I don't know what I was afraid of XD -
Pfpixel height and screen resolution
Captain Spazer replied to Captain Spazer's topic in batari Basic
Ahh, tnak you so much, I missed that one =) -
Pfpixel height and screen resolution
Captain Spazer replied to Captain Spazer's topic in batari Basic
Cheers, mates. I've just booted up with the DPC+, and it feels daunting. Anyway, first things first: How do I scroll the playfield left or right? The normal vbb way of doing it is obsolete it seems =) -
I can't really grasp how this works exactly. I'm trying to make it so that the resolution is fullscreen and so that the pfpixels are much thinner but I can't figure out how it works really, I've experimented alot and either things glitch out, nothing happens or I end up with a very narrow screen height. Using const pfrowheight=3 gets the pfpixels to the size I want but the screen gets squished, how do I combo up to get a fullscreen resolution with this? const pfres=32 gets the screen to the desired size but the pf gets all jumbled.
-
Explanation os pfheight?
Captain Spazer replied to Captain Spazer's topic in 2600 Programming For Newbies
Oh, sorry man! -
I could use a deeper explanation of pfheight and how it works, I'm trying to figure out how to get thinner pfpixels with fullscreen resolution. Sure I can just copy some code from examples, but I want to understand it and for that I need a deeper explanation.
-
This game is a masterpiece, easy on my top 10 list of the best atari 2600 games! I would like to ask a question: How did you manage the speed up difficulty? I'm struggling with that feature in my games.
-
I'm getting a weird glitch with my pfscore 2, I'm using it as a timer so it's set to 255. Sometimes it works as it should, but sometimes it's like it gets flipped and overlaps the score, and I'm sometimes having issues with pfscore1 too, it's set to 21 to indicate lives, sometimes when a life is lost they jump a little to the right and behaves in a weird way. Any ideas what I've done wrong? This is a techdemo in the style of a WarioWare game, a timer counts down from 3 then a random microgame starts, if you win it you are awarded 1 point, if you fail you lose a life, rince and repeat with 4 microgames. Code: title drawscreen if switchreset then goto reset goto title reset score=0 a=0 b=0 c=0 d=0 e=0 f=0 g=0 h=0 i=0 j=0 k=0 l=0 m=0 n=0 o=0 p=0 q=0 r=0 s=0 t=0 o=0 p=0 q=0 r=0 s=0 t=0 u=0 v=0 w=0 x=0 y=0 set smartbranching on const pfscore=1 pfscore1 = 21 pfscore2 = 255 dim rand16 = z const font = retroputer countdown scorecolor=$0E pfscore2=0 pfclear COLUBK=$00 ballx=255 : bally=255 player1x=255 : player1y=255 player0x=255 : player0y=255 AUDV0=0 COLUPF=$00 b=0 c=0 d=0 e=0 f=0 g=0 h=0 i=0 j=0 k=0 l=0 m=0 n=0 o=0 p=0 q=0 r=0 s=0 t=0 o=0 p=0 q=0 r=0 s=0 t=0 u=0 v=0 w=0 x=0 y=0 COLUP0=$0E NUSIZ0=$07 player0x=70 : player0y=50 a=a+1 if a>0 && a<60 then player0: %00000000 %01000000 %10100000 %00100000 %01000000 %00100000 %10100000 %01000000 end if a>60 && a<120 then player0: %00000000 %11100000 %10000000 %10000000 %01000000 %00100000 %10100000 %01000000 end if a>120 && a<240 then player0: %00000000 %11100000 %01000000 %01000000 %01000000 %01000000 %11000000 %01000000 end if a=240 then b=(rand&7) if a=240 && b=0 then goto GAME1_SETUP if a=240 && b=1 then goto GAME2_SETUP if a=240 && b=2 then goto GAME3_SETUP if a=240 && b=3 then goto GAME3_SETUP if a=240 && b=4 then goto GAME4_SETUP if a=240 && b=5 then goto GAME4_SETUP if a=240 && b=6 then goto GAME4_SETUP if a=240 && b=7 then goto GAME4_SETUP drawscreen if pfscore2>255 then pfscore2=255 if switchreset then goto reset goto countdown rem game1 = Sky Diver GAME1_SETUP COLUBK=$00 a=0 b=0 c=0 d=1 e=0 f=0 g=0 h=0 i=0 j=0 k=0 l=0 m=0 n=0 o=0 p=0 q=0 r=0 s=0 t=0 o=0 p=0 q=0 r=0 s=0 t=0 u=0 v=0 w=0 x=0 y=0 pfclear pfscore2 = 255 player1x=255 : player1y=255 player0x=130 : player0y=20 ballx = rand : bally=79 GAME1 scorecolor=$0E ballheight=2 CTRLPF = $30 player0: %00000000 %00001000 %00011000 %01111111 %11111111 %00000011 %00000001 %00000000 end if c=0 then player1: %00100100 %00011000 %00111100 %00011000 %00011000 %00000000 %00000000 %00000000 end if c=1 then player1: %01111110 %01100000 %00000000 %00000000 %00000000 %00000000 %00000000 %00000000 end rem the landing zone logic if ballx<20 then ballx=255 : bally=255 if ballx>130 then ballx=255 : bally=255 if ballx=255 && bally=255 then bally=80 : ballx=rand COLUPF=rand rem timer logic e=e+1 if e=60 then pfscore2 = pfscore2/4 : e=0 pfscorecolor=$0E rem airplane logic if a=0 then player0x=player0x-1 if a=0 && player0x<1 then player0x=135 rem skydiver logic if a=0 && b=0 && joy0fire then b=1 if b=1 then player1x=player0x+4 : player1y=player0y : b=2 if b=2 then player1y=player1y+1 if player1y=80 then b=3 if b=3 then player1y=player1y : c=1 : d=1 if collision(player1,ball) then b=4 : player1y=79 if b=4 then d=0 : player1y=player1y : c=0 if pfscore2=0 && d=1 then pfscore1 = pfscore1/2 : goto countdown if pfscore2=0 && d=0 then score=score+1 : goto countdown NUSIZ0=$05 COLUP0=$0E COLUP1=$0E drawscreen if pfscore2>255 then pfscore2=255 if pfscore1=0 then goto gameover if switchreset then goto reset goto GAME1 rem William Tell GAME2_SETUP COLUBK=$00 a=0 b=0 c=0 d=1 e=0 f=0 g=0 h=0 i=0 j=0 k=0 l=0 m=0 n=0 o=0 p=0 q=0 r=0 s=0 t=0 o=0 p=0 q=0 r=0 s=0 t=0 u=0 v=0 w=0 x=0 y=0 ballheight=0 pfclear pfscore2 = 255 player1x=120 : player1y=10 player0x=20 : player0y=65 ballx = 85 : bally=20 rem bow & arrow GAME2 CTRLPF = $30 COLUP0=$0E scorecolor=$0E COLUPF=$0E COLUP1=$0E player0: %00000110 %00001010 %00010010 %00010010 %00010010 %00010010 %00001010 %00000110 end if a=0 then player1: %00100100 %00011000 %00111100 %00011000 %00011000 %00000000 %00000000 %00000000 end if a=1 then player1: %01111110 %01101000 %00001000 %00001000 %00000000 %00000000 %00000000 %00000000 end if a=1 then REFP1=8 drawscreen if pfscore2>255 then pfscore2=255 if b=0 then ballx=player0x+4 : bally=player0y-4 if c=0 then player1y=player1y+1 if b=0 && joy0fire then b=1 if b=1 then ballx=ballx+3 if b=1 && ballx>135 then ballx=255 : bally=255 : d=1 : b=2 if collision(ball,player1) then b=2 : ballx=255 : bally=255 : a=1 : d=0 : c=1 if c=0 && player1y>90 then player1y=0 CTRLPF = $30 rem timer logic e=e+1 if e=60 then pfscore2 = pfscore2/4 : e=0 pfscorecolor=$0E if pfscore2=0 && d=1 then pfscore1 = pfscore1/2 : goto countdown if pfscore2=0 && d=0 then score=score+1 : goto countdown if b=0 && joy0up && player0y>20 then player0y=player0y-1 if b=0 && joy0down && player0y<80 then player0y=player0y+1 if pfscore1=0 then goto gameover if switchreset then goto reset goto GAME2 rem find me GAME3_SETUP COLUBK=$00 a=0 b=0 c=0 d=1 e=0 f=0 g=0 h=0 i=0 j=0 k=0 l=0 m=0 n=0 o=0 p=0 q=0 r=0 s=0 t=0 o=0 p=0 q=0 r=0 s=0 t=0 u=0 v=0 w=0 x=0 y=0 pfclear pfscore2 = 255 player0x=rand : player0y=rand player1x=75 : player1y=80 ballx = 255 : bally=255 game3 COLUP1=$2E COLUP0=$00 NUSIZ1=$07 player1: %01111110 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %11111111 %01111110 end player0: %10100101 %10100101 %10011111 %01111110 %00111101 %00011001 %01111101 %01111010 %00101010 %00011100 %00000000 %00000000 end NUSIZ0=$05 drawscreen if pfscore2>255 then pfscore2=255 if player1x<20 then player1x=20 if player1x>128 then player1x=128 if player1y>80 then player1y=80 if player1y<20 then player1y=20 if player0x<20 then player0x=255 : player0y=255 if player0x>130 then player0x=255 : player0y=255 if player0y<20 then player0x=255 : player0y=255 if player0y>80 then player0x=255 : player0y=255 if player0x=255 && player0y=255 then player0y=rand : player0x=rand if g=0 && joy0up then player1y=player1y-2 if g=0 && joy0down then player1y=player1y+2 if g=0 && joy0left then player1x=player1x-2 if g=0 && joy0right then player1x=player1x+2 rem timer logic e=e+1 if e=60 then pfscore2 = pfscore2/4 : e=0 pfscorecolor=$0E if pfscore2=0 && d=1 then pfscore1 = pfscore1/2 : goto countdown if pfscore2=0 && d=0 then score=score+1 : goto countdown if collision(player1,player0) then d=0 : g=1 : COLUBK=$26 if pfscore1=0 then goto gameover if switchreset then goto reset goto game3 GAME4_SETUP COLUBK=$00 a=0 b=0 c=0 d=1 e=0 f=0 g=0 h=0 i=0 j=0 k=0 l=0 m=0 n=0 o=0 p=0 q=0 r=0 s=0 t=0 o=0 p=0 q=0 r=0 s=0 t=0 u=0 v=0 w=0 x=0 y=0 pfclear pfscore2 = 255 player0x=75 : player0y=80 player1x=20 : player1y=50 ballx = 255 : bally=255 rem crab game4 player0: %10000100 %01000010 %11111111 %01111110 %10011001 %11000011 %10000001 %11000011 end player1: %00000000 %00000000 %10001100 %11011110 %01111111 %11011010 %10001100 %00000000 end if a=0 then REFP0=0 if a=1 then REFP0=8 COLUP1=$BE rem fish a.i if r=0 then REFP1=0 if r=1 then REFP1=8 if r=0 then player1x=player1x+1 if player1x=130 then r=1 if r=1 then player1x=player1x-1 if player1x=20 then r=0 COLUP0=$33 rem crab animation b=b+1 if b=30 then a=a+1 : b=0 if a=2 then a=0 rem timer logic e=e+1 if e=60 then pfscore2 = pfscore2/4 : e=0 pfscorecolor=$0E drawscreen if pfscore2>255 then pfscore2=255 if pfscore2=0 && d=1 then pfscore1 = pfscore1/2 : goto countdown if pfscore2=0 && d=0 then score=score+1 : goto countdown if p=0 && joy0right then player0x=player0x+1 if p=0 && joy0left then player0x=player0x-1 rem catch fish if collision(player0,player1) then d=0 : r=2 if r=2 then player1x=player0x : player1y=player0y-8 if player0x<20 then player0x=20 if player0x>130 then player0x=130 rem jump mechanic if p=0 && joy0fire then p=1 if p=1 then player0y=player0y-1 if p=1 && player0y=50 then p=2 if p=2 then player0y=player0y+1 if p=2 && player0y=80 then p=0 if pfscore1=0 then goto gameover if switchreset then goto reset goto game4 gameover pfclear player0x=255 : player0y=255 player1x=255 : player1y=255 ballx=255 : bally=255 scorecolor=rand if switchreset then goto reset drawscreen pfscorecolor=$00 goto gameover
-
Can't get horizontal scrolling to work properly
Captain Spazer replied to Captain Spazer's topic in batari Basic
Ahh, I see. Hm, I'll see if I can solve it with that information, I don't want too much help on this one yet since I feel I can figure this one out, if I'm wrong I'll shout out again =) -
Can't get horizontal scrolling to work properly
Captain Spazer replied to Captain Spazer's topic in batari Basic
Another question regarding pfscroll, I have some issues wih having the pfscroll, I get a glitch when I'm trying to do pfscroll down and pfscroll right. I'm using pfheight 8. When the screen ha scrolled down a bit the bottom half gets filled with a huge block of pixels. What gives? set kernel_options pfcolors pfheights dim _Scroll_Control = w pfheights: 8 3 3 3 3 3 3 3 3 3 53 end pfcolors: $00 $44 $46 $48 $1A $1C $1E $C6 $C8 $CA $44 $46 $48 $1A $1C $1E $C6 $C8 $CA $00 end __Start_Restart ;*************************************************************** ; ; Mutes volume of both sound channels. ; AUDV0 = 0 : AUDV1 = 0 ;*************************************************************** ; ; Clears 25 of the normal 26 variables (fastest way). ; a = 0 : b = 0 : c = 0 : d = 0 : e = 0 : f = 10 : g = 0 : h = 0 : i = 0 j = 0 : k = 0 : l = 0 : m = 0 : n = 0 : p = 0 : q = 0 : r = 0 s = 0 : t = 0 : u = 0 : v = 0 : w = 0 : x = 0 : y = 0 ;*************************************************************** ; ; Draws the blocks. ; playfield: ................................ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ................................ end main if collision(missile0,player1) then o=o+1 : missile0x=255 : missile0y=255 : g=1 : q=60 if g=1 then h=h+1 if g=1 && h=60 then score=score+100 : goto __Start_Restart if h>0 then COLUBK=rand else COLUBK=$00 rem makes sound when Master Computer is destroyed if q>1 then AUDV1 = 10 : AUDC1 = 8 : AUDF1 = 16 if q<1 then AUDV1=0 if q>0 then q=q-1 rem Master Computer's shield logic if o=1 && _Scroll_Control = 28 then pfscroll right : pfscroll down : _Scroll_Control = 0 if o=2 && _Scroll_Control = 20 then pfscroll right : _Scroll_Control = 0 if o=3 && _Scroll_Control = 12 then pfscroll right : _Scroll_Control = 0 if o=4 && _Scroll_Control = 4 then pfscroll right : _Scroll_Control = 0 if o>0 then _Scroll_Control = _Scroll_Control + 1 drawscreen goto main -
Okay, thanks guys. I managed to get a routine going, one step closer to completion =)
-
That's true, but it's my main key feature so I'm starting with a playfield that speeds up =)
-
Thanks!
-
Ahhh, that explains alot!
-
Sorry for asking so many questions, but I got yet another one: How would I go about if I wanted to scale the difficulty an infinite amount, or rather, up the speed too it's absolutely fastest? I usualy do difficulty by something like "If BOSS is hit, then a=a+1, and a contains a set speed of a sprite or something. But that is really not efficient. What I want to know is, can it be done so that the playfield scrolls faster and faster? My current logics for the pfscroll is this but it dosn't speed up. dim _Scroll_Control = w rem Master Computer's shield logic if _Scroll_Control = 28 then pfscroll right : _Scroll_Control = 0 gosub SPEED_UP SPEED_UP _Scroll_Control = _Scroll_Control + 1 return
-
Thanks dude! This was much easier to understand! I actually get it now! I'm so happy that I can finaly make the games I always wanted! You will get a special mention in my upcoming games as thanks for the help =)
-
Appreciate it, man =)
-
Understanding pfpixels is hard
-
Hm, I can't quite figure it out, could I trouble you for a simpler example? Something with just the bare minimum, like just some blocks, a player that shoots when joy0fire is pressed and with just the calculations for a pfpixel collision? EDIT This is what I gathered from the breakout example. I'm not getting any errors but I don't get any pixels dissapearing either, am I on the right track atleast? pfhline 0 2 31 on dim _pf_x = t dim _pf_y = u dim _M0_x = missile0x.s dim _M0_y = missile0x.r main drawscreem if _pf_x = _M0_x && _pf_y = _M0_y then pfpixel 3 1 off goto main
-
Oooh, that makes it easier. Thanks friend. You helped me alot =)
-
This is the way I do it: rem Makes for better randomization dim rand16 = x rem random location for generic monster if player1x<=5 then player1x=255 : player1y=255 : n=(rand&1) : player1y=rand if player1x>=140 then player1x=255 : player1y=255 : n=(rand&1) : player1y=rand if player1y<20 then player1x=255 : player1y=255 : n=(rand&1) : player1y=rand if player1y>80 then player1x=255 : player1y=255 : n=(rand&1) : player1y=rand rem makes the generic monster move depending on what n decides if n=0 then player1x=140 : n=2 if n=2 then _P1_L_R=_P1_L_R-0.25 if n=1 then player1x=5 : n=3 if n=3 then _P1_L_R=_P1_L_R+0.25 main drawscreen goto main
-
Thanks. It's a bit tricky but I'll figure it out eventually. Basically from what I understand, I need dim _pf_x = t, dim _pf_y = u in order to check for the playfields x and y values, and do the same for my ball object, and if my ball object collides with the playfield the game would check the x and y values and if it's a hit then pfpixel _pf_x _pf_y off. Am I somewhat getting it? =)
-
Generic question about games like breakout and the like. How do I go about making something like that? When a ball or missile collides with a pfpixel it turns off. Do I do something like this? I defined a wall like this: rem player1 wall pfpixel 30 1 on pfpixel 30 2 on pfpixel 30 3 on pfpixel 30 4 on pfpixel 30 5 on pfpixel 30 6 on pfpixel 30 7 on pfpixel 30 8 on
-
I've hit another snag. In this game, when player1 is hit with missile0 it goes offscreen and gets a random y position and a semi random x position. Anyway, that's what's supposed to happen. But instead of going offscreen too determine x and y position it does it onscreen and it makes for a weird rolling effect on the enemy sprite, what did I do wrong here? It works for player 2 and player 3. The code that's glitchy. I know it's extremely big and clunky, but it was the only way I could make hit detection work for all 3 player sprites, and I'm out of variables. On a sidenote: Is there any tricks on using less variables? q=player2x-8 r=player2x+18 s=player2y+1 t=player2y-8 u=player3x-8 d=player3x+18 v=player3y+1 w=player3y-8 rem makes player1 move if n=0 then player1x=140 : n=2 if n=2 then _P1_L_R=_P1_L_R-0.25 if n=1 then player1x=5 : n=3 if n=3 then _P1_L_R=_P1_L_R+0.25 rem random location for player1 if player1x<=5 then player1x=255 : player1y=255 : n=(rand&1) : player1y=rand if player1x>=140 then player1x=255 : player1y=255 : n=(rand&1) : player1y=rand if player1y<20 then player1x=255 : player1y=255 : n=(rand&1) : player1y=rand if player1y>80 then player1x=255 : player1y=255 : n=(rand&1) : player1y=rand rem makes player2 move if o=0 then player2x=140 : o=2 if o=2 then _P2_L_R=_P2_L_R-0.50 if o=1 then player2x=5 : o=3 if o=3 then _P2_L_R=_P2_L_R+0.50 rem random location for player2 if player2x<=5 then player2x=255 : player2y=255 : o=(rand&1) : player2y=rand if player2x>=140 then player2x=255 : player2y=255 : o=(rand&1) : player2y=rand if player2y<20 then player2x=255 : player2y=255 : o=(rand&1) : player2y=rand if player2y>80 then player2x=255 : player2y=255 : o=(rand&1) : player2y=rand rem makes player3 move if p=0 then player3x=140 : p=2 if p=2 then _P3_L_R=_P3_L_R-1.00 if p=1 then player3x=5 : p=3 if p=3 then _P3_L_R=_P3_L_R+1.00 rem random location for player3 if player3x<=5 then player3x=255 : player3y=255 : p=(rand&1) : player3y=rand if player3x>=140 then player3x=255 : player3y=255 : p=(rand&1) : player3y=rand if player3y<20 then player3x=255 : player3y=255 : p=(rand&1) : player3y=rand if player3y>80 then player3x=255 : player3y=255 : p=(rand&1) : player3y=rand rem shoot player1 if collision(missile0,player1) && missile0y=player1y then player1x=254 : player1y=254 : j=0 : score=score+10 : c=c+1 if collision(missile0,player1) && missile0y=player1y+1 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 if collision(missile0,player1) && missile0y=player1y+2 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 if collision(missile0,player1) && missile0y=player1y+3 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 if collision(missile0,player1) && missile0y=player1y+4 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 if collision(missile0,player1) && missile0y=player1y+5 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 if collision(missile0,player1) && missile0y=player1y+6 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 if collision(missile0,player1) && missile0y=player1y+7 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 if collision(missile0,player1) && missile0y=player1y+8 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 if collision(missile0,player1) && missile0y=player1y-1 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 if collision(missile0,player1) && missile0y=player1y-2 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 if collision(missile0,player1) && missile0y=player1y-3 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 if collision(missile0,player1) && missile0y=player1y-4 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 if collision(missile0,player1) && missile0y=player1y-5 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 if collision(missile0,player1) && missile0y=player1y-6 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 if collision(missile0,player1) && missile0y=player1y-7 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 if collision(missile0,player1) && missile0y=player1y-8 then player1x=254 : player1y=254 : j=0 : score=score+5 : c=c+1 This code works for player 2 & player 3: rem shoot player2 if missile0x>q && missile0x<r && missile0y<s && missile0y>t then player2x=255 : player2y=255 : j=0 : score=score+10 : c=c+1 rem shoot player3 if missile0x>u && missile0x<d && missile0y<v && missile0y>w then player3x=255 : player3y=255 : j=0 : score=score+50 : c=c+1 The entire code: Monster_Safari.bas
-
Thanks for the tip, worked like a charm!
