Vectors display slightly wobbly and flickery

Started by hcmffm, November 13, 2016, 06:11:35 PM

Previous topic - Next topic

hcmffm

My Vectrex friend had the Vectrex32 cartridge for some time. He tried the Vectrex32 out and did some programming. His feelings were so-so. Apart from the somewhat cumbersome way of developing programs (no real debugging, no hot-code replacement, ...) the way the vectors are displayed made him frown. He said that the vectors would slightly flicker and wobble.
We tried the Vectrex32 on two of my Vectrexes and right: The vectors are displayed a bit wobbly and a bit flickery. This can be seen in the menu (text) of the Vectrex32 and in Moon Lander: All lines wobble and slightly vary their positions plus the whole display slightly flickers. Other games like Minestorm run on those Vectrex consoles display the vectors 100 flicker-free and without any wobble.

Is there a reason why graphics generated by the Vectrex32 slightly wobble and flicker? Could something be done about this?

Vectrex32

The wobbling might be the "pen drift" problem which is discussed in the Vectrex32 manual, section 6.5. If you're drawing a lot of objects, try putting ReturnToOrigin sprites in between some of them.

Flickering can sometimes be improved by changing the frame rate, using the SetFrameRate function. The default is 30; try increasing it to 50 or 60.

Vectrex32 uses the Vectrex BIOS' line-drawing routines so in theory, wobbling and flickering should be no worse with Vectrex32 than with Vectrex. But programmers have always had to be careful about how many lines they draw and how often they reset the pen to the origin.

I'd be interested in any suggestions you have about debugging. It's true there's no hot-code replacement; you'd need BASIC line numbers or a built-in text editor for that. But as for "no real debugging": there's breakpoints, tracing, single-stepping, and the ability to examine and modify variables. What else would you want for "real debugging"?

- Bob

Vectrex32

I just did an experiment jacking the frame rate up to 120 and it made a big difference with wobble and flickering.

- Bob

hcmffm

Quote from: Vectrex32 on November 13, 2016, 06:40:54 PM
I just did an experiment jacking the frame rate up to 120 and it made a big difference with wobble and flickering.
Sounds good. Is there a reason why the Vectrex32 main menu and Moonlander use 30 frames/s and not a higher framerate?

Vectrex32

Quote from: hcmffm on November 14, 2016, 05:27:50 PM
Is there a reason why the Vectrex32 main menu and Moonlander use 30 frames/s and not a higher framerate?

No good reason; I just didn't think to experiment with different frame rates at the time. Since they're written in BASIC, it's easy for anyone to change them.

- Bob

LamerDeluxe

I notice that in the 3D demo that the tie fighters wobble while rotating, but are pretty stable when they are stationary. I wonder what could be causing that, I expect the floating point calculations of the 32 bit CPU would have enough precision to not be the cause.

Vectrex32

The calculations might be high precision, but the Vectrex DAC is still just 8 bit resolution.

- Bob

LamerDeluxe

#7
Yes, that is true, the positioning of the Vectrex vectors is at a pretty low resolution.

EDIT: Which makes me think that it should be possible to create a 'Vectrex 2' mainboard that has higher resolution DACs, a CPU and flash memory like the Vectrex32, improved audio and emulation for backwards compatibility. Then you would replace the original main board with this one, that would be pretty cool. Though I don't know if the high voltage parts are on the main boards as well. 

LamerDeluxe

Being the Vectrex32 noob that I am, it suddenly occured to me that the scaling factor would have something to do with this. So I changed my rotating box program to a much smaller scale and it is rotating really smoothly now.

I also notice that it now automatically uses multiple segments per line, which is really cool. They switch between three and four segments (with the corner pixels blinking in sync, which looks interesting), probably because of rounding errors.

This made me think. For positioning exactly, you could position with a larger scale for the initial long distance and then a much smaller scale to position much more exactly. This would make things move very smoothly all over the screen.

Vectrex32

Yup. If you draw a long line at a small scale, the V32 breaks it into multiple lines.

- Bob

LamerDeluxe

Just saw where it says this in the manual. I now have a rotating box that fades in and out, looks really cool on the vector display.

Vectrex32

I hope the fading in and out is intentional on your part. ;-)

LamerDeluxe

Haha, yes it is  :)

Can't wait to use more of the power of the 32-bit CPU.