Re: [Super-tux-devel] Stalactite bad guy [patch]
Brought to you by:
wkendrick
From: Ricardo C. <ri...@ae...> - 2004-03-14 02:37:37
|
Em Quinta, 11 de Mar=E7o de 2004 11:05, o Bill Kendrick escreveu: > On Thu, Mar 11, 2004 at 10:31:16AM +0000, Ricardo Cruz wrote: > > > > If we were being REALLY fancy, we could hand-code a blur routine that > > > would actually give more of a glass effect. But, since the graphics > > > will be relatively small, blurring is relatively expensive, and it wi= ll > > > eventually all be moving so fast, I don't think it's worth it... > > > > Not sure what you meant, but SuperTux has OpenGL support... > > As an option, I hope. ;^) I reinstalled my Debian system recently and > only have software GL support right now, for example. ;^) It =3D=3D SLOW! > OpenGL can be used by passing the --opengl / -gl argument. The decision was that, in the (far) future, if there are some things that= =20 need to be done and cannot be implemented in SDL (for performance reasons)= =20 and that affect the gameplay, SDL will be dropped, in favor of OpenGL. > The gist of the idea is that instead of simply being see-through, or > tinting the background, the ice could actually affect the clarity of > the background behind it. > > I suppose one way to do it would be to: > > 1. Do a general blur of the area the stalactite takes (using a > mask to determine which pixels we should blur, so that we don't > waste time doing the full rectangular area around the object). > > ...look at the pixels in the background (before drawing any part of the > stalactite) and combine them to blur it. E.g., if the background looked > like this: > > > Mix the current background, with this alpha-masked blurred version and > NOW, we have a cool "invisible Predator" style effect! > SuperTux supports Alpha blending, so couldn't that be made by setting up s= ome=20 pixels, in the stalactite image, to a value from 0-255 ? (a part; stalactite normal image, can be animated!) Ricardo Cruz =2D-=20 Many of the convicted thieves Parker has met began their life of crime after taking college Computer Science courses. -- Roger Rapoport, "Programs for Plunder", Omni, March 1981 |