KevKelley Posted January 14, 2020 Share Posted January 14, 2020 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. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted January 14, 2020 Share Posted January 14, 2020 Were the links unrelated to your problem? https://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#priority_links Quote Link to comment Share on other sites More sharing options...
KevKelley Posted January 14, 2020 Author Share Posted January 14, 2020 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. Quote Link to comment Share on other sites More sharing options...
KevKelley Posted January 14, 2020 Author Share Posted January 14, 2020 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. Quote Link to comment Share on other sites More sharing options...
+Random Terrain Posted January 14, 2020 Share Posted January 14, 2020 (edited) 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 January 14, 2020 by Random Terrain Quote Link to comment Share on other sites More sharing options...
KevKelley Posted January 15, 2020 Author Share Posted January 15, 2020 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 Quote Link to comment Share on other sites More sharing options...
TwentySixHundred Posted January 16, 2020 Share Posted January 16, 2020 (edited) 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 January 16, 2020 by TwentySixHundred Quote Link to comment Share on other sites More sharing options...
KevKelley Posted January 16, 2020 Author Share Posted January 16, 2020 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.