PDA

View Full Version : PixelprachtFX



lithander
25-12-2002, 08:55 PM
Hi folks! :D

Although it's not a Game I'm working on my current project might still be interesting for some people here.

I'm writing a free-to-use particle-effects-library for the use with Delphi and OpenGL. (though it should be convertable to DX, too)

The library provides basic classes and methods which can be used to create custom effects. The Engine handles all the complicated stuff (rendering, creation and update of particles, physical effects, managment of various groups of different particles etc) while the fun part is left to you: The creative work of defining the look and behaviour of your effects.

I've recently uploaded a Demo at my website (http://pixelpracht.flipcode.com) which you can download if the following screeny wakes your interest. :wink:

http://pixelpracht.flipcode.com/scrshots/ppfxshot01.jpg

The zip contains all the sources. I'd be happy for any comments! If there is anybody who cares to use it in his own projects, please tell me, too. If there are enough interest I consider to write a documentation and perhaps a little tutorial.

HAPPY CODING
-lith

savage
26-12-2002, 10:39 AM
Hi Thomas,
The demo looks quite good.

I have not had a chance to look the source code yet as I am quite interested in the "smoke" and "filling texture" effects.

lithander
26-12-2002, 12:20 PM
I have not had a chance to look the source code yet as I am quite interested in the "smoke" and "filling texture" effects.

Both of these effects aren't as complicaed as they look like.

-filling texture: I create two array's of longword containing the texture data. one is the unfilled version one the filled. As the flame moves along I continously copy little rects from the filled texture to the unfilled and reassign it to the model-texture with glTexImage2D.

-smoke: It's part of the flame-effect wich is implemented in fxFlame.pas.
The smoke is composed of spinning smoke-rings that rise up from the fire, widen and fade out. Of course it's hard to see that it's nothing more than blended rings because they differ in size, color and saturation.

I've seen a similar effect used by the Mafia-Team for their cigaratte- and cigare smoke and tried to rebuild it...

-lith

Snape
07-01-2003, 12:46 PM
Congratulations to you for your IOTD on flipcode.

One little suggestion:
Could you do an ini-File (or something like this) where you can select the screen resolution (wanna see it at 1280x1024 ;) ).

lithander
10-01-2003, 12:31 AM
thx! ;)

As the source is included you could just change the resolution and recompile it. (if you've delphi)

go to line 479 in the *.dpr file and change glCreateWnd(800, 600, TRUE, 32) to glCreateWnd(1280, 1024, TRUE, 32)

this should make it run in the desired resolution. But don't complain if it gets laggy! :)

Snape
10-01-2003, 05:43 PM
I've tried that before but Delphi isn't able to compile the .dpr (I get an error message - buffer overflow). Maybe it's because of my v5 Delphi...

lithander
10-01-2003, 10:10 PM
buffer overflow?! .... scary! I'm having Delphi5, too so that shouldn't be the problem!

I've no idea what could cause that problem. Does it compile?

Snape
11-01-2003, 01:26 PM
Yes, it compiles but when it's finished I get the buffer overflow.
Maybe it's because of an old OpenGL-Header File?

lithander
12-01-2003, 09:17 PM
i'm using the standard opengl header that ships with delphi5 because litterally everybody should have this one ;) do you have an updated header (1.2 etc) that is named the same? (OpenGL.pas) This might be a solution because the OpenGL1.2 header from Mike Lischke needs a special initialisation that isn't called in my code... try to force Delphi to use the old one.

If it still doesn't work i could just compile it for you and send it by mail. Just drop me a line...

-lith

Snape
15-01-2003, 01:26 PM
I haven't downloaded any new headers and I also don't think that they are included with WinXP.

Strange, strange, strange...