Jump to content



1

Disappointed with my ball


5 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 3:50 AM

Being the perpetual newbie, I thought if I changed the colors of the playfield pixels using pfcolors, I might be able to have a ball that was a different color from the playfield pixels by using COLUPF. I was wrong. The ball is the same color as the pfcolors data instead. I guess there's nothing you can do to have a ball of a different color (unless you have a can of paint and some alone time).

Edited by Random Terrain, Tue Oct 21, 2008 5:53 AM.


#2 Robert M OFFLINE  

Robert M

    Stargunner

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

Posted Tue Oct 21, 2008 6:29 AM

View PostRandom Terrain, on Tue Oct 21, 2008 5:50 AM, said:

Being the perpetual newbie, I thought if I changed the colors of the playfield pixels using pfcolors, I might be able to have a ball that was a different color from the playfield pixels by using COLUPF. I was wrong. The ball is the same color as the pfcolors data instead. I guess there's nothing you can do to have a ball of a different color (unless you have a can of paint and some alone time).

There is one way to get a different color ball, but I don't think you will like it. If you set bit 1 in the CTRLPF register you enable score mode. In Score mode the left side PF is the color in COLUP0 and the right side PF in the color in COLUP1. The ball is still the color in COLUPF. Of course, now the PF is the same color(s) as the sprites.

Cheers!

#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 7:55 AM

View PostRobert M, on Tue Oct 21, 2008 7:29 AM, said:

There is one way to get a different color ball, but I don't think you will like it. If you set bit 1 in the CTRLPF register you enable score mode. In Score mode the left side PF is the color in COLUP0 and the right side PF in the color in COLUP1. The ball is still the color in COLUPF. Of course, now the PF is the same color(s) as the sprites.
Thanks. I'll see what kind of mangled mess I can make with that. Might be useful for some type of game.

#4 yuppicide OFFLINE  

yuppicide

    I am the Black Knight. Give me your money!

  • 6,933 posts
  • Location:New Jersey

Posted Tue Oct 21, 2008 9:29 AM

He likes to say perpetual newbie, but he seems to be doing a lot more than I can sometimes. He seems to fix a lot of my problems/answers so I'm more of a newbie than you. :)

Edited by yuppicide, Tue Oct 21, 2008 9:30 AM.


#5 Robert M OFFLINE  

Robert M

    Stargunner

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

Posted Tue Oct 21, 2008 7:28 PM

View PostRandom Terrain, on Tue Oct 21, 2008 9:55 AM, said:

View PostRobert M, on Tue Oct 21, 2008 7:29 AM, said:

There is one way to get a different color ball, but I don't think you will like it. If you set bit 1 in the CTRLPF register you enable score mode. In Score mode the left side PF is the color in COLUP0 and the right side PF in the color in COLUP1. The ball is still the color in COLUPF. Of course, now the PF is the same color(s) as the sprites.
Thanks. I'll see what kind of mangled mess I can make with that. Might be useful for some type of game.


You have another option if you don't care about the color of the ball as long as it is not the same as the PF. What you do is rotate using the M1, M0, and Ball objects each frame. Then the ball and missles become flashing color like the chalice in Adventure.

I use this technique in my hero themed shooter demo posted in this forum somewhere. Each frame you nee to do something like this:
   rem * rotate objects to get flickery mixed colors.
   temp = ballx
   ballx = missile0x
   missile0x = missile1x
   missle1x = temp

   temp = bally
   bally = missile0y
   missile0y = missile1y
   missile1y = temp

   rem * rotatecount keeps track of which screen object is used to draw each game object.
   rem *		
   rem * rotatecount = 0 means   ball = P0 shot, M0 = P1 shot, M1 = treasure
   rem * rotatecount = 1 means   ball = P1 shot, M0 = treasure, M1 = P0 shot
   rem * rotatecount = 2 means   ball = treasure, M0 = P0 shot, M1 = P1 shot 
   if rotatecount then rotatecount = rotatecount - 1 else rotatecount = 2

   drawscreen

   rem * Jump to routine to map ball, m0 and m1 collisions to the objects they represent this frame.
   on rotatecount goto collisonmap1 collisionmap2 collisionmap3


#6 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:21 PM

Thanks. I might end up with no missiles, so I'm playing with your first example to see what's possible.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users