Jump to content

freshbrood

Members
  • Content Count

    197
  • Joined

  • Last visited

Posts posted by freshbrood


  1. Both times I copied directly from bbasic. I saved in a plain text, copied and pasted here again and it came out the same. So the only other thing I can think of is the low data savings browser settings I'm using- I have a user agent that forces the mobile/lite version of AtariAge on my pc screen for reduced bandwidth. So apparently it's something in the coding of the forum page. See if you can force the mobile version on your desktop and experiment with pasting. It should work.
     

    • Like 1

  2. Is this better?

     

       set romsize 32k : set kernel_options player1colors playercolors pfcolors : COLUBK = 2
       const _c_frame10lo=#<frame10 : const _c_frame10hi=#>frame10

      player0x = 50 : player0y = 50 : player1x = 70 : player1y = 50

    __Main
      goto __P0 bank2

        bank 2
    __P0

      player0color:
     10
     10
     10
     254
     254
     254
     254
     254
     0
     0
     0
     0
     0
     70
     254
     254
     254
     254
     254
     254
     254
     254
     0
     242
     56
     56
     56
     56
     56
     56
     14
     10
     14
     14
     14
     14
     14
     0
     254
     14
     14
     56
     14
     254
     254
     254
     12
     12
     10
     10
     10
     8
     14
     14
     14
     14
     14
     14
     14
     14
     14
     0
     0
     14
     14
     14
     14
     14
     0
     0
     0
     0
     14
     14
     14
     14
     0
     0
     0
     0
     0
     0
     0
     0
     0
     0
     0
     254
     254
     254
     254
     254
     254
     254
     254
     0
     0
     0
     0
     0
     30
     30
     30
     0
     0
     0
     0
     0
     0
     30
     0
     30
     30
     30
     30
     30
     0
     30
     0
     0
     0
     0
     0
     0
     156
     156
     156
     0
     0
     0
     0
     0
     0
     156
     0
     156
     156
     156
     156
     156
     0
     156
     0
     0
     14
     14
     14
     14
     14
     46
     194
     194
     194
     194
     194
     194
     0
     0
     46
     46
     46
     194
     196
     46
     46
     46
     196
     30
     0
     0
     0
     0
     202
     202
     202
     0
     0
     0
     0    
     0
     0
     202
     0
     202
     202
     202
     202
     202
     0
     202
     0
     0
     62
     62
     62
     12
     12
     62
     62
     62
     62
     62
     62
     62
     68
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     12
     246
     246
     246
     246
     246
     246
     246
     246
     246
     246
     116
     116
     116
     116
     14
     116
     116
     116
     116
     116
     14
     14
     14
     14
     14
    end

      player1color:
     10
     10
     10
     254
     254
     254
     254
     254
     0
     0
     0
     0
     0
     70
     254
     254
     254
     254
     254
     254
     254
     254
     0
     242
     56
     56
     56
     56
     56
     56
     14
     10
     14
     14
     14
     14
     14
     0
     254
     14
     14
     56
     14
     254
     254
     254
     12
     12
     10
     10
     10
     8
     14
     14
     14
     14
     14
     14
     14
     14
     14
     0
     0
     14
     14
     14
     14
     14
     0
     0
     0
     0
     14
     14
     14
     14
     0
     0
     0
     0
     0
     0
     0
     0
     0
     0
     0
     254
     254
     254
     254
     254
     254
     254
     254
     0
     0
     0
     0
     0
     30
     30
     30
     0
     0
     0
     0
     0
     0
     30
     0
     30
     30
     30
     30
     30
     0
     30
     0
     0
     0
     0
     0
     0
     156
     156
     156
     0
     0
     0
     0
     0
     0
     156
     0
     156
     156
     156
     156
     156
     0
     156
     0
     0
     14
     14
     14
     14
     14
     46
     194
     194
     194
     194
     194
     194
     0
     0
     46
     46
     46
     194
     196
     46
     46
     46
     196
     30
     0
     0
     0
     0
     202
     202
     202
     0
     0
     0
     0    
     0
     0
     202
     0
     202
     202
     202
     202
     202
     0
     202
     0
     0
     62
     62
     62
     12
     12
     62
     62
     62
     62
     62
     62
     62
     68
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     12
     246
     246
     246
     246
     246
     246
     246
     246
     246
     246
     116
     116
     116
     116
     14
     116
     116
     116
     116
     116
     14
     14
     14
     14
     14
    end

      o = 6
      player0color = player0color + (o*24) - 24 + 1 : player0pointerlo=_c_frame10lo : player0pointerhi=_c_frame10hi : player0height=22

      u = 8
      player1color = player1color + (u*24) - 24 + 1 : player1pointerlo=_c_frame10lo : player1pointerhi=_c_frame10hi : player1height=22

      drawscreen

      goto __Three bank3

      bank 3
    __Three

      goto __Four bank4
     
      bank 4
    __Four

      goto __Start bank5

        bank 5
    __Start

      goto __Main bank1

       bank 6
       bank 7
       bank 8
       data frame10 ; (STAND)
       %11000011
       %11000110
       %00000110
       %11000000
       %11000010
       %01100011
       %01100011
       %00110011
       %00110111
       %00111011
       %00111010
       %00111010
       %00011101
       %00000011
       %00011100
       %00101110
       %01011111
       %11111011
       %11110011
       %10011100
       %01001110
       %01101110
       %00001110
    end
     


  3. 30 minutes ago, Random Terrain said:



     

    It's pretty much the same as before the forum upgrade. Click on the icon that looks like this:



     

    </>



     

    When you move your mouse pointer over the icons, a box pops up telling you what each one means.



     

    Example:



     

    zz_aa_forum_code.thumb.png.b554d88349b004b646b66473a2d5b6af.png

    Where am I supposed to see that icon? in the bbasic or text editor? I just copied and pasted directly from bbasic and I'm on a reduced data browser that may not show up all the regular javascript buttons.

     


  4. I also tried your suggestion above.
     

       player0color = cf_lo[cf_no] : player0color[1] = cf_hi[cf_no]

    I wasn't sure if I was doing it right, every number I plugged in gave me corrupted colors. I also have absolutely no clue to know how close  I am going over a page boundary. So far the only way that has worked for me is to use two separate colors bars for each player. I know theoretically it shouldn't be that hard to share the same color bar but I can't figure it out. I'm not a coder and all I know is what I've learned using basic.
     


  5. Is there a better way to paste code here that doesn't mess up indenting?


     

    This seems to work for me, so you get the idea of what I'm trying to do precisicely. "o" and "u" determine which character p0 and p1 are supposed to be respectively. (1 through 8 are standard human chacters, 9 and 10 have different heights so I'll need to add different code to adjust for those.)


     

    As you can see, it multiplies o by 24 to land on the correct "standing idle" color. (I add a plus 1 because the colors are 1 line taller for a punching ani later).


     

    As you can also see, p0 and p1 both use the same 10 color sets for the characters, so to need 20 sets seems like a waste. I'm not sure how "page boundaries" work and apparently my code keeps going over because my method only seems to work using the preset color bars and not the const examples you've provided. I tried both iterations and they still only work up to the first couple increases then they are completely distorted. I'm not sure the trouble to re-write and integrate it into my code would be worth the space savings at this point, although it's signficant.


     

       set romsize 32k : set kernel_options player1colors playercolors pfcolors : COLUBK = 2
       const _c_frame10lo=#<frame10 : const _c_frame10hi=#>frame10

      player0x = 50 : player0y = 50 : player1x = 70 : player1y = 50

    __Main
      goto __P0 bank2

        bank 2
    __P0

      player0color:
     10
     10
     10
     254
     254
     254
     254
     254
     0
     0
     0
     0
     0
     70
     254
     254
     254
     254
     254
     254
     254
     254
     0
     242
     56
     56
     56
     56
     56
     56
     14
     10
     14
     14
     14
     14
     14
     0
     254
     14
     14
     56
     14
     254
     254
     254
     12
     12
     10
     10
     10
     8
     14
     14
     14
     14
     14
     14
     14
     14
     14
     0
     0
     14
     14
     14
     14
     14
     0
     0
     0
     0
     14
     14
     14
     14
     0
     0
     0
     0
     0
     0
     0
     0
     0
     0
     0
     254
     254
     254
     254
     254
     254
     254
     254
     0
     0
     0
     0
     0
     30
     30
     30
     0
     0
     0
     0
     0
     0
     30
     0
     30
     30
     30
     30
     30
     0
     30
     0
     0
     0
     0
     0
     0
     156
     156
     156
     0
     0
     0
     0
     0
     0
     156
     0
     156
     156
     156
     156
     156
     0
     156
     0
     0
     14
     14
     14
     14
     14
     46
     194
     194
     194
     194
     194
     194
     0
     0
     46
     46
     46
     194
     196
     46
     46
     46
     196
     30
     0
     0
     0
     0
     202
     202
     202
     0
     0
     0
     0    
     0
     0
     202
     0
     202
     202
     202
     202
     202
     0
     202
     0
     0
     62
     62
     62
     12
     12
     62
     62
     62
     62
     62
     62
     62
     68
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     12
     246
     246
     246
     246
     246
     246
     246
     246
     246
     246
     116
     116
     116
     116
     14
     116
     116
     116
     116
     116
     14
     14
     14
     14
     14
    end

      player1color:
     10
     10
     10
     254
     254
     254
     254
     254
     0
     0
     0
     0
     0
     70
     254
     254
     254
     254
     254
     254
     254
     254
     0
     242
     56
     56
     56
     56
     56
     56
     14
     10
     14
     14
     14
     14
     14
     0
     254
     14
     14
     56
     14
     254
     254
     254
     12
     12
     10
     10
     10
     8
     14
     14
     14
     14
     14
     14
     14
     14
     14
     0
     0
     14
     14
     14
     14
     14
     0
     0
     0
     0
     14
     14
     14
     14
     0
     0
     0
     0
     0
     0
     0
     0
     0
     0
     0
     254
     254
     254
     254
     254
     254
     254
     254
     0
     0
     0
     0
     0
     30
     30
     30
     0
     0
     0
     0
     0
     0
     30
     0
     30
     30
     30
     30
     30
     0
     30
     0
     0
     0
     0
     0
     0
     156
     156
     156
     0
     0
     0
     0
     0
     0
     156
     0
     156
     156
     156
     156
     156
     0
     156
     0
     0
     14
     14
     14
     14
     14
     46
     194
     194
     194
     194
     194
     194
     0
     0
     46
     46
     46
     194
     196
     46
     46
     46
     196
     30
     0
     0
     0
     0
     202
     202
     202
     0
     0
     0
     0    
     0
     0
     202
     0
     202
     202
     202
     202
     202
     0
     202
     0
     0
     62
     62
     62
     12
     12
     62
     62
     62
     62
     62
     62
     62
     68
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     62
     12
     246
     246
     246
     246
     246
     246
     246
     246
     246
     246
     116
     116
     116
     116
     14
     116
     116
     116
     116
     116
     14
     14
     14
     14
     14
    end

      o = 6
      player0color = player0color + (o*24) - 24 + 1 : player0pointerlo=_c_frame10lo : player0pointerhi=_c_frame10hi : player0height=22

      u = 8
      player1color = player1color + (u*24) - 24 + 1 : player1pointerlo=_c_frame10lo : player1pointerhi=_c_frame10hi : player1height=22

      drawscreen

      goto __Three bank3

      bank 3
    __Three

      goto __Four bank4
     
      bank 4
    __Four

      goto __Start bank5

        bank 5
    __Start

      goto __Main bank1

       bank 6
       bank 7
       bank 8
       data frame10 ; (STAND)
       %11000011
       %11000110
       %00000110
       %11000000
       %11000010
       %01100011
       %01100011
       %00110011
       %00110111
       %00111011
       %00111010
       %00111010
       %00011101
       %00000011
       %00011100
       %00101110
       %01011111
       %11111011
       %11110011
       %10011100
       %01001110
       %01101110
       %00001110
    end

     


  6. So it does save a ton of memory, nearly 600kb! compared to how I was doing it before, with no noticable cycle increase (It didn't roll or count over 262 more than before), but it still doesn't do exactly what I wanted it to.

     

     

     

    In my more bloated code, I had a player0height=20 and about 200 lines of color in player0color: and I would simply do a player0color = player0color + 20 to shift the color bar up by 20 or more. It worked without issue, execpt I had to redraw the same colors twice for p1. Using the data table method of yours, the colors completely mess up if I shift the colors up more than 45. I'm not sure if you're familiar with the Ninja Kombat game I'm working on, but the code I have so far is basically if p0 = 1 through 7 then it goes to either __Label1p0color player0color: through __Label7p0color player0color:...

     

     

    The issue is for p1 using the exact same characters, I have to duplicate all the player1color: lines, and I was hoping I could just create them once each. But using the const method you showed me seems to only lock down one set of shared colors and I can't cycle through other sets. I share one set of sprites but show 2 different frames simultaneously. I'd like something similar with the colors. If one guy is in a purple outfit I want the other guy to be able to be in a yellow outfit or if he chooses, the same purple outfit but pulling from the same purple color table instead of having to draw a duplicate set of colors for him. Is that possible?
     

     

     
     


  7. I was just being lazy with the lack of playfield colors but it's cool to know that works too.

    "set optimization inlinerand" won't compile for me. There's a ton of other code I've plugged into those banks. Also is using the Temp1 variable necessary? I was really hoping to use every spare variable I could squeeze.

     

    What practical application is there for creating a data table for playfield colors? Sharing sprite color data makes sense to me since 2 sprites can use one color table, but there's only one playfield at a time. I'm not using scrolling.

     


  8. 2 hours ago, bogax said:

    show your code

      set romsize 32k : set kernel_options player1colors playercolors pfcolors : scorecolor=80


      const _c_frame10lo=#<frame10 : const _c_frame10hi=#>frame10 : const Px_color_data_lo = <Pxc_data : const Px_color_data_hi = >Pxc_data
      rem dim   P0_c_pointer_lo  = player0color
      rem dim   P0_c_pointer_hi  = player0color + 1
      rem dim   P1_c_pointer_lo  = player1color
      rem dim   P1_c_pointer_hi  = player1color + 1
      data Pxc_data
      $0A, $0A, $0A, $FE, $FE, $FE, $FE, $FE, $00, $00, $00, $00, $00, $46, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $FE, $00, $F2
    end

       set smartbranching on

      playfield:
     .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
     .XXX........................XXX.
     .XXX........................XXX.
     .XXX........................XXX.
     .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
     .XXX........................XXX.
     .XXX........................XXX.
     .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
     .XXX........................XXX.
     .XXX........................XXX.
     .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
    end

    __Main
      drawscreen
        goto __P0 bank2

        bank 2
    __P0


       player0x=50 : player0y=50
       player0color=player0color+1 :  player0pointerlo=_c_frame10lo : player0pointerhi=_c_frame10hi : player0height=22



      player0color = Px_color_data_lo : player0color[1] = Px_color_data_hi



      goto __P11 bank3
       bank 3
    __P11

       goto __Fore bank4
       bank 4
    __Fore

       goto __Start bank5
        bank 5
    __Start

      goto __Main bank1

       bank 6
       bank 7
       bank 8
       data frame10
       %11000011
       %11000110
       %00000110
       %11000000
       %11000010
       %01100011
       %01100011
       %00110011
       %00110111
       %00111011
       %00111010
       %00111010
       %00011101
       %00000011
       %00011100
       %00101110
       %01011111
       %11111011
       %11110011
       %10011100
       %01001110
       %01101110
       %00001110
    end

     


  9. So I did try this and it compiles but the colors are strange and scrambled. Not at all what is in the data table and there is no discernable pattern to what causes them. I'm guessing as you said it has something to do with timing but I have no clue to know if I am straddling a page boundary in bbasic.


  10. Thanks for all your clear replies, I appreciate it! You save me a lot of headache and make writing games fun. I'm just getting into dpc now and even peeked at Karl G's asm for beginners tutorials, excellent. It's less daunting with you guys to help and your awesome input.
     

     

    Btw I thought I was already posting in the batari forum??
     

    • Like 1

  11. Am I doing something wrong? I understand that I need to insert "include div_mul.asm" at the start but it still doesn't seem to work with anything that doesn't divide evenly. n = 105 / 7 crashes.

    n = (105 / 7) crashes. I don't need any floating number, I only want the int.

     

     

    Also, unrelated, why are there only 6 banks listed in the dpc+ template instead of 8?
     


  12. Please excuse my noob question, but I could find no documentation that says if score is write only or read and write. I'm using only the standard kernel in bataribasic and it appears not to be able to be read.

     

    Also, is there only one score for one player by default?

     


  13. On 7/28/2010 at 3:31 AM, atari2600land said:

    I was just wondering. It would be cool in my game I might make (NBA Basketball 2011) to select the team by having the team logo appear instead of the NBA logo. Since it'd probably have to be divisible by 2, the number of logos could be 32 (30 NBA teams + NBA logo + my team I'll make). Was just wondering if there was a way you could fit more than one title screen logo and change it by for example, joystick left and right.

    post-9475-128031308289_thumb.png

    Before I discovered the Title Screen kernel I wrote my own sub to display 10 different multicolored faces for my Ninja Kombat (Mortal Kombat) clone. Although I'm new at coding and don't understand the intricacies of assembly it seems I was on to the same premise. The widths are 16 pixels but the heights can be nearly any- with up to 6 colors on each line. (with blending and flickering) I think it's pretty impressive if I do say so myself and it could easily be implemented to do what you want to. I have a downloadable demo here if you follow my profile posts.

     

×
×
  • Create New...