Jump to content
IGNORED

ZOOMX2 in IntyBasic


Recommended Posts

Suppose I have a sprite:


    SPRITE 1,cloud1x+$300+ZOOMX2,cloud1y+$100,SPR59 + 7

If I am moving it a pixel at a time, it exits the screen normally, but when it comes back on the screen from the opposite side, half of it appears first on the left side instead of it gradually floating into screen, making for a IMO ugly entrance. Reading the manual, it seems like the left most it can be is 0, which causes the right half to appear suddenly. So I guess it is a rant or question if I can do anything about it?

Link to comment
Share on other sites

EDIT:  I missed the point that your sprite was magnified horizontally, so the comment below does not really apply.  Nonetheless, I leave it here for context.

 

 

 

10 hours ago, atari2600land said:

Suppose I have a sprite:

 


    SPRITE 1,cloud1x+$300+ZOOMX2,cloud1y+$100,SPR59 + 7

 

If I am moving it a pixel at a time, it exits the screen normally, but when it comes back on the screen from the opposite side, half of it appears first on the left side instead of it gradually floating into screen, making for a IMO ugly entrance. Reading the manual, it seems like the left most it can be is 0, which causes the right half to appear suddenly. So I guess it is a rant or question if I can do anything about it?

 

A couple of things to note:

  • Have you changed the scroll registers at all?
  • Do you have the border extension on?

 

By the default, the MOB coordinate plane is slightly larger than the background coordinate plane, extending to the left and the top a little bit to allow for the smooth transitions you are looking for.  It looks like this:

 

              +--------------------------------------------+
              |  OBJECT FIELD outer area                   |
              |   +---------------------------------------+|
              |   |  DISPLAYED AREA of object field       ||
              |   |                                       ||
              |   |                                       ||
              |   |                                       ||
              |   |                                       ||
              |   |                                       ||
              |   |                                       ||
              |   |                                       ||
              |   |                                       ||
              |   |                                       ||
              |   |                                       ||
              |   +---------------------------------------+|
              +--------------------------------------------+

Notice that, because the "object field" extends to the left side, X coordinate zero is actually outside of the "displayed area," allowing the sprite to smoothly go off-screen.

 

If you scroll the screen to its maximum, then you get something like this:

                 +--------------------------------------------+
                 |+---------------------------------------+   |
                 ||                                       |   |
                 ||                                       |   |
                 ||                                       |   |
                 ||                                       |   |
                 ||                                       |   |
                 ||                                       |   |
                 ||                                       |   |
                 ||                                       |   |
                 ||                                       |   |
                 ||                                       |   |
                 ||        DISPLAYED AREA of object field |   |
                 |+---------------------------------------+   |
                 |                    OBJECT FIELD outer area |
                 +--------------------------------------------+

Where the X coordinate zero is actually a the left edge of the "displayed area," which means that there is no more space to move it more.

 

So, your options are:

  • If you are not using horizontal scrolling, then reset the scroll registers to default (zero), and you're done.
  • If you are using scroll, or if for some reason you wish to shift the display slightly with the scroll registers (something I use in my game to "center" the screen display), then you will have to use the border extension.

The border extension is used mostly for scrolling to hide the new column or row that comes in while shifting the screen.

 

Consider the second screen illustration above, where the display has been shifted.  If you extend the border to cover the top and left column, you'll get this:

                 +--------------------------------------------+
                 |+---------------------------------------+   |
                 ||XX\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\|   |
                 ||XX\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\|   |
                 ||//                                     |   |
                 ||//                                     |   |
                 ||//                                     |   |
                 ||//                                     |   |
                 ||//                                     |   |
                 ||//                                     |   |
                 ||//                                     |   |
                 ||//                                     |   |
                 ||//      DISPLAYED AREA of object field |   |
                 |+---------------------------------------+   |
                 |                    OBJECT FIELD outer area |
                 +--------------------------------------------+

The downside is that now you've reduced your displayed playfield area by one row or one column or both.

 

There are two additional options, but they may or may not be practical depending on your program's limitations:

  • You could use one or more MOBs of a solid background color to cover the area.  It would have to be one with a higher priority than the others so that it can occlude them.  (This is what I do in Christmas Carol for the left tunnels.)
  • You could use solid background cards to cover the area and make sure that the MOBs have the "priority" bit cleared at the point they are going to cross over them.

I hope this helps.

 

    -dZ.

Edited by DZ-Jay
Link to comment
Share on other sites

Wow, I just realized I completely missed the part about your MOB being zoomed in the X axis.

 

Hmmm ... so my explanation and options above are moot.

 

I think realistically, your only options are the last ones I offered:

  • Using other MOBs to cover.
  • Using solid background cards to cover.

 

Link to comment
Share on other sites

I went with a third option: having 7 extra cloud MOBs and putting them in and then if it was at the left edge, make more code to handle it so it looks seamless. It sure is a roundabout way to do things, though. Here is the code solution plus a ROM to test it out with.

zipzap1.zip

Link to comment
Share on other sites

29 minutes ago, atari2600land said:

I went with a third option: having 7 extra cloud MOBs and putting them in and then if it was at the left edge, make more code to handle it so it looks seamless. It sure is a roundabout way to do things, though. Here is the code solution plus a ROM to test it out with.

zipzap1.zip 6.2 kB · 1 download

I just took a look at the ROM and the spaceship enters smoothly from the left side, but then it just abruptly disappears when it reaches the right edge of the screen.

 

    -dZ.

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