Jump to content
IGNORED

Interlacing, Multi-sprites, and More


Recommended Posts

I'm working on a board game that is played on a checkerboard-patterned board. I've drawn the board so far using reflected PF1/2 and the ball (although there's an extra half-square every other line - should not be tough to fix.) I've seen Video Chess and its Venetian Blinds technique, and I am honestly not impressed : )

 

Attached is the Big Board I did. Ignore the extra-long bottom squares: they're an artifact of the Color/BW switch to change between NTSC and PAL.

Now I need a way to put sprites (pieces) on it. I've designed some 8-bit sprites and set NUSIZ0/1 to draw double-wide sprites, hoping to fill the board with some big objects. I'm looking at a couple of ways to do it. Here are my 2 questions so far:

 

1) Interlacing. Are there any known problems with interlacing (turn on VSYNC midway through scanline 253 on every other frame) that I should be aware of? I am hoping to use this to let me do a similar technique as Venetian Blinds, drawing only half the pieces every field, to give the final illusion that all the pieces are being drawn without gaps. Make sense?

 

2) Multiple sprites on one line: Can it be done no-flicker with double-wide sprites? GRP0/1 WILL need to be updated mid-line (multiple types of pieces). Some pieces are red and others are blue. If interlacing works or I go with Venetian Blinds I need 4 sprites per line, but otherwise it would be up to 8. Check the size of the squares below and maybe that will help you determine if I can fit the code in. I'm somewhat worried that I need NUSIZ0/1 to be set for copies and can't do double-wide in order to do multi-sprite, but I am also thinking I can cheat by doing the left half of each piece with GRP0 and right-half with GRP1.

 

Any pointers on where I should look for this info? My brain's working a little slow right now so pardon my wording of the questions.

post-12384-1179180483_thumb.png

Edited by Hornpipe2
Link to comment
Share on other sites

1) Interlacing. Are there any known problems with interlacing (turn on VSYNC midway through scanline 253 on every other frame) that I should be aware of? I am hoping to use this to let me do a similar technique as Venetian Blinds, drawing only half the pieces every field, to give the final illusion that all the pieces are being drawn without gaps. Make sense?

There would be no real advantage to using interlacing for that, as I don't think it would produce the results you're hoping for. Instead, I would suggest flickering Venetian blinds.

 

2) Multiple sprites on one line: Can it be done no-flicker with double-wide sprites? GRP0/1 WILL need to be updated mid-line (multiple types of pieces). Some pieces are red and others are blue. If interlacing works or I go with Venetian Blinds I need 4 sprites per line, but otherwise it would be up to 8. Check the size of the squares below and maybe that will help you determine if I can fit the code in. I'm somewhat worried that I need NUSIZ0/1 to be set for copies and can't do double-wide in order to do multi-sprite, but I am also thinking I can cheat by doing the left half of each piece with GRP0 and right-half with GRP1.

You can't display more than one copy of a player on a line if the player is double-wide or quadruple-wide, so I don't think that will give you what you're hoping for.

 

However, one thing you might try (aside from flickering Venetian blinds) is to use the two missiles in addition to the players. They might be able to give you another man per line, by varying the width and x position of the missile to get a simple shape (maybe for the bishops, for example?).

 

Michael

Link to comment
Share on other sites

I'm working on a board game that is played on a checkerboard-patterned board. I've drawn the board so far using reflected PF1/2 and the ball (although there's an extra half-square every other line - should not be tough to fix.) I've seen Video Chess and its Venetian Blinds technique, and I am honestly not impressed : )

 

Flickering objects in front of a non-uniform background like a checkerboard will look bad unless you flicker the background; flickering the background will of course make everything "flickery".

 

It's possible to make a pretty decent-looking chessboard using the playfield for the pieces and sprites for the squares (no flicker), but RAM requirements are excessive. With a SuperChip things would probably work okay, but I don't think the approach would be practical without it.

Link to comment
Share on other sites

I don't know what I was thinking earlier - of course interlacing won't help me avoid the gaps! The only thing I guess I could do with that is get essentially double the vertical resolution - making the blinds half as wide (twice as many per piece) and so the effect would appear less drastic. I will probably still use it since it doesn't seem like it would add too much to the complexity of my code.

 

Thanks for the tips though. Do you think using GRP0 for left-half and GRP1 for right-half of sprites I can put enough pieces on screen using Venetian Blinds? I'll play with it some more tomorrow and see what I can come up with. Unfortunately I am thinking this would be impossible since that would be 8 sprites/line which Video Chess didn't manage, but the gaps between pieces are larger so maybe enough time is available for sprite setup?

Link to comment
Share on other sites

Unfortunately I am thinking this would be impossible since that would be 8 sprites/line which Video Chess didn't manage, but the gaps between pieces are larger so maybe enough time is available for sprite setup?

 

I don't think you're going to get 8 different sprites/line usefully without using flicker or blinds. A multi-RESP kernel may let you manage some things you wouldn't be able to do otherwise (e.g. a 9x9 Sudoku kernel using Venetian blinds, where each digit may be independently displayed in one of two colors) but the 2600 isn't designed to push around oodles of sprites. It can sometimes go well beyond what it was designed for, but the details of multi-RESP behavior cause it to be much more restrictive than one might like.

Link to comment
Share on other sites

I've decided to go with 8-bit sprites, 4 per line, using the Venetian Blinds technique like in Video Chess. It still looks good on the larger board (just tried it).

 

Now I'd like to ask more questions about interlacing. I think I can use it to not only simplify my kernel, but also to make my blinds twice as fine for an improved appearance. Here's my understanding of how to make it happen:

* Every even-numbered frame, draw 262 scanlines. Then waste half (38 cycles) of scanline 263, and then enter VBLANK/VSYNC. Start the kernel from here.

* Every odd-numbered frame, enter VBLANK/VSYNC immediately following scanline 262.

 

1) How is Stella's handling of interlaced games?

2) Are there interlaced games I can look at for examples on how to achieve the effect?

3) What about doing the same for PAL? I want my BW/Color switch to swap between NTSC and PAL.

4) What does it look like on a real TV?

5) Any idea if it works on the Flashback 2?

6) Are there ANY compatibility issues with interlacing? I don't want to do it if it's not going to work for some people.

Edited by Hornpipe2
Link to comment
Share on other sites

Is it even possible for the 2600 to skip half a scanline height?

 

BTW here's a hack of Video Chess that skips a full scanline every other frame...

That's a neat way to do it! Unfortunately, it's rather jarring on the emulator (how does it look on a TV?).

 

Instead, I might consider: Every frame switch what group of 4 pieces is drawn first. E.g. if I was doing two rooks side-by-side:

 

Frame 1:

. . . . . . | X . X . X .

X . X . X . | . . . . . .

. . . . . . | X X X X X .

X X X X X . | . . . . . .

. . . . . . | X X X X X .

X X X X X . | . . . . . .

 

Frame 2:

X . X . X . | . . . . . .

. . . . . . | X . X . X .

X X X X X . | . . . . . .

. . . . . . | X X X X X .

X X X X X . | . . . . . .

. . . . . . | X X X X X .

 

It leads to a 30hz 'flicker', but is probably less flickery than doing 'whole piece on/off at once' - I'm simply swapping the blinds back and forth very quickly. This might be the best way for me to do it. I am still curious about interlacing though as I'd rather use that I think. The alternative (using the Video Chess method on the big board) takes some mid-scanline HMOVE use to offset sprites twice as far, and I know this is not entirely portable to 2600jrs. I am looking for maximum compatibility on actual 2600s first of all.

Edited by Hornpipe2
Link to comment
Share on other sites

Interlacing won't make the Venetian blinds thinner. If anything, it should make them look fatter-- but they'll still be spaced the same distance apart, so the gaps in-between them will be thinner.

 

In a normal (non-interlaced) Atari 2600 screen, two consecutive frames-- and the result of combining them together-- should look something like this, if you're displaying Venetian blinds:

 

|   1st Frame:   |   2nd Frame:   |  Combination:  |
|----	----	|----	----	|----	----	|
|	----	----|	----	----|	----	----|
|----	----	|----	----	|----	----	|
|	----	----|	----	----|	----	----|

Since the Venetian blind "slats" of the second frame are displayed exactly on top of the ones in the first frame (if you aren't using flickering), they will be 1 scan line wide, with 1 non-interlaced scan line between them-- or, if you want to measure the separation in terms of *interlaced* scan lines, there are *3* interlaced scan lines between them.

 

If you keep the same Venetian blinds display, but use interlacing, such that the lines of the second field are in-between the lines of the first field, then the results would be something like this:

 

|   1st Field:   |   2nd Field:   |  Combination:  |
|----	----	|____	____	|[u]----[/u]	[u]----[/u]	|
|	----	----|	____	____|	[u]----[/u]	[u]----[/u]|
|----	----	|____	____	|[u]----[/u]	[u]----[/u]	|
|	----	----|	____	____|	[u]----[/u]	[u]----[/u]|

Now, since the "slats" of the two fields are so close together, they should look like a single "slat," only twice as fat as with non-interlacing. Furthermore, the gaps between the "slats" will be thinner-- only 2 lines, instead of 3.

 

Michael

Link to comment
Share on other sites

Sorry, that didn't turn out like I'd hoped. This is more like what I was trying to show for the combination:

|====	====	|
|	====	====|
|====	====	|
|	====	====|

Michael

 

My idea was to use interlacing and on the odd field, draw pieces 0, 2, 4, and 6. On the even field draw pieces 1, 3, 5, and 7. So:

 

| Field 1  | Field 2  | Interlaced
| ----     |     ---- | ----____
| ----     |     ---- | ----____
| ----     |     ---- | ----____
| ----     |     ---- | ----____

 

PS for anyone interested in interlacing, this message from the Stella archives shows how to do it: http://www.biglist.com/lists/stella/archiv...8/msg00110.html

 

Still curious on whether there have been incompatabilities raised about this, especially with FB2 users (since I don't own a 2600 myself, only a hacked FB2 Rev. B)

Link to comment
Share on other sites

That's a neat way to do it! Unfortunately, it's rather jarring on the emulator (how does it look on a TV?).

 

Instead, I might consider: Every frame switch what group of 4 pieces is drawn first. E.g. if I was doing two rooks side-by-side:

 

Frame 1:

. . . . . . | X . X . X .

X . X . X . | . . . . . .

. . . . . . | X X X X X .

X X X X X . | . . . . . .

. . . . . . | X X X X X .

X X X X X . | . . . . . .

 

Frame 2:

X . X . X . | . . . . . .

. . . . . . | X . X . X .

X X X X X . | . . . . . .

. . . . . . | X X X X X .

X X X X X . | . . . . . .

. . . . . . | X X X X X .

 

It leads to a 30hz 'flicker', but is probably less flickery than doing 'whole piece on/off at once' - I'm simply swapping the blinds back and forth very quickly. This might be the best way for me to do it. I am still curious about interlacing though as I'd rather use that I think. The alternative (using the Video Chess method on the big board) takes some mid-scanline HMOVE use to offset sprites twice as far, and I know this is not entirely portable to 2600jrs. I am looking for maximum compatibility on actual 2600s first of all.

 

It's just a rough hack that adds a full blank scanline either at the top or bottom of the display (meaning not only are the sprites being shifted, but also the playfield). Other than the board itself being shifted, the visual effect would be the same as swapping the blinds. In both cases, you get "slats" that appear at 30hz. Granted, a static background would improve the wobble a bit.

Link to comment
Share on other sites

Okay, I've put together what I think is an interlaced demo. The gig is up, I'm attempting to write (from scratch) a version of chess that is better than Video Chess in every way... When I finish I'll post some logs of my game vs. Video Chess so you can see who wins!

 

Here's a screenshot from Z26, and attached is a preliminary binary. Please please please, anyone out there with a way to test this on a real 2600: does it interlace or flicker?! I have to get this working before I even think about moving on.

post-12384-1179264096_thumb.png

chess001.bin

Link to comment
Share on other sites

Here's a screenshot from Z26, and attached is a preliminary binary. Please please please, anyone out there with a way to test this on a real 2600: does it interlace or flicker?! I have to get this working before I even think about moving on.

 

Shifting the atlernate frames by half a scan line isn't going to fix the fundamental problem with flicker, which is that the pieces in front of light squares are going to appear much lighter than those in front of dark squares.

 

If the problem can be solved, your best chance at doing so would be to use darker colors when showing the pieces in front of light squares than when you're showing them in front of dark ones. Minimizing the light/dark square contrast would also be helpful.

 

I think it's probably possible to do venetian blinds with your wide spacing, but the code's apt to be nasty (not emulator compatible). If use of proper colors would make flicker-blinds look good with an Atari-sized board, I think that would be the way to go.

Link to comment
Share on other sites

Here's a screenshot from Z26, and attached is a preliminary binary. Please please please, anyone out there with a way to test this on a real 2600: does it interlace or flicker?! I have to get this working before I even think about moving on.

 

Shifting the atlernate frames by half a scan line isn't going to fix the fundamental problem with flicker, which is that the pieces in front of light squares are going to appear much lighter than those in front of dark squares.

 

If the problem can be solved, your best chance at doing so would be to use darker colors when showing the pieces in front of light squares than when you're showing them in front of dark ones. Minimizing the light/dark square contrast would also be helpful.

 

I think it's probably possible to do venetian blinds with your wide spacing, but the code's apt to be nasty (not emulator compatible). If use of proper colors would make flicker-blinds look good with an Atari-sized board, I think that would be the way to go.

 

If what I have so far works on a real 2600, I'll play with the colors some more and then go with that. (Colors have to be changed mid-line anyway)

If not, it's back to the drawing board.

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