Jump to content
KevKelley

Moving Over/Under Playfield on Certain Lines

Recommended Posts

I haven't found any specific answers on this, but when using CTRLPF $x7, is there a way to make this work on certain lines?

 

For example, if you wanted to go behind the playfield above a certain y-coordinate but anything below and the sprite would be drawn over the playfield.

 

 

Share this post


Link to post
Share on other sites

It was my understanding from that link that it meant prioritizing Player0 over Player1 or  the reverse. I will reread it.

 

Or what that thread means is that you can choose Player1 or Player0 to go above or behind the playfield?

 

Basically I was looking for a scenario like this: 

 

Player0 is on the top of the screen. Any playfield at the top Player0 goes behind. Any playfield below Player0 goes behind. 

 

 

Share this post


Link to post
Share on other sites

Sorry if my question is simple. I will reread everything when I get home and try to test some things out. I was playing around with some ideas and want to understand better.

Share this post


Link to post
Share on other sites
5 hours ago, KevKelley said:

Player0 is on the top of the screen. Any playfield at the top Player0 goes behind. Any playfield below Player0 goes behind.

 

Yeah, it looks like the link is only talking about sprite on sprite action.

 

Could you look at the y position and move the sprite in front or back of a playfield row as the sprite moves up and down? Or is the playfield always changing so you don't know where the row would be?

Edited by Random Terrain

Share this post


Link to post
Share on other sites

The bottom few playfield rows pretty much stay the same. I have them redrawn causing them to move but only horizontally.

 

I realized after I started working on things that the effect I was looking for wasn't going to work. I was going for a particular aesthetic but I don't think it would work out logistically for the gameplay.

 

But I had thoughts for future games where having both actions on the same screen could offer some interesting options. I had considered swapping background and playfield colors for certain rows depending on Player0 coordinates or changing that CTRLPF depending on Player0 coordinates as well.

 

On the plus side, reading and rereading your site, example programs, and forums has helped me move forward on some things 

Share this post


Link to post
Share on other sites

So what you're looking for is something like this?

 if player0y > 80 then CTRLPF = $05 else CTRLPF = $01

That would give the effect of both player0 and virtual sprites going behind the playfield when player0's y axis is under about half the screen or wherever. I haven't tested this code so not 100% sure if it works, it was just off the top of my head.

 

From what i recall this is a TIA hardware register that changes the priority of both sprites rather then one alone. So having said that the feature is either on or off unless there is a way to manipulate the register that i don't know of.

Edited by TwentySixHundred

Share this post


Link to post
Share on other sites

Pretty much.  But then I realized I still needed sprites to be hidden above the coordinate too so I made some creative changes to my program.  

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...