flame Posted March 25, 2020 Share Posted March 25, 2020 Hæ everyone, I am trying to figure out how to have objects show/hide as if they are coming on or going off the screen. Currently I check if the Player1 position (based on SpiceWare's advice) and skip GRP1 if it out of bounds to prevent wrapping. But of course this makes the entire sprite disappear and I wonder if there is a way of more elegantly hiding the pixels. Someone pointed me to the disassembly of Barnstorming that seems to be an example of what I am trying to accomplish and trying to wrap my head around it but I wonder if someone has an example implementation of this that is easier to understand what is going ? Quote Link to comment Share on other sites More sharing options...
+splendidnut Posted March 25, 2020 Share Posted March 25, 2020 In Barnstorming, take note of the black strip along the left side of the screen. For Barnstorming, the HMOVE register is strobed on every single line during the display kernel which causes that black strip to appear. Something along the lines of (quick example of a two scanline kernel): STA WSYNC STA HMOVE ;-- code to run during scanline STA WSYNC STA HMOVE ;-- code to run on next scanline Quote Link to comment Share on other sites More sharing options...
flame Posted March 25, 2020 Author Share Posted March 25, 2020 Are you saying this game is using the black strip to hide the sprite wrapping (in addition to the comb effect ?) Quote Link to comment Share on other sites More sharing options...
+splendidnut Posted March 25, 2020 Share Posted March 25, 2020 Yes. Quote Link to comment Share on other sites More sharing options...
flame Posted March 25, 2020 Author Share Posted March 25, 2020 ahh haha okei. Now I see. So it seems I either introduce black strips on each side or skip GRPx as I have been. Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 26, 2020 Share Posted March 26, 2020 If your players are 1x in size then you only need to use the HMOVE bar down the left. The other way to do it is to use additional graphics for the right and left edges of the screen. These would be used for a box that moves off the right side: If your players are 2x or 4x in size then use both the HMOVE bar and the additional graphics. I do this in Space Rocks and Draconian, though I use the ARM to create the additional graphics on the fly. 1 Quote Link to comment Share on other sites More sharing options...
flame Posted March 26, 2020 Author Share Posted March 26, 2020 My sprites are typically 2x, but I have some that are 4x—which are going to be the most problematic ! it occurred to me that I could use bit-shifting to mask, perhaps there is something there but perhaps there is not enough time ? Quote Link to comment Share on other sites More sharing options...
+SpiceWare Posted March 26, 2020 Share Posted March 26, 2020 I used just the mask in Stay Frosty 2, no HMOVE bar on the left. The boss fireball is a 4x player, you end up with some black gaps at the edge of the screen for 3 out of 4 frames, but it worked well enough: Quote Link to comment Share on other sites More sharing options...
JetSetIlly Posted March 26, 2020 Share Posted March 26, 2020 (edited) 1 hour ago, SpiceWare said: If your players are 1x in size then you only need to use the HMOVE bar down the left. The other way to do it is to use additional graphics for the right and left edges of the screen. These would be used for a box that moves off the right side: If your players are 2x or 4x in size then use both the HMOVE bar and the additional graphics. I do this in Space Rocks and Draconian, though I use the ARM to create the additional graphics on the fly. He-Man is a good example of this technique too. Edited March 26, 2020 by JetSetIlly 1 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.