Jump to content
IGNORED

Multi Sprite Flickering at Vertical Boundries


Gemintronic

Recommended Posts

All I can pass along is what I have seen in the DPC+ Kernel, which is similar to the multisprite in a lot of ways.

In DPC+, sprites have to have at least seven lines between them or they intelligently flicker.

In DK Arcade 2600, you can see when the barrels appear new at the top, ALL the virtual sprites flicker a frame, (the barrel, the 2 hammers, any other on-screen barrels.) This was the first time I noticed that behaviour.

 

One other thing that can cause them to start intelligently flickering is if they are close to off-screen sprites. Now DPC+ offscreen is not Y=0, I have been using Y=200 to move them offscreen. I don't know if the kernel you use works that way or not.

 

Setting playerheights larger than displayed pixels can cause flicker, I think, if they become close. Maybe set playerheights to 0 when offscreen? Again, I'm only guessing here.

  • Like 2
Link to comment
Share on other sites

That's a big clue iesposta. Thanks!

 

I set the playerxheight to 0 to effectively blank out the sprite without resorting to a line like this:

 

player1:

........

end

 

As long as they share the same virtual y the engine may be flickering them even when no need exists. I'll run some experiments to see if that's the case!

  • Like 1
Link to comment
Share on other sites

It isn't the normal flicker and it doesn't only do it for a height of 0

 

I'm guessing the sorting routine is getting confused some way

 

if you set things up so you can step players1..5 you can see that

they completely disappear. does it with the height set to 1 or 2

also. I haven't played with it enough to figure out what's going

on, I don't know if it's position or overlap or what.

also it doesn't seem to do it if at least one of the parked

sprites has a height >2

 

I don't see anything in your code.

 

 

you have a hole in your heart(s)

Edited by bogax
Link to comment
Share on other sites

I think I have it solved.. enough :) Still flickers at the bottom.

msflicker2.bas

msflicker2.bin

When a sprite needs to clear off the screen it wasn't enough just to change the height to 0. I set each sprites off-screen position 10 pixels away vertically from any other sprite.

 

player1y = 110 : player2y = 120 : player3y = 130 : player4y = 140 : player5y = 150

Normally I'd be afraid the sprites would warp and go funky with off screen positions like this but it didn't happen. Just try going off-screen vertically with the first sprite to see what I mean.

 

The hole in the heart is supposed to represent the shine coming off the heart from a light source. Unfortunately, since you get one color, I had to use a transparent pixel which doesn't look right on a black background.

Link to comment
Share on other sites

Two off topic suggestions

 

rand is a call to a different bank, you might want to consider

using inlinerand

 

I'd try dealing with the sprites using indexing

 

Good idea about the rand. I'm not quite savvy enough to pick up on the sprite indexing. Could you explain that in more detail?

 

Right now I "launch" the sprites every 10 clicks of the counter variable. Assuming the sprites are moving down one pixel each iteration of the main loop this guarantees a 10 pixel vertical spacing between sprites (thus avoiding flicker).

Link to comment
Share on other sites

 

Good idea about the rand. I'm not quite savvy enough to pick up on the sprite indexing. Could you explain that in more detail?

 

Right now I "launch" the sprites every 10 clicks of the counter variable. Assuming the sprites are moving down one pixel each iteration of the main loop this guarantees a 10 pixel vertical spacing between sprites (thus avoiding flicker).

 

 

I'm afraid there's some junk in this code

but it should give you the idea.

 

msflicker_wloops.bas

 

for one thing, I modified the counter so it (partialy)

runs a little faster.

 

 

 

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