Jump to content
IGNORED

Scrolling(Offscreen) sprites


flame

Recommended Posts

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 ?

Link to comment
Share on other sites

In Barnstorming, take note of the black strip along the left side of the screen.

image.thumb.png.ec41b7ac02deb811efaa85ec82e745ed.png

 

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

 

Link to comment
Share on other sites

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: 

 

2142280677_ScreenShot2020-03-26at10_57_27AM.thumb.png.a9a8c433a2b21d3ebd3c831d08b5b78d.png

 

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.

  • Like 1
Link to comment
Share on other sites

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: 

 

2142280677_ScreenShot2020-03-26at10_57_27AM.thumb.png.a9a8c433a2b21d3ebd3c831d08b5b78d.png

 

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 by JetSetIlly
  • Like 1
Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

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...