[Freeciv-Dev] Re: different iso drawing algorithms
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Dnia 2002.12.08 19:12 Raimar Falke napisa³(a):
On Sun, Dec 08, 2002 at 06:13:41PM +0100, Rafa³ Bursig wrote:
> >> >Can you qualify this? How much time do you need for a complete
map
> >> >canvas redraw if you use RLEACCEL and how without?
> >> >
> >> I make some test on END_GAME_STATE ( see entire map without
> >irrigation
> >> , road ,units , cities and FOG !!)
> >> I disable dithering becouse for now it work with pixel acces and
we
> >> want see how fast is RLE
> >>
> >> I have special function to draw entire screen map ( draw only
main
> >tile
> >> sprites ).
> >> Map screen has 640x480 pixels
> >>
> >> Normal :
> >> Redraw time = 87, 90, 88, 93, 97, 91 ms
> >> Flush_fullscreen time : 7 ~ 23 ms
> >>
> >> RLE :
> >> Redraw time = 53, 61, 56, 60, 59, 48 ms
> >> Flush_fullscreen time : 7 ~ 19 ms
> >
> >Am I right that you can't use RLE if you draw the irrigation, road,
> >units, cities and FOG because these sprites have transparent
pixels.
> >
> NO... RLE is made for transparent pixels and real those pixel are
> compressed.
> If You have more and more transparent pixels the effect will be
better
> and better.
>
> I want have entire map that I start new game and disband all unit.
>
> Problem is with FOG becouse SDL havn't mask future ( has simple
> clipping ability )
> and when you want create fog of war effect you must use tmp surface
> without RLE compression and that slow down drawing.
Why can't you use transparency for the FOW?
I use but let me explan...
RLE is extension of transparency in SDL, you can use it or not but you
can still have transparent pixels.
FOW...
First I do it simple. I draw tile cell ( exp. mountains ) and then draw
on it fog cell ( tile with black rhomb and Sprite ALPHA = 96 ). This
give nice FOW effect and was fast (RLE) but has one big bug.
When tile gfx was biger than fog rhomb some pixels ( all outside the
rhomb ) wasn't foged.
Then I made some hack.
All tiles have 0x0(r=0,g=0,b=0) as traransparent pixels. Foged tiles
are draw on tmp surface and this surface is fill with r=0 g=0 b=0
alpha = 96 color. All pixels != 0x0 are foged and pixels == 0x0 still
are transparent ( alpha calculating with 0 still get you 0 ). Then I
blit this tmp surface on screen.
Tmp surface can be RLE becouse we still make writes on it. This method
give 2 more blit and is slower that first method but work in 100%
Rafal
----------------------------------------------------------------------
Powiedz sobie dobre "Dzien dobry"! >>> http://link.interia.pl/f168b
- [Freeciv-Dev] different iso drawing algorithms, Jason Short, 2002/12/08
- [Freeciv-Dev] Re: different iso drawing algorithms, Raimar Falke, 2002/12/08
- Message not available
- [Freeciv-Dev] Re: different iso drawing algorithms, Raimar Falke, 2002/12/08
- [Freeciv-Dev] Re: different iso drawing algorithms, Rafa³ Bursig, 2002/12/08
- [Freeciv-Dev] Re: different iso drawing algorithms, Raimar Falke, 2002/12/08
- [Freeciv-Dev] Re: different iso drawing algorithms, Rafa³ Bursig, 2002/12/08
- [Freeciv-Dev] Re: different iso drawing algorithms, Raimar Falke, 2002/12/08
- [Freeciv-Dev] Re: different iso drawing algorithms, Rafa³ Bursig, 2002/12/08
- [Freeciv-Dev] Re: different iso drawing algorithms, Raimar Falke, 2002/12/08
- [Freeciv-Dev] Re: different iso drawing algorithms,
Rafa³ Bursig <=
- [Freeciv-Dev] Re: different iso drawing algorithms, Rafa³ Bursig, 2002/12/08
- [Freeciv-Dev] Re: different iso drawing algorithms, Raimar Falke, 2002/12/08
- [Freeciv-Dev] Re: different iso drawing algorithms, Rafa³ Bursig, 2002/12/08
- [Freeciv-Dev] Re: different iso drawing algorithms, Jason Short, 2002/12/08
[Freeciv-Dev] Re: different iso drawing algorithms, Jason Short, 2002/12/11
|
|