Jump to content



1

Is it possible to change the look of the playfield pixels?


13 replies to this topic

#1 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,911 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Oct 21, 2008 7:20 PM

Is it possible to have all playfield pixels look like an image that you can draw? So, you'd draw an image that is the correct width and height and point to the image data in some way so that every playfield pixel will look like what you drew instead of being a plain blank rectangle.

#2 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,543 posts
  • Location:Georgia, USA

Posted Tue Oct 21, 2008 7:27 PM

View PostRandom Terrain, on Tue Oct 21, 2008 9:20 PM, said:

Is it possible to have all playfield pixels look like an image that you can draw? So, you'd draw an image that is the correct width and height and point to the image data in some way so that every playfield pixel will look like what you drew instead of being a plain blank rectangle.
I'm not sure I understand your question. Are you talking about doing this in the Visual bB editor, or something else?

Michael

#3 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,911 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Oct 21, 2008 8:13 PM

Once the ability was added to bB, I'm sure jwierer could make an editor similar to the Score Editor for creating the image, but I'm talking about bB, not VbB.


In bB right now, the playfield pixel blocks are solid. It would be nice if, instead of solid, they could look like an image. With all of the limitations that bB has, I'm sure it would have to be one shared image.

Here's an example of what the playfield with solid pixels looks like:

pfpixelexample01.png

And below is an example of what it would look like if bB could point to shared graphics data:

pfpixelexample02.png

I placed a little image to the left of the maze to show what the shared data in this case would look like all by itself. You could create anything you want and tell bB to use it as shared data for all playfield pixels.

Edited by Random Terrain, Tue Oct 21, 2008 8:24 PM.


#4 Robert M OFFLINE  

Robert M

    Stargunner

  • 1,481 posts
  • Rootbeer!
  • Location:Western NY state

Posted Tue Oct 21, 2008 8:23 PM

That would be awesome, but the 2600 can not do that. You need to step up to the 5200 or 7800 to get graphics abilities like that.

Cheers!

#5 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,911 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Oct 21, 2008 8:35 PM

View PostRobert M, on Tue Oct 21, 2008 9:23 PM, said:

That would be awesome, but the 2600 can not do that. You need to step up to the 5200 or 7800 to get graphics abilities like that.
So is the following tiled game idea a different kind of thing from what I'm talking about:

http://www.atariage....howtopic=120849

#6 Robert M OFFLINE  

Robert M

    Stargunner

  • 1,481 posts
  • Rootbeer!
  • Location:Western NY state

Posted Tue Oct 21, 2008 10:12 PM

View PostRandom Terrain, on Tue Oct 21, 2008 10:35 PM, said:

View PostRobert M, on Tue Oct 21, 2008 9:23 PM, said:

That would be awesome, but the 2600 can not do that. You need to step up to the 5200 or 7800 to get graphics abilities like that.
So is the following tiled game idea a different kind of thing from what I'm talking about:

http://www.atariage....howtopic=120849


Your mockup showed PF graphics with the resolution of sprites (160 pixels across the whole screen). The linked demo is making multi color tiles at PF resolution (40 pixels across). There is a lot of flicker and fast swapping of colors to make that demo. If you or someone else package that multi-color tile display kernel into a file so it can be linked into a bBasic program, then yes you could write a bBasic game using that kernel. The default kernels bBasic do not have that ability.

Cheers!

#7 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,911 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Tue Oct 21, 2008 10:23 PM

Thanks. I hope someone figures out a way to do a little more with the playfield using bB. I'd like to be able to make things like bushes.

#8 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Wed Oct 22, 2008 6:59 AM

Your mockup looks like a game.. what game I can't place the name? Rockbuster? I forget the name.. was made for C64 and older systems and someone was working on it for the 5200 here.

View PostRandom Terrain, on Wed Oct 22, 2008 12:23 AM, said:

Thanks. I hope someone figures out a way to do a little more with the playfield using bB. I'd like to be able to make things like bushes.


#9 roland p OFFLINE  

roland p

    Stargunner

  • 1,413 posts
  • RLA
  • Location:The Netherlands

Posted Wed Oct 22, 2008 7:13 AM

Would it be possible to map repetitive sprites over the playfield?
See post 9 in this thread for some interesting examples of repetitive sprites. I don't know if it would work with an asymetrical playfield, but it's a start.

#10 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,911 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Wed Oct 22, 2008 7:49 AM

View Postyuppicide, on Wed Oct 22, 2008 7:59 AM, said:

Your mockup looks like a game.. what game I can't place the name? Rockbuster? I forget the name.. was made for C64 and older systems and someone was working on it for the 5200 here.
I don't know. Don't think I've seen it.


View Postroland p, on Wed Oct 22, 2008 8:13 AM, said:

Would it be possible to map repetitive sprites over the playfield?
See post 9 in this thread for some interesting examples of repetitive sprites. I don't know if it would work with an asymetrical playfield, but it's a start.
Thanks for the link.

#11 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Wed Oct 22, 2008 12:19 PM

Boulderdash.

View PostRandom Terrain, on Wed Oct 22, 2008 9:49 AM, said:

View Postyuppicide, on Wed Oct 22, 2008 7:59 AM, said:

Your mockup looks like a game.. what game I can't place the name? Rockbuster? I forget the name.. was made for C64 and older systems and someone was working on it for the 5200 here.
I don't know. Don't think I've seen it.


#12 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,911 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Wed Oct 22, 2008 4:01 PM

View Postyuppicide, on Wed Oct 22, 2008 2:19 PM, said:

Boulderdash.
Oh, yeah. I know that game. I used to play it on the Commodore 64 and Andrew Davie was working on an Atari 2600 version:

http://www.youtube.c...r=atari2600guru

http://www.atariage....howtopic=118287

#13 SeaGtGruff OFFLINE  

SeaGtGruff

    River Patroller

  • 4,543 posts
  • Location:Georgia, USA

Posted Sat Oct 25, 2008 2:07 AM

View PostRandom Terrain, on Tue Oct 21, 2008 11:23 PM, said:

Thanks. I hope someone figures out a way to do a little more with the playfield using bB. I'd like to be able to make things like bushes.
I don't know about bushes, but you can draw trees! ;) And bushes are kind of like miniature trees, so... Here's an example of a forest scene with little boy Red walking through the woods. It uses flickering to get four playfield colors-- or else three playfield colors and one background color, depending on how you want to look at it. I used the pfcolors option because you could even change the pfcolor from row to row if you want, which would let you get three different playfield colors on each row of the playfield (the background color would always be the same). The trick is to use different colors on the alternating frames, to get a blending of colors when the frames are flickered together:

Frame 1 -- backgroundcolor 1, playfieldcolor 1, player0color 1, player1color 1
Frame 2 -- backgroundcolor 2, playfieldcolor 2, player0color 2, player1color 2

Possible blendings:

backgroundcolor 1 and backgroundcolor2
backgroundcolor 1 and playfieldcolor 2
backgroundcolor 1 and player0color 2
backgroundcolor 1 and player1color 2
playfieldcolor 1 and backgroundcolor 2
playfieldcolor 1 and playfieldcolor 2
playfieldcolor 1 and player0color 2
playfieldcolor 1 and player1color 2
player0color 1 and backgroundcolor 2
player0color 1 and playfieldcolor 2
player0color 1 and player0color 2
player0color 1 and player1color 2
player1color 1 and backgroundcolor 2
player1color 1 and playfieldcolor 2
player1color 1 and player0color 2
player1color 1 and player1color 2

Aside from the flickering-- which is better or worse depending primarily on the amount of contrast between the luminances of the two colors being flickered together-- there are two things that can make this method a royal pain to use: (1) it can be rather tricky to pick the colors for the two frames so you end up with the blended colors you're looking for, and some of the color combinations you're shooting for may be impossible to achieve; and (2) you have to pay strict attention to the on/off state of the bits in your playfield, players, missiles, and ball, to make sure you get the blendings you're looking for. Also, you must redefine the playfield during each frame, so that uses up a lot of cycles in batari Basic, since the playfield must be loaded into RAM on each frame. My example uses the Superchip for the playfield to get a higher resolution-- I used pfres 31, and kept the first and last columns of the playfield blank, to get a displayed playfield resolution of 30x30 (the 31st row is hidden behind the score)-- and that uses even more cycles than if the playfield were in zero-page RAM and/or had a lower resolution. I could have just defined the player outside of the loop (but not the player colors), but I put it inside the loop because you could get more player colors by changing the bits from one frame to the next.

If you run the .bin in Stella, it looks best if you turn the phosphor mode on and use a blending of 50.

   rem * Multicolored Playfield in batari Basic
   set romsize 8kSC
   set kernel_options no_blank_lines pfcolors player1colors
   const pfres = 31
   player1x = 0
   player1y = 49
loop
   playfield:
   .XXXXXXXXXXXXX....XXXXXXXXXXXXX.
   .X,XXXXXXX,XXX...,XXXXXXX.XXXXX.
   .X,XXXXXXX,XXX...,XXXXXXX.XXXXX.
   .X,XXXXXXX,XXX...,XXXXXXX.XXXXX.
   .XXXXXXXXXXXXX....XXXXXXXXXXXXX.
   .XXXXX,XXXXXXX,...XXX,XXXXXXX.X.
   .XXXXX,XXXXXXX,...XXX,XXXXXXX.X.
   .XXXXX,XXXXXXX,...XXX,XXXXXXX.X.
   .XXXXXXXXXXXXX....XXXXXXXXXXXXX.
   .X,XXXXXXX,XXX...,XXXXXXX.XXXXX.
   .X,XXXXXXX,XXX...,XXXXXXX.XXXXX.
   .X,XXXXXXX,XXX...,XXXXXXX.XXXXX.
   .XXXXXXXXXXXXX....XXXXXXXXXXXXX.
   ................................
   ................................
   ................................
   ................................
   .XXXXXXXXXXXXX...,XXXXXXXXXXXXX.
   .XXXXXXXXXXXXX...,XXXXXXXXXXXXX.
   .XXXXXXXXXXXXX...,XXXXXXXXXXXXX.
   .XXXXXXXXXXXXX....XXXXXXXXXXXXX.
   .XXXXX,XXXXXXX,...XXX,XXXXXXX.X.
   .XXXXX,XXXXXXX,...XXX,XXXXXXX.X.
   .XXXXX,XXXXXXX,...XXX,XXXXXXX.X.
   .XXXXXXXXXXXXX....XXXXXXXXXXXXX.
   .X,XXXXXXX,XXX...,XXXXXXX.XXXXX.
   .X,XXXXXXX,XXX...,XXXXXXX.XXXXX.
   .X,XXXXXXX,XXX...,XXXXXXX.XXXXX.
   .XXXXXXXXXXXXX....XXXXXXXXXXXXX.
   .XXXXX,XXXXXXX,...XXX,XXXXXXX.X.
end
   COLUBK = $44
   pfcolors:
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
   $A6
end
   player1:
   %01100110
   %00100100
   %00100100
   %00111100
   %10111101
   %10111101
   %11111111
   %00011000
   %00111100
   %00111100
   %00111100
end
   player1color:
   $20
   $84
   $84
   $84
   $9A
   $9A
   $9A
   $3E
   $3E
   $3E
   $44
end
   player1x = player1x + 1
   if player1x = 161 then player1x = 1
   drawscreen
   playfield:
   .....XXX.....XXXXXXXXXX.....XXX.
   ....XXXXX...XXXXXXXXXXXX...XXXX.
   .X.XX...XX.XXXXXXXXX...XX.XX....
   .X.X.....X.XXXXXXXX.....X.X.....
   .XXX.....XXXXXXXXXX.....XXX.....
   .XXXX...XXXXXXXXXXXX...XXXXX....
   ....XX.XX...XXXXXXXXX.XX...XX.X.
   .....X.X.....XXXXXXXX.X.....X.X.
   .....XXX.....XXXXXXXXXX.....XXX.
   ....XXXXX...XXXXXXXXXXXX...XXXX.
   .X.XXXXXXX.XXXXXXXXXXXXXX.XXXXX.
   .X.XXXXXXX.XXXXXXXXXXXXXX.XXXXX.
   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
   .XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX.
   .XXXX...XXXXXXXXXXXX...XXXXX....
   .XXX.....XXXXXXXXXX.....XXX.....
   .XXX.....XXXXXXXXXX.....XXX.....
   .XXXX...XXXXXXXXXXXX...XXXXX....
   ....XX.XX...XXXXXXXXX.XX...XX.X.
   .....X.X.....XXXXXXXX.X.....X.X.
   .....XXX.....XXXXXXXXXX.....XXX.
   ....XXXXX...XXXXXXXXXXXX...XXXX.
   .X.XX...XX.XXXXXXXXX...XX.XX....
   .X.X.....X.XXXXXXXX.....X.X.....
   .XXX.....XXXXXXXXXX.....XXX.....
   .XXXX...XXXXXXXXXXXX...XXXXX....
end
   COLUBK = $C4
   pfcolors:
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
   $1A
end
   player1:
   %01100110
   %00100100
   %00100100
   %00111100
   %10111101
   %10111101
   %11111111
   %00011000
   %00111100
   %00111100
   %00111100
end
   player1color:
   $20
   $84
   $84
   $84
   $9A
   $9A
   $9A
   $3E
   $3E
   $3E
   $44
end
   drawscreen
   goto loop
Michael

Attached File  Multicolored_Playfield_in_batari_Basic_3.bas   3.61K   44 downloads

Attached File  Multicolored_Playfield_in_batari_Basic_3.bas.bin   8K   60 downloads

Red_in_the_woods.png

#14 Random Terrain ONLINE  

Random Terrain

    Visual batari Basic User

  • 20,911 posts
  • Controlled Randomness
    Replay Value
    Nonlinear
  • Location:North Carolina (USA)

Posted Sat Oct 25, 2008 2:14 AM

Thanks for the example code. Looks pretty cool.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users