Skocz do zawartości

Rekomendowane odpowiedzi

  • Filar Społeczności
Opublikowano

Cienie w jakim sensie? Ja bym zrobił rysowanie pod obiektem tego samego sprita z przezroczystością i blend modem na czarny.

Opublikowano
Jemu chodzi chyba o 3d.

Nie, chodzi mi o 2D.

Co do pomysłu Ranmusa: sprawdzę...

 

Łe, to nie to. Mógłby ktoś dać definicję blendów?

Opublikowano
draw_set_blend_mode(mode) Indicates what blend mode to use. The following values are possible: bm_normal, bm_add, bm_subtract, and bm_max. Don't forget to reset the mode to normal after use because otherwise also other sprites and even the backgrounds are drawn with the new blend mode.

draw_set_blend_mode_ext(src,dest) Indicates what blend mode to use for both the source and destination color. The new color is some factor times the source and another factor times the destination. These factors are set with this function. To understand this, the source and destination both have as red, green, blue, and alpha component. So the source is (Rs, Gs, Bs, As) and the destination is (Rd, Gd, Bd, Ad). All are considered to lie between 0 and 1. The blend factors you can choose for source and destination are:

bm_zero: Blend factor is (0, 0, 0, 0).

bm_one: Blend factor is (1, 1, 1, 1).

bm_src_color: Blend factor is (Rs, Gs, Bs, As).

bm_inv_src_color: Blend factor is (1–Rs, 1–Gs, 1–Bs, 1–As).

bm_src_alpha: Blend factor is (As, As, As, As).

bm_inv_src_alpha: Blend factor is (1–As, 1–As, 1–As, 1–As).

bm_dest_alpha: Blend factor is (Ad, Ad, Ad, Ad).

bm_inv_dest_alpha: Blend factor is (1–Ad, 1–Ad, 1–Ad, 1–Ad).

bm_dest_color: Blend factor is (Rd, Gd, Bd, Ad).

bm_inv_dest_color: Blend factor is (1–Rd, 1–Gd, 1–Bd, 1–Ad).

bm_src_alpha_sat: Blend factor is (f, f, f, 1); f = min(As, 1–Ad).

For example, the normal blending mode sets the source blending to bm_src_alpha and the destination blending to bm_inv_src_alpha. Don't forget to reset the mode to normal after use because otherwise also other sprites and even the backgrounds are drawn with the new blend mode.

Opublikowano

Dobra cienie zrobię. Dopiero TERAZ próbuję zrobić MGŁĘ. Ale z surfacami mogę sobie poradzić.

 

Co do cieni: gdy robię tak jak powiedział Ranmus mury sprawiają wrażenie lewitujących. Nie mam pomysłu.

Opublikowano

Dobra, zrobiłem zjawisko dnia i nocy, właściwie godzin. Sprawy wyglądają tak:

1. Objekt "Drawing" rysuje to co potrzebne. Dałem tam draw_rectangle w kolorze czarnym z alphą odpowiednią dla godziny. Teraz, jak zrobić aby narysować kółko tak aby tam gdzie ono jest nie było tego prostokąta.

2. Gdy robię jak Ranmus powiedział skrzynki sprawiają wrażenie lewitujących, propozycje?

3. DarkHDR (nie DarkHDL) jest strasznie pogmatwane i gdybym dodał go do gry to mógłbym się pogubić.

 

EDIT: do 1: tzn. jak wypalić dziurę w prostokącie, który jest narysowany na całym ekranie.

Opublikowano
3. DarkHDR (nie DarkHDL) jest strasznie pogmatwane i gdybym dodał go do gry to mógłbym się pogubić.

ee tam, tylko na pierwszy rzut oka. Zresztą większości sckryptów nie musisz nawet ruzać. Ja używająć DarkHDR zmieniłem tylko sprity, kolorki i wielkość źródeł światła...

Gość
Ten temat został zamknięty. Brak możliwości dodania odpowiedzi.
  • Ostatnio przeglądający   0 użytkowników

    • Brak zarejestrowanych użytkowników przeglądających tę stronę.
×
×
  • Dodaj nową pozycję...