Jump to content
IGNORED

Sprite blurs when moving left or right - any solution?


Islay

Recommended Posts

Hello!

I am new to the Atari 7800 and i am currently playing with the source code of a sprite example i found.

Here is the link to the example: https://atarihq.com/danb/files/7800sprt.s

 

The demo makes use of the two colour / 320 pixel mode. So far i have modified the code to display 16 pixel wide animated sprite (only two frames). Now i noticed that there is an annoying blur effect when i move the sprite left or right. At first i did not notice it, but once i became aware of it, it became a bit of a nuisance.

 

I wonder if there is a way to get rid of the blur or if it is the expected behaviour of a sprite? I checked some games and noticed that this effect is, to a certain extend, present in other games. In Dark Chambers the effect is clearly visible, as long as the Level is not scrolling. But when the level scrolls the effect is gone. I wonder if the solution would be to overwrite the background before drawing the new sprite - yet overwriting the sprite (white) with a transparent colour (black) will probably have no effect at all.

 

Does anyone know if there is a way to get rid of this effect?

Up and Down movement seems to be fine though.

Link to comment
Share on other sites

I think I know what you're referring to, but if it is then it's just down to your monitor and is pretty normal (assuming you don't have a blur effect on your emulator). I'm guessing your background is the default black; if you set it to something brighter then you should see the effect lessen.

 

  • Like 1
Link to comment
Share on other sites

Thank you for your reply.

30 minutes ago, SmittyB said:

(assuming you don't have a blur effect on your emulator)

Sorry i did not mention, that i am actually using a7800 as my only option to try "my" program. I encounter this very effect when using the emulator. Anyway, like you suggested, i tried different and brighter background colours - yet it still was visible albeit harder to notice due to less contrast. It's not an "afterglow" as one could sometimes witness on CRTs. For the picture drawn by the emulator is very crisp i suppose there is no filter turned on - well at least i did not turn on any filter knowingly. I once tried an ntsc filter (running the Atari 7800 emulation in MAME) and it look quiet as blury as on a real TV. I have to admit, that this way the effect was less of a nuisance than before, but still visible.


For i am unable to describe how it look, i attached an a78 file created from the original source code i linked above. If you move the sprite left or right, it looks like the left and right border of the sprite double in size.

 

I think i might try to put a black sprite behind the white one (to clear the screen) and see what will happen.

7800sprt.a78

Link to comment
Share on other sites

The blur effect is due to the fact that the 7800 can only position sprites horizontally based on 160 pixels and not 320.    It's one of the quirks of the Atari 7800 system.  Your sprite pixels are very thin (1px in 320px mode), so it's going to be more pronounced due to the fact that you sprite is really moving 2 pixels at a time horizontally instead of just 1.

 

As for a solution, you'll need to avoid use 1px widths to hide the effect.

  • Like 1
Link to comment
Share on other sites

2 hours ago, splendidnut said:

The blur effect is due to the fact that the 7800 can only position sprites horizontally based on 160 pixels and not 320.    It's one of the quirks of the Atari 7800 system.  Your sprite pixels are very thin (1px in 320px mode), so it's going to be more pronounced due to the fact that you sprite is really moving 2 pixels at a time horizontally instead of just 1.

 

As for a solution, you'll need to avoid use 1px widths to hide the effect.

You can do smooth horizontal movement in 320 using separate sprites for even and odd columns.

 

I'd recommend getting comfortable with 160A before delving into other modes.

  • Like 2
Link to comment
Share on other sites

32 minutes ago, Pat Brady said:

You can do smooth horizontal movement in 320 using separate sprites for even and odd columns.

 

I'd recommend getting comfortable with 160A before delving into other modes.

Nice - we have to do this on the 8-bit computers to get smooth scrolling in hi-res (even text) mode for the same reason.  The machine can do 320 pixel resolution, but the hardware only scrolls in 160 pixel (colour clock) resolution.  BUT - if we have 2 fonts, 1 pixel apart, we can simulate 320-pixel smooth scroll.

Link to comment
Share on other sites

Thank you for the help.

Because i am a newbie i am not sure that i made all the necessary changes to the source code. It will probably take me some time to figure out what changes i actually have to make to get everything into 160 pixel mode.

The quick changes i made (to CTRL and the DL entry) didn't result in a solution to my "problem" so far. Upon movement it still blurs. I still wonder why there is no blur in Dark Chambers when the background in scrolling.

Well, maybe i will ignore it until i am able to produce a scrolling background and do some experiments with it.

 

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