Jump to content

Coolcrab

Members
  • Posts

    427
  • Joined

  • Last visited

Posts posted by Coolcrab

  1. I guess that the name can be confusing.

     

    I was also thinking of changing the score mechanics as to give you X points, and make them go down when observing the star. With each successful observation you need to work away more points and maybe the cloud moves faster. What do you think? (assuming that you tried it)

  2. I finally got some time to spend on this again. :) I managed to make the line move smooth from lower left to lower right and added in a star that the player needs to track. But its too fast and flies horizontally now.

     

    I was wondering if it is possible to make payer0 rotate around a certain coordinate. Preferably some star appears somewhere in the lower left corner with a random y coordinate and then rises and sets around say the lower central point. (where the telescope is.)

     

    Other than that, as far as I understand I can draw 2 stars at a time. Player1 and 2. Is it possible to draw any more if they behave the same anyway?

     

     

    astronomerV0.35.bin

    • Like 1
  3.  

    Here I've rearranged your code some.

     

    Ok I understand most of your code, but I was wondering how you came up with the equation for limiting p between 0-31. Is there a reason that its all div 2 and div4 instead of 53p/128? I assume there is some limit to the math the atari can do?

     

    The code you gave is perfect, apart from the fact that the y position is changed with up and down. I want to add 3 if statements that make it go down in y when it reaches 0,0 and the player still presses left and the same for (31,0). Sothat you can swoop the entire border with just 2 directions. (soon to be paddles hopefully.) But since the range for x1 needs to be extended from 0-31 to 0-47 he equation you gave is not correct. 5p/8 should do the trick but it doesn't. Should I write this as something with only two's?

     

    I've tried to recreate your process in my code and it works reasonably but I get catastrophic failure if I split the movement like this.

    enter
     xpos=14 :  ypos=9 
     pfpixel xpos ypos on
     x0 = xpos : y0 = ypos
     if x < 8 then x1 = 0 : y1 = 8-x
     if x> 7 && x < 37 then x1 = x-8  :  y1 = 0
     if x > 36 && x < 44 then x1=29 : y1=36-x
     if x> 45 then x1 = 29 : y1 = 8
     gosub setup_move
     goto pf
    However it just jumps all over the place and even makes sound if i got off screen far enough. :P I'll keep puzzling, but if anyone sees anything stupid please tell me.
  4.  

    Here I've rearranged your code some.
    I added some code to test if any of the joy0 RLDU are pressed and
    skip the line drawing if not
    joy0 is bits 7..4 of SWCHA and a bit reads 0 if it's active
    so it inverts SWCHA, masks for bits 7..4 and loops back if none are 1
    I used variables p and q and let p range from 0..75 and q 0..20
    p is then scaled by 13/32 to get 0..31 for x
    and q is divided by 2 to get 0..10 for y
    that's just to to show one way of dealing with a range of 0..77
    and I added a test to see if x, y have changed no need to draw the (same) line again if not
    I added a test to end the line when we've reached the right point in the major direction
    not sure you'll always be at the right spot in the minor direction
    initializes ea to 1/2 the delta for better accuracy and symmetry
    added a custom point plotting bit to improve the speed
    added a custom routine to clear the playfield
    I rewrote the line drawing for better speed but it still goes over time on long lines
    if you're also doing the score so I split the line drawing, putting x,y in the score
    and reading joy0 among different frames
     
     
     
      set kernel_options no_blank_lines readpaddle
     
      drawscreen
     
      dim ea = a
      dim dy = b
      dim dx = c
      dim state = w
      dim x1 = temp1
      dim x0 = temp2
      dim y1 = temp3
      dim y0 = temp4
      dim ep = temp3
      dim xinc = temp4
      dim yinc = temp5
      dim delay = h
      dim rand16 = z
      dim xpos = k
      dim ypos = l
      dim sc1 = score
      dim sc2 = score + 1
      dim sc3 = score + 2
     
     
      x = 0
      y = 0
      t = 0
     
     
      player0:
      %11000000
      %11000000
      %00000000
      %00000000
      %00000000
      %00000000
      %00000000
      %00000000
    end
     
      player1:
      %11110000
      %11110000
      %11110000
      %11110000
      %00000000
      %00000000
      %00000000
      %00000000
    end
     
      COLUPF = $62
      scorecolor = $2A
     
     
     
      state = 1
     
     
    mainloop
      COLUP0 = $1C
      COLUP1 = $B4
      drawscreen
     
      on state goto readjoy drawline doscore     ; drawing the line just about takes all of one frames worth of program time
     
     
     
      goto mainloop
     
     
     
    readjoy
     
      temp1 = (SWCHA ^ $FF) & $F0                ; tests for joy0 RLDU active 
      if !temp1 then mainloop                    ; predicate true iff temp1 = 0  goto not needed if we're within 128 bytes (and it's the only statement)
      if joy0up    && q >  0 then q = q - 1 
      if joy0down  && q < 20 then q = q + 1 
      if joy0left  && p >  2 then p = p - 3      ; p is meant to emulate a paddle (sort of) increments by 3 for speed of movement 
      if joy0right && p < 75 then p = p + 3      ; which with the scaling makes the movement a little jerky
     
      x1 = (((p/4 + p)/4 + p)/2 + p)/4           ; scales p by 13/32 to get 0..31
      y1 = q/2                                   ; and has the effect of slowing the movement ie 2 frames/q's to change y by one
      if x1 = x && y1 = y then goto mainloop     ; no need to draw the line if x and y haven't changed
      x = x1 : y = y1
     
      state = 1 : goto mainloop
     
    doscore
      temp6 = x : gosub leftsc                 ; puts x in the left three digits of score
      temp6 = y : gosub rightsc                ; puts y in the right three digits of score
      state = 0
      goto mainloop 
     
     
    drawline
     
      x0 = 14 : y0 = 9 : x1 = x : y1 = y
     
      gosub clpf
     
    setup_line
     
      if x0 < x1 then f{2} = 1 : dx = x1 - x0 else f{2} = 0 : dx = x0 - x1
      if y0 < y1 then f{1} = 1 : dy = y1 - y0 else f{1} = 0 : dy = y0 - y1
     
      xpos = x0 : ypos = y0
     
      if dx > dy then xmajor
     
      ; initializes ea to 1/2 for better accuracy, symmetry
      f{0} = 0 : xinc = xinc_tbl[f] : yinc = yinc_tbl[f] : ea = dy/2 : ep = y1
      goto yentry
     
    yloop
      ypos = ypos + yinc
      temp1 = ea
      ea = ea - dx
      if temp1 < ea then ea = ea + dy : xpos = xpos + xinc 
     
    yentry
     
      ;  plots a pf pixel
      temp1 = xpos/8
      temp1 = ypos * 4 | temp1
      temp2 = xpos & $0F
      var0[temp1] = var0[temp1] | setbyte[temp2]    ; setbyte is the kernel table for setting playfield bits
     
      if ypos <> ep then yloop                      ; loops if not at end in major direction in this case y but not sure it wont miss its x
      state = 2 : goto mainloop 
     
     
    xmajor
      f{0} = 1 : xinc = xinc_tbl[f] : yinc = yinc_tbl[f] : ea = dx/2 : ep = x1
      goto xentry
     
    xloop
      xpos = xpos + xinc  
      temp1 = ea
      ea = ea - dy
      if temp1 < ea then ea = ea + dx : ypos = ypos + yinc
     
    xentry
     
      ;  plots a pf pixel
      temp1 = xpos/8
      temp1 = ypos * 4 | temp1
      temp2 = xpos & $0F
      var0[temp1] = var0[temp1] | setbyte[temp2]
     
      if xpos <> ep then xloop
      state = 2 : goto mainloop 
     
     
      data yinc_tbl
      $FF, $FF, $01, $01, $FF, $FF,$01, $01
    end
     
      data xinc_tbl
      $FF, $FF, $FF, $FF, $01, $01, $01, $01
    end
     
     
    pf
      playfield:
      ................................
      ................................
      ................................
      ................................
      ................................
      ................................
      ................................
      ................................
      ................................
      ................................
      ................................
    end
      return
     
     
      ;  fastest way to clear playfield
    clpf
      var0=0:var1=0:var2=0:var3=0:var4=0:var5=0:var6=0:var7=0:var8=0:var9=0:var10=0:var11=0:var12=0:var13=0:var14=0:var15=0:var16=0:var17=0:var18=0:var19=0:var20=0:var21=0:var22=0
      var23=0:var24=0:var25=0:var26=0:var27=0:var28=0:var29=0:var30=0:var31=0:var32=0:var33=0:var34=0:var35=0:var36=0:var37=0:var38=0:var39=0:var40=0:var41=0:var42=0:var43=0
      return
     
     
    leftsc
       sc1 = 0 : sc2 = sc2 & 15
       if temp6 >= 100 then sc1 = sc1 + 16 : temp6 = temp6 - 100
       if temp6 >= 100 then sc1 = sc1 + 16 : temp6 = temp6 - 100
       if temp6 >=  50 then sc1 = sc1 +  5 : temp6 = temp6 -  50
       if temp6 >=  30 then sc1 = sc1 +  3 : temp6 = temp6 -  30
       if temp6 >=  20 then sc1 = sc1 +  2 : temp6 = temp6 -  20
       if temp6 >=  10 then sc1 = sc1 +  1 : temp6 = temp6 -  10
       sc2 = (temp6 * 4 * 4) | sc2
      return
     
    rightsc
       sc2 = sc2 & 240 : sc3 = 0
       if temp6 >= 100 then sc2 = sc2 +  1 : temp6 = temp6 - 100
       if temp6 >= 100 then sc2 = sc2 +  1 : temp6 = temp6 - 100
       if temp6 >=  50 then sc3 = sc3 + 80 : temp6 = temp6 -  50
       if temp6 >=  30 then sc3 = sc3 + 48 : temp6 = temp6 -  30
       if temp6 >=  20 then sc3 = sc3 + 32 : temp6 = temp6 -  20
       if temp6 >=  10 then sc3 = sc3 + 16 : temp6 = temp6 -  10
       sc3 = sc3 | temp6
      return
     
     
    busy
      COLUP0 = $1C
      COLUP1 = $B4
      drawscreen
      goto busy
     
     
    

     

    Wow this is great! I'll play around with it when I'm home tonight. Amazing how smooth it runs

  5. Ok I'm getting there as it now responds to the paddle and can move around. However as soon as I limit the value of paddle tot 29 (Or whatever other number) it gets stuck at one value and does not respond anymore. Am I missing something with how the paddle works? As far as I can see it should have a value between 0 and 77 so it should be easily capped if I say 'if x > 29 then x = 29' right?

     

     

    astronomerV0.3.bas

  6. You have "goto center" but the label is "enter"

    Wow good call I missed that, but it still does not seem to react properly. I also hooked paddle to score to see how it behaves, but it stays at 64. (score = paddle) (And I changed the stella settings to use a paddle instead of a joystick in the settings.)

     

    Once that is done I think its just a matter of normalizing the paddle output and bam.

  7.  

    You could adapt this to draw lines (Bresenhams algorithm is for drawing lines)

    I don't know if it would be fast enough

     

    I'd do the pixel setting and clearing in bB for speed

    Yes thank you, this is also what I found on stack overflow. I'm trying to implement the code to draw squares but i'm messing up and not sure how to fix it. Instead of an object I make a variable xpos, ypos that 'walks' to the chosen coordinate and whenever it is not touching the playfield it turns the pfpixel to on. Then when it reaches the desired position it stops altogether. This is fast and perfect..

     

    Now I am trying to couple this to a paddle, but it seems not to accept the paddle keyword. (And I tried to copy the readpaddle example) It's getting there though :D Thanks all for the help!

     

    If you replace if p <> paddle then x = paddle : goto center by if joy0fire then x = x + 1 : y = 2 : goto enter for example then the code works in plotting the lines.

     set kernel_options no_blank_lines readpaddle
     currentpaddle = 0
     drawscreen
    
     dim ea = a
     dim dy = b
     dim dx = c
     dim x1 = temp1
     dim x0 = temp2
     dim y1 = temp3
     dim y0 = temp4
     dim delay = h
     dim rand16 = z
     dim xpos = k
     dim ypos = l
     x = 0
     y = 3
     t = 0
     p = paddle
    
    
    
     player0:
     %11000000
     %11000000
     %00000000
     %00000000
     %00000000
     %00000000
     %00000000
     %00000000
    end
    
     player1:
     %11110000
     %11110000
     %11110000
     %11110000
     %00000000
     %00000000
     %00000000
     %00000000
    end
     
     xpos = 14  : ypos = 9
     pfpixel xpos ypos on
    
     goto enter
    
    loop
     
    
     COLUP0 = $1C
     COLUP1 = $B4
     COLUPF = $62
     drawscreen
    
    
     if xpos <>  x && ypos <> y then pfpixel xpos ypos on: gosub move
    
     if p <> paddle then x = paddle : goto center
    
    
     goto loop
    
    enter
     xpos=14 :  ypos=9 
     pfpixel xpos ypos on
     x0 = xpos : y0 = ypos
     x1 = x  :  y1 = y
    
     gosub setup_move
     goto pf
    
    
    move
      temp1 = ea
    
      if f{0} then skip
      ypos = ypos + yinc[f]
      ea = ea - dx
      if temp1 < ea then ea = ea + dy : xpos = xpos + xinc[f] 
      return
    skip
      xpos = xpos + xinc[f]  
      ea = ea - dy
      if temp1 < ea then ea = ea + dx : ypos = ypos + yinc[f]
      return
    
    
    
    setup_move
     if x0 < x1 then f{2} = 1 : dx = x1 - x0 else f{2} = 0 : dx = x0 - x1
     if y0 < y1 then f{1} = 1 : dy = y1 - y0 else f{1} = 0 : dy = y0 - y1
    
     if dx > dy then f{0} = 1 : ea = dx else f{0} = 0 : ea = dy 
     var36 = f
     return
    
      data yinc
      $FF, $FF, $01, $01, $FF, $FF,$01, $01
    end
    
      data xinc
      $FF, $FF, $FF, $FF, $01, $01, $01, $01
    end
    
    pf
     playfield:
     ................................
     ................................
     ................................
     ................................
     ................................
     ................................
     ................................
     ................................
     ................................
     ................................
     ................................
    end
    
     goto loop
    
    
    
  8. Variables can hold a value ranging from 0 to 255:

     

    randomterrain.com/atari-2600-memories-batari-basic-commands.html#bq_what_is_a_variable

     

    It won't compile because of the code that is trying to go beyond 255.

     

    It works with the offending lines REMed out, but you only have 449 bytes of ROM space left after doing that, so you'll run out of space once you fix your variable problem. You'll probably need to use a different technique. As far as I know, the two line commands make straight lines, not diagonals, so you'd probably have to use pfpixel.

    Yes this works thanks! But now when I try to run it it gives black static unless I remove like a quarter of the rooms. I'm guessing that that is the space issue. It looks a lot better in transition though. So It's a pity that this does not work. You can't make an 8k game with batari basic?

     

    I've looked into pfpixel and the other two line commands, but I can't think of a way to draw the lines without programming in all pixels manually. And that would probably take up more space? Is space defined as the amount of characters used? I guess you'd have less lines per room, as a lot of the pixels can be seen as a 1x2 hline or vline. So might be worth a try. Do you think it will be worth the effort or still be too long?

     

    If I were doing this, I would make an integer-based line-drawing function that reads start and end coordinates from a data table, and plots them with pfpixel as RT suggested. If I have time, I'll try to make an example program that does this.

    This would be great. If you do not have time, could you tell me how you would tackle such a problem. I don't know how to atomize the process and keep the lines symmetrical.

  9. It might be possible to use the pfvline to draw lines with the playfield blocks if you can come up with a good way to programmatically determine where the vertical sections should begin and end to create diagonal lines.

    I tried the function but I couldn't find a good way of implementing it. However, I decided to just draw every option by hand.

     

    But for some reason it does not accept my code. Could it be that it is too long? It compiles but gives a black screen that doesn't respond to anything. Code below

    main1
    
     y=0
     player1x=80:player1y=85
     player0x=0:player0y=10
     c =10
     l=0
     score = 10
    
    main
      COLUBK=$0E
      COLUP1=$28
    
    
     if y=0 then playfield:
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	XXXXXXXXXXXXXXX..............
    	.............................
    	.............................
    end
     if y=5 then playfield:
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	XXXXXXXX.....................
    	........XXXXXXX..............
    	.............................
    	.............................
    end
     if y=10 then playfield:
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	XXXX.........................
    	....XXXXXXX..................
    	...........XXXX..............
    	.............................
    	.............................
    end
    
     if y=15 then playfield:
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	XXX..........................
    	...XXXXX.....................
    	........XXXX.................
    	............XXX..............
    	.............................
    	.............................
    end
     if y=20 then playfield:
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	XXX..........................
    	...XXXXX.....................
    	........XXXX.................
    	............XXX..............
    	.............................
    	.............................
    end
     if y=25 then playfield:
    	.............................
    	.............................
    	.............................
    	.............................
    	XX...........................
    	..XXXX.......................
    	.....XXXX....................
    	.........XXXX................
    	.............XX..............
    	.............................
    	.............................
    end
     if y=30 then playfield:
    	.............................
    	.............................
    	.............................
    	XX...........................
    	..XXX........................
    	.....XXX.....................
    	........XX...................
    	..........XXX................
    	.............XX..............
    	.............................
    	.............................
    end
     if y=35 then playfield:
    	.............................
    	.............................
    	XX...........................
    	..XX.........................
    	....XX.......................
    	......XXX....................
    	.........XX..................
    	...........XX................
    	.............XX..............
    	.............................
    	.............................
    end
     if y=40 then playfield:
    	.............................
    	XX...........................
    	..XX.........................
    	....XX.......................
    	......XX.....................
    	........XX...................
    	..........XX.................
    	............XX...............
    	..............X..............
    	.............................
    	.............................
    end
     if y=45 then playfield:
    	X............................
    	.XX..........................
    	...XX........................
    	.....XX......................
    	.......XX....................
    	.........X...................
    	..........XX.................
    	............XX...............
    	..............X..............
    	.............................
    	.............................
    end
     if y=50 then playfield:
    	.X...........................
    	..XX.........................
    	....XX.......................
    	......X......................
    	.......XX....................
    	.........X...................
    	..........XX.................
    	............XX...............
    	..............X..............
    	.............................
    	.............................
    end
     if y=55 then playfield:
    	..X..........................
    	...XX........................
    	.....X.......................
    	......XX.....................
    	........X....................
    	.........XX..................
    	...........X.................
    	............XX...............
    	..............X..............
    	.............................
    	.............................
    end
     if y=60 then playfield:
    	...X.........................
    	....XX.......................
    	......X......................
    	.......X.....................
    	........XX...................
    	..........X..................
    	...........X.................
    	............XX...............
    	..............X..............
    	.............................
    	.............................
    end
     if y=65 then playfield:
    	....X........................
    	.....X.......................
    	......XX.....................
    	........X....................
    	.........X...................
    	..........X..................
    	...........XX................
    	.............X...............
    	..............X..............
    	.............................
    	.............................
    end
     if y=70 then playfield:
    	.....X.......................
    	......X......................
    	.......X.....................
    	........X....................
    	.........XX..................
    	...........X.................
    	............X................
    	.............X...............
    	..............X..............
    	.............................
    	.............................
    	.............................
    end
     if y=75 then playfield:
    	.......X.....................
    	........X....................
    	.........X...................
    	..........X..................
    	...........X.................
    	............X................
    	.............X...............
    	..............X..............
    	.............................
    	.............................
    end
     if y=80 then playfield:
    	.......X.....................
    	........X....................
    	.........X...................
    	..........X..................
    	..........X..................
    	...........X.................
    	............X................
    	.............X...............
    	..............X..............
    	.............................
    	.............................
    end
     if y=85 then playfield:
    	........X....................
    	.........X...................
    	.........X...................
    	..........X..................
    	...........X.................
    	............X................
    	............X................
    	.............X...............
    	..............X..............
    	.............................
    	.............................
    end
     if y=90 then playfield:
    	.........X...................
    	..........X..................
    	..........X..................
    	...........X.................
    	...........X.................
    	............X................
    	.............X...............
    	.............X...............
    	..............X..............
    	.............................
    	.............................
    end
     if y=100 then playfield:
    	..........X..................
    	..........X..................
    	...........X.................
    	...........X.................
    	............X................
    	............X................
    	.............X...............
    	.............X...............
    	..............X..............
    	.............................
    	.............................
    end
     if y=110 then playfield:
    	...........X.................
    	...........X.................
    	............X................
    	............X................
    	............X................
    	.............X...............
    	.............X...............
    	..............X..............
    	..............X..............
    	.............................
    	.............................
    end
     if y=120 then playfield:
    	............X................
    	............X................
    	............X................
    	.............X...............
    	.............X...............
    	.............X...............
    	.............X...............
    	..............X..............
    	..............X..............
    	.............................
    	.............................
    end
     if y=130 then playfield:
    	.............X...............
    	.............X...............
    	.............X...............
    	.............X...............
    	.............X...............
    	..............X..............
    	..............X..............
    	..............X..............
    	..............X..............
    	.............................
    	.............................
    end
     if y=140 then playfield:
    	..............X..............
    	..............X..............
    	..............X..............
    	..............X..............
    	..............X..............
    	..............X..............
    	..............X..............
    	..............X..............
    	..............X..............
    	.............................
    	.............................
    end
     if y=150 then playfield:
    	...............X.............
    	...............X.............
    	...............X.............
    	...............X.............
    	...............X.............
    	..............X..............
    	..............X..............
    	..............X..............
    	..............X..............
    	.............................
    	.............................
    end
     if y=160 then playfield:
    	................X............
    	................X............
    	................X............
    	...............X.............
    	...............X.............
    	...............X.............
    	...............X.............
    	..............X..............
    	..............X..............
    	.............................
    	.............................
    end
     if y=170 then playfield:
    	.................X...........
    	.................X...........
    	................X............
    	................X............
    	................X............
    	...............X.............
    	...............X.............
    	..............X..............
    	..............X..............
    	.............................
    	.............................
    end
     if y=180 then playfield:
    	..................X..........
    	..................X..........
    	.................X...........
    	.................X...........
    	................X............
    	................X............
    	...............X.............
    	...............X.............
    	..............X..............
    	.............................
    	.............................
    end
     if y=190 then playfield:
    	...................X.........
    	..................X..........
    	..................X..........
    	.................X...........
    	.................X...........
    	................X............
    	...............X.............
    	...............X.............
    	..............X..............
    	.............................
    	.............................
    end
     if y=200 then playfield:
    	....................X........
    	...................X.........
    	...................X.........
    	..................X..........
    	.................X...........
    	................X............
    	................X............
    	...............X.............
    	..............X..............
    	.............................
    	.............................
    end
     if y=210 then playfield:
    	.....................X.......
    	....................X........
    	...................X.........
    	..................X..........
    	..................X..........
    	.................X...........
    	................X............
    	...............X.............
    	..............X..............
    	.............................
    	.............................
    end
     if y=220 then playfield:
    	.....................X.......
    	....................X........
    	...................X.........
    	..................X..........
    	.................X...........
    	................X............
    	...............X.............
    	..............X..............
    	.............................
    	.............................
    end
     if y=230 then playfield:
    	.......................X.....
    	......................X......
    	.....................X.......
    	....................X........
    	..................XX.........
    	.................X...........
    	................X............
    	...............X.............
    	..............X..............
    	.............................
    	.............................
    	.............................
    end
     if y=240 then playfield:
    	........................X....
    	.......................X.....
    	.....................XX......
    	....................X........
    	...................X.........
    	..................X..........
    	................XX...........
    	...............X.............
    	..............X..............
    	.............................
    	.............................
    end
     if y=250 then playfield:
    	.........................X...
    	.......................XX....
    	......................X......
    	.....................X.......
    	...................XX........
    	..................X..........
    	.................X...........
    	...............XX............
    	..............X..............
    	.............................
    	.............................
    end
     if y=260 then playfield:
    	..........................X..
    	........................XX...
    	.......................X.....
    	.....................XX......
    	....................X........
    	..................XX.........
    	.................X...........
    	...............XX............
    	..............X..............
    	.............................
    	.............................
    end
     if y=270 then playfield:
    	...........................X.
    	.........................XX..
    	.......................XX....
    	......................X......
    	....................XX.......
    	...................X.........
    	.................XX..........
    	...............XX............
    	..............X..............
    	.............................
    	.............................
    end
     if y=280 then playfield:
    	............................X
    	..........................XX.
    	........................XX...
    	......................XX.....
    	....................XX.......
    	...................X.........
    	.................XX..........
    	...............XX............
    	..............X..............
    	.............................
    	.............................
    end
     if y=290 then playfield:
    	.............................
    	...........................XX
    	.........................XX..
    	.......................XX....
    	.....................XX......
    	...................XX........
    	.................XX..........
    	...............XX............
    	..............X..............
    	.............................
    	.............................
    end
     if y=300 then playfield:
    	.............................
    	.............................
    	...........................XX
    	.........................XX..
    	.......................XX....
    	....................XXX......
    	..................XX.........
    	................XX...........
    	..............XX.............
    	.............................
    	.............................
    end
     if y=310 then playfield:
    	.............................
    	.............................
    	.............................
    	...........................XX
    	........................XXX..
    	.....................XXX.....
    	...................XX........
    	................XXX..........
    	..............XX.............
    	.............................
    	.............................
    end
     if y=320 then playfield:
    	.............................
    	.............................
    	.............................
    	.............................
    	...........................XX
    	.......................XXXX..
    	....................XXXX.....
    	................XXXX.........
    	..............XX.............
    	.............................
    	.............................
    end
     if y=330 then playfield:
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	..........................XXX
    	.....................XXXXX...
    	.................XXXX........
    	..............XXX............
    	.............................
    	.............................
    end
     if y=340 then playfield:
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	..........................XXX
    	.....................XXXXX...
    	.................XXXX........
    	..............XXX............
    	.............................
    	.............................
    end
     if y=350 then playfield:
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	.........................XXXX
    	..................XXXXXXX....
    	..............XXXX...........
    	.............................
    	.............................
    end
     if y=360 then playfield:
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	.....................XXXXXXXX
    	..............XXXXXXX........
    	.............................
    	.............................
    end
     if y=370 then playfield:
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	.............................
    	..............XXXXXXXXXXXXXXX
    	.............................
    	.............................
    end
    
    
     player0:
     %00000000
     %00000000
     %00011000
     %00111100
     %00111100
     %00011000
     %00000000
     %00000000
    end
     
      if y=0 then player1: 
            %01111110
            %00111100
            %00011000
            %00011000
            %00111100
            %00000000
            %00000000
            %00000000
    end
     if y=10 then player1:
            %01111110
            %00111100
            %00011100
            %00001000
            %00000101
            %00000010
            %00000100
            %00000000
    end
    
     if y=20 then player1:
            %01111110
            %00111100
            %00011001
            %00001111
            %00000001
            %00000000
            %00000000
            %00000000
    end
    
     if joy0right then y=y+1
     if joy0left then y=y-1
    
     if c>10 then player0x=player0x+1: c=0
     c=c+1
    
    
     if collision(player0,playfield) then l=l+1
     if l>100 then score=score+1: player0x=5:player0y=70: l=0
    
     drawscreen
     
     goto main
    
  10. Reminded me of Return of the Jedi where you have the swinging light sabers..

    Oh I didn't think of that game. Any clue on how they programmed this? Is it a sprite or a background? And did they just draw each position?

     

     

    Really cool concept. You could make diagonals with the missile in assembly (it's how the vines in Pitfall are done), but there isn't a way to do that with batari basic as far as I know.

    I haven't looked into assembly at all, are there tutorial sites on that?

    This guy also did it in the same way I did, i.e. with backgrounds. http://sebastianmihai.com/main.php?t=47So perhaps this is the only way

     

    Could be interesting. Get some intermittent clouds wafting by where you have to predict the location of the object. Have bonus meteors. Hidden DSOs. Satellites. Bonus planets. Wind shaking the telescope.. And more! A psychedelic eclipse boss round, and 2-player Battle of the Observatories where you rack up $$$ to build more telescopes. A solar flare that temporarily blinds you and knocks the electrics off-line. Multiple telescopes to pick from, wide or narrow field. Unlock the space telescope and radio telescope..

    The clouds are a good idea! It would probably be cool if the stars were 'immune' while in a cloud. Multiplayer would also be awesome, but I will focus on 1p first. :P I'm sure that I'll have to remake the whole thing a few times anyhow.



  11. Get 20 point and win a patch + official letter! (See attachment)


    Update 18/10/2018 - Version 1.2. Score glitch fixed so it should not roll over to 999999 anymore.

    Update 27/2/2018 - Version 1.0. The game is officially done. I've used the 4k to the max and nothing more can be added sadly. Since I want to work on my other game I decided to not go 8k. (Maybe at some point in the future)


    The good news is that the game got picked up for publication at Packrat video games! It will be sold as a cart+manual. So no box, but I designed one anyway for anyone who wants to print one themselves. Game now comes in NTSC and PAL.




    You are an astronomer and you are working at a telescope. You are tasked to observe a certain star for your research project. Point your telescope at the star and observe! But look out for clouds, as they ruin your observations. Other astronomers also want to use the telescope, so make sure to finish your observations before the time runs out. Otherwise you will be banned for wasting time.


    Goals:

    *Fill the healthbar before the score reaches 0

    *Don't observe clouds


    Flip the left difficulty switch to A for playing with paddles, B for joystick.

    Flip the right difficulty switch for extra time on the telescope

    Gamemode 1 gets harder with standard increments

    Gamemode 2 has more random leveles

    Use reset button to reset



    For convenience, you can play the game by clicking this link: http://javatari.org/?ROM=http://pietrow.net/games/astronomerV0.9.bin


    Any feedback and suggestions for gameplay would be welcome!


    Thanks to Bogax, RandomTerrain and Atari Age in general!

    post-48701-0-16960100-1519722378_thumb.png

    post-48701-0-54434200-1519722392_thumb.png

    post-48701-0-39429600-1519722420_thumb.png

    astronomerV1.2_ntsc.bas

    astronomerV1.2_pal.bas

    astronomerV1.2_ntsc.bin

    astronomerV1.2_pal.bin

    post-48701-0-61089100-1539846739_thumb.png

    • Like 8
  12. Hi all,


    I am a long time lurker and fan of the 2600 and I would like to contribute in my own way to the games library. However I am very new to the language and not 100% sure about the limitations.


    The setup of the player is close to that of Commando Raid, but instead of bullets I would like to have a continuous beam shooting out of it. (Is this possible?) This would symbolize the 'field of view' of a telescope that needs to observe stars. In the skies there would be X stars that rotate around the center of the screen. (is this possible or should they have a jagged path?)

    The stars would have a selected 'observing time' (random health) and need to be pointed at for that number of time. (can this be done, or do they all have to have the same HP?) Once a star is observed it is taken off the map(+1 score) and a new target is selected (a new enemy is spawned at a random point, would this work? can you make it spawn at random points and still make the same circle?)

    If the star leaves the room then the observation has failed and you lose a life. Lose 3 and you get fired.


    Perhaps more stars can be introduced when the score reaches a certain number?


    So if you guys could tell me if this is 1) possible at all and 2) point me to some relevant tutorials on the above questions.


    I quickly threw together a 'demo' in HTML5. It's a bit glitchy with some stars getting infinite HP and spawning outside of the room and giving you a negative score. But the idea should be clear. Possibly this could also be a 2 player thing with rivaling astronomers. IMO this would be ideal as a paddle game.




    I've played around with batari basic and done some tutorials/looked at example code. I can make things move and respond to a joystick and paddle. But I don't know how to make the 'laser', rotate the telescope and handle the spawning/path of the stars. (I assume you can make it go to the player if x^2+y^2 > r and then move it to the right if x^2+y^2< r. ?)



  13. I have recently mastered the skill of burning eeproms onto 8-bitclassics carts and I'm currently enjoying tapeworm immensely. However I have a 3.2k ROM that I'd like to play and I am wondering how to burn that. Should it be put on the front of the memory with zeros or ones as padding? Or do you put it at the end with padding on the front?

     

    I'd try it out but I have to wait a day or more between burns as I have only limited access to the burner.

×
×
  • Create New...