MSX1 VDP questions

By Timmy

Master (199)

Timmy's picture

08-02-2014, 16:34

I guess it's easier to post these questions on the correct part of the forum.

I was wondering if there is a (preferably easy) way to clip sprites against to the left or right side of a window without wasting another sprite?

Question 2) is the flickering noticable when you have more than 4 sprites on a horizontal line? Is it still okay to make games where sprites flicker or would you rather prefer 1-colour sprites as player/enemies?

Login or register to post comments

By ARTRAG

Enlighted (6923)

ARTRAG's picture

08-02-2014, 17:06

question 1)
no HW solution, you have to clip it by SW but it is a matter of ANDing your sprite shape with a mask
question 2)
Flickering depends on how you rotate the sprites and on the colors you have used for background and sprites. If you succeed in showing, in the current frame, always sprites that were disappeared in the previous frame, (you can yase 5th sprite info in the status register), flickering will be optimal and in general acceptable.

By Timmy

Master (199)

Timmy's picture

08-02-2014, 17:25

Thanks for the very useful answers. Smile

By Manuel

Ascended (19273)

Manuel's picture

08-02-2014, 17:33

Note that there are (several?) threads about sprite flickering strategies on this forum.

By ARTRAG

Enlighted (6923)

ARTRAG's picture

08-02-2014, 19:08

This was my proposal
Compared to sprite sorting that is even more performing, it is short and simple to cut & paste in any project

By hit9918

Prophet (2927)

hit9918's picture

08-02-2014, 22:11

but the rotate-to-5th method fails when there is more than just one sprite row. then sprites disappear.
copying the SAT reverse every second frame one can have plenty rows.

@Timmy, which kind of game you got in mind?
I suggest 2-color sprites and take whatever flicker it makes.

Making a sprite border.
If a sprite hits the border, dynamicaly create a border sprite that is stomped on top of it.
Needs a separate high priority sprite list.

By Huey

Prophet (2694)

Huey's picture

08-02-2014, 23:18

Timmy,

Sprite routines it something many people have spend their time with talking about. But the most simple approach is probably just as good (Well at least the comercial software companies didn't use complex sprite sorfting routines).

question 1) If you just make your playing field the same witdh as the screen. Then you do not have to mask the sprites. Only thing you need to set is the EC bit for the left side of the screen.

question 2) Just mirror (reverse) your SAT each interrupt (VLBANK). This will do for 95% of the real life cases. The other 5% you can avoid using clever level design.

By ARTRAG

Enlighted (6923)

ARTRAG's picture

09-02-2014, 09:24

SAT reversal is a good option even when you want overcame the limit of 32 sprites on screen.
Just keep a SAT in RAM with 64 entries and copy alternativey the first and the last 32 sprites.

By Timmy

Master (199)

Timmy's picture

09-02-2014, 17:09

hit9918 wrote:

@Timmy, which kind of game you got in mind?

The game will have a max of 3 monsters and 1 player on screen. (I designed it back with this 4 sprites on a line in mind.)
The plan is to have a playfield of 224x160 because that's the original resolution. But 256x160 is fine with me too.
4 sprites is not a problem, but I was wondering if I could get more colours into the sprites. It's nice to have more colours especially on the main player.

Huey wrote:

question 1) If you just make your playing field the same witdh as the screen. Then you do not have to mask the sprites. Only thing you need to set is the EC bit for the left side of the screen.

Thanks, this is how it currently works but the playing area feels too large right now. So I was looking for alternatives.
The idea to mask the sides of the sprites is interesting.

Quote:

question 2) Just mirror (reverse) your SAT each interrupt (VLBANK). This will do for 95% of the real life cases. The other 5% you can avoid using clever level design.

Thanks, in that case it's fine for now then. In my case there won't ever be more than 8 sprites on screen at once so mirroring is fine. Smile

ARTRAG wrote:

This was my proposal
Compared to sprite sorting that is even more performing, it is short and simple to cut & paste in any project

I'm still looking at it and trying to understand. It looks nice but perhaps with 8 sprites I don't have to do anything fancy (yet). Thanks. :)