You are not logged in. | Register | Resend Activation

Graphics Overview

The Virtual Boy uses two Reflection Technologies P4 LED Displays, arranged so that they oscillate opposite of each other. Each display consists of a vertical column of 224 red LEDs and a mirror that oscillates horizontally. As the mirror moves forward the LEDs are toggled on and off in accordance with the times set out in the Column_Table in order to draw vertical columns of pixels on the display. There are a total of 384 columns resulting in a final image of 384×224 pixels. Since the left and right displays are 180-degrees out of phase with each other the screens are refreshed one after the other. Each display cycles at 50.2 Hz, so the total display period is 20ms. Each display refresh takes 5ms, so 10ms of the 20ms display cycle is given over to screen redraws. However since the VB has a total of 4 screen buffers it can generate a new image for each display while it is drawing the current image on the screens. Effectively this is a double buffer system (or a quadruple buffer).

Graphics on the VB are defined using Characters (Char), Background Maps (BGMap), Objects (Obj), and Worlds (World).

A char is a solitary character or 'sprite'. It is an 8×8-pixel tile that defines a 4-color image. This is the basic element that all images are created from. Both the BGMap and the OBJ elements are collections of Chars.

BGMaps are a linear (full) collection, of 64×64 chars, this is useful to display large scenes like background graphics.

OBJs are a random (sparse) collection, there are a maximum of 4 OBJ collections with each collection containing several individual objects. There is room to define 1024 Chars total for all four OBJ's. Each OBJ defines a row and column offset followed by a pointer to the char to display. Each char can be aligned on odd boundaries and independently of other chars. OBJ's are ideal for smaller sprites that move a lot, tend to overlap, or are very sparse.

Worlds are collections of BGMap's and OBJ's. There are a maximum of 32 worlds, with each world containing one BGMap or One OBJ collection. Worlds are layered on top of each other so that closer worlds cover up worlds farther away, this helps create a 3D effect.

The data contained in the BGMap's or OBJ's along with the parallax info stored in each world are used to ultimately generate the final image to display on the two screens in the VB. These different images, displayed to each of the user's eyes, are what produce the stereoscopic 3D effect. There are two ways to generate the 3D information with the internal sprite engine, hardware parallax or pre-rendered bitmaps. It is also possible to generate a 3D effect through direct screen rendering as well.

Hardware parallax is the easiest (and thus, more common) method requiring only a single image for each Char, shared between the two displays. To achieve a stereoscopic effect, each char has a different horizontal position for each eye, using the parallax attribute. Positive values for parallax push the image further away from you and negative values bring it closer. This tends to generate a relatively weak 3D effect, but it uses fewer system resources.

Animated Parallax Demonstration
Image 2.1 - Parallax demonstration

The other method, pre-rendered bitmaps, involves creating a separate image for each display. This creates 3D objects, instead of 'cardboard cut-outs' that are simply on different planes. Of course, when using this method, you can use the parallax method as well.

Finally by drawing directly to the display you can completely bypass the sprite engine altogether. This gives you the freedom to generate any size image with as much 3D information as you want. However you are forced to do all of the hard work yourself and you may be restricted by the processing power of the VB. It is also possible to combine direct screen draws with the sprite engine to get the best of both worlds. In this way you can use the sprite engine to render the GUI and direct screen draws to render the game graphics.

Table 2.1 - 3D Graphics mode comparison

Style Pros Cons
Hardware Parallax Only one OBJ required per 'character'
Takes up less room in ROM
Easier on art department
'Cardboard cut-out' effect isn't as realistic
Pre-rendered Bitmap Richer, more realistic graphics
Less work than direct screen draws
Any static 3D effect is possible
Takes more room in ROM
Halves available Chars, OBJs etc
Code is more complex
Direct screen drawing Dynamic 3d Effects are possible
No sprite limitations
Code is more complex
Limited CPU power for rendering

Discussion

RunnerPack, d.m.Y

IMO, table cells should be vertically aligned with CSS, not line-breaks. I took them out already; even if the CSS can't be edited soon, it doesn't look that bad w/out them.

 


Last modified: 07.08.2010