Game Development Reference
In-Depth Information
//double sx, sy, sz mapped to short
//double tn, bs, ct mapped to byte
sht = key->frame;
if (key->linear) sht |= 0x8000;
ar.Write(&sht, sizeof(USHORT));
WriteShortVector(ar, key->x, scale[0], key->y, scale[1],
key->z, scale[2]);
WriteShortVector(ar, key->h, scale[3], key->p, scale[4],
key->b, scale[5]);
WriteShortVector(ar, key->sx, scale[6], key->sy, scale[7],
key->sz, scale[8]);
byt = (char)(key->tn * 128.0);
ar.Write(&byt, sizeof(char));
byt = (char)(key->bs * 128.0);
ar.Write(&byt, sizeof(char));
byt = (char)(key->ct * 128.0);
ar.Write(&byt, sizeof(char));
Strategies for delivering content quicker
If you have experienced the Internet via a dial-up modem, then you will
know it can be very frustrating.
For many users this is the way they will see your content. You owe it to
them to deliver this content as quickly as possible. We can approach this
in one of three ways.
Using loading scenes
The simplest technique is to use loading screens. By keeping loading
screens small, the browser will at least be able to display some content.
If the loading screen includes game play instructions, then this can keep
the user occupied while the actual content downloads. A useful method is
to load the main character while the user is reading game instructions.
When the main character is loaded you can switch to a scene where the
main character can be displayed, often including some animation. This
could be used to provide some background to the game while the first
environment loads. As the navigation through the 3D environment
evolves, you may need to return to the main character scene or the pre-
loader if your code detects that resources are not yet available. It is a very
Search Nedrilad ::

Custom Search