Inferno #02
01 мая 2001

Gameland - How to write a play. Volume 3. Part One.

<b>Gameland</b> - How to write a play. Volume 3. Part One.
        How to write a play. Volume 3

              Part Two

(C) Konstantin Dronov

 Item 4: Special Effects ... so here is difficult to say 
anything specific, but try it. Let's talk about the two special 
effects. Immediately make a reservation, usually in a raster

schedule all the visual effects be reduced to pre-proschitanoy 
animation, but I'll talk about what is being done without the 
animation and used in 3D games, but with interference

applicable here in 2D.

 1. Lighting in real time.

 We will not dwell on the static lighting, as it so clearly 
defined in advance example provide coverage of DOOM'a, but 
there is besides the static and dynamic similarity of the 
shots. But here we consider only the simplest way to dynamic 
lighting. 

 Lights in the game, usually presented in
the form of static images. But how
be with the light of the shots or the torch?
A very easy course to do even
less realistic picture without
ray tracing is not possible, something like the same
You can paint the picture. For example,
light propagates in all directions, but
in a circle. That is, you create a change in light raschityvaya 
the following formulas: 


             X: = SIN a * R

             Y: = COS a * R

where X, Y - coordinates, a - angle, R - radius

 Changing R, we obtain the trajectory of change in the 
intensity of light. You can pre- a table of values ​​in memory 
and work with it without wasting time on the calculation.

The circumference of the pixel to be selected manually at the 
maximum radius. Radius also pick up on the basis of changes in 
light intensity, which you ask. For example, the maximum 
intensity of 64, mean radius of 64 is not particularly want 
(although this is not correct for color illumination, which 
necessary to consider not one but three composes colors). 


 1.pust a = 0 is the angle, l-intensivnost light, 
m-circumference in pixels cintensivnost in the previous one 
point, k = 1vybrany you rate, Xy / Yy-Center Light source


 2.pust r = 0 is the radius, c = l

 3.berem data X, Y (according to formulas or
table if the table is better if
table would look like:


  angle a

        radius r


X00, Y00, X01, Y01, X02, Y02, ... ..., X0r, Y0r
X10, Y10, X11, Y11, X12, Y12, ... ..., X1r, Y1r
.......................................
Xa0, Ya0, Xa1, Ya1, Xa2, Ya2, ... ..., Xar, Yar


   ...)

 4.u = pixel color coordinate in the X + Xy, Y + Yy

 5.c = c-k

 6.u = c + u or try since u = (c + u) / 2,
that will give an interesting result, but then
Delete paragraph 5. This will emulate a shadow, the higher the 
object, the less he color code, but make sure whatever color

composes gradually changed color from
to color (R1G1B1 = R0 +1, G0 +1, B0 +1)

 7.u-> Record the coordinates of X + Xy, Y + Yy

 8.r = r +1

 9.esli r 




Other articles:

For Coderz - the translation algorithm of color image in gradations Spekrumovskogo gray.

Inferno - Managing obolchka magazine.

For Coderz - Aparatnye computer errors ATM-TURBO.

For Coderz - Description of a personal computer ATM-TURBO 1.

For Coderz - Description of a personal computer ATM-TURBO 2 +.

For Coderz - how to programmatically determine the number of strokes in the line of cars equipped with Port # FF.

Shelezyaka - the prefix to the phone to remove noise and clicks.

Shelezyaka - Pagemaker: refinement of weaving displays the page number memory.

Shelezyaka - NEW BRIGHT: Sixteen full-color mode.

Interview - an interview with the leader of the Samara spektrumistov Unbel! Ver / XTM.

Others - the outcome of the failed survey.

Others - ROMkadrom (humor).

Others - Safemode: computer crime and information warfare.

Others - Thoughts aloud: "All your thoughts about that Sreccy already bent, are complete nonsense ... "

Softinka - description of a new text editor ZX-WinWord V3.0.

Softinka - description of a new text editor ZX-WinWord V3.0 (Oberon Creative Pack).

Softinka - File Extractor: File Extractor.

Gameland - How to write a play. Volume 3. Part One.

Gameland - How to write a play. Volume 3. Part One.

Gameland - the latest demo spekrumovskoy Amiga version znaminitoy Toys WALKER.

Gameland - the third demo of the game Wolf 3D.

Samizdat - Dragonland: Presentation.

Samizdat - Dragonland: Wild Honey.

Samizdat - Dragonland: When the rain ...

Samizdat - "Bastard AlHimik Doctor Faustus Plumed Serpent "№ 1.

Samizdat - "Bastard AlHimik Doctor Faustus Plumed Serpent "№ 2.

Samizdat - Something like Kashpirovsky ....

Soap - Letter from nowhere.

Inferno - The authors.

Inferno - Intro.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
kodit Who's there? - Chanky flame: a description of the algorithm chankovogo fire.
Humor - Fidoshny humor - Dictionary lamer.
Gamlїt, Prince Datsky - Ukrainian Hamlet.
Sweet - aluminum spoon.

В этот день...   21 November