This site is no longer active and is available for archival purposes only. Registration and login is disabled.

Programming Fire effects


Programming Fire effects

Postby Lewil » Feb 11, 2002 @ 11:48am

First i want to thank Phantom cause i'm really having great fun using easy CE !!! done

I'm coding some fire effects - works well, very very nice ! (tell me if you are interested by sources then i put it on ftp) i found explainations on

http://logarno.planet-d.net/djgfxfr/

the problem in that source is that i set a palet of colours, then for each pix i have to find the average of 3 or 4 other pixs. when i use getpixel, i get the real value of the pix, but not a palet index so i have to test all the values of my palet to retrieve the index wich makes it a little slow :(.

so here is my question: how can i quickly find the palet[index] of a pixel without testing all the palet values ???
Lewil
 


oh oh

Postby Lewil » Feb 11, 2002 @ 11:51am

i realise that the url i gave you is in french :/
just look at the bottom page fire sample which looks like what i get on my ipaq.
Lewil
 


Postby Phantom » Feb 11, 2002 @ 2:48pm

Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


yes !

Postby Lewil » Feb 11, 2002 @ 4:28pm

Lewil
 


Postby Phantom » Feb 11, 2002 @ 5:27pm

Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Oh !!!!!!!!!!!!!!!

Postby Lewil » Feb 11, 2002 @ 6:08pm

Lewil
 


Postby Phantom » Feb 11, 2002 @ 8:38pm

Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


Postby Dan East » Feb 11, 2002 @ 9:17pm

Jacco, I was thinking the same thing at first. The logic is to prevent dummy[dest] from being decremented if its value is already 0.

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


Postby MirekCz » Feb 11, 2002 @ 9:21pm

yeah, dan is right, else dummy will become 0-1=255 and fire effect will look like shit:)
With best regards,
Mirek Czerwinski
User avatar
MirekCz
pm Member
 
Posts: 269
Joined: Sep 18, 2001 @ 6:42pm
Location: Poland,city Poznań


Postby Phantom » Feb 12, 2002 @ 8:48am

Give me some good data and
I will give you the world
User avatar
Phantom
pm Insider
 
Posts: 913
Joined: Feb 21, 2001 @ 8:14am
Location: Houten, Netherlands


okay :)

Postby Lewil » Feb 12, 2002 @ 10:49am

done all this :) works fine

with the pad i control the randint test wich puts 63 or 0 to make the fire more or less intensive and the one that controls the colding (18) => you can burn your pocket the way you want :D

thx all, i try some water now :idea:
Lewil
 


firestarter

Postby laurnet » Feb 12, 2002 @ 5:19pm

hello
I am using MVC++ and easyce to compile on the computer ,and hey,it works!
now i can't make your fire code work because of byte undeclared and other stuff but it works well on evc

byte cannot be used ,are there lots of things that aren't same as evc or am i wrong ?
User avatar
laurnet
pm Member
 
Posts: 36
Joined: Jan 6, 2002 @ 9:25am
Location: FRANCE


Postby Dan East » Feb 12, 2002 @ 5:46pm

Hmm. Sounds like the EasyCE header may be missing a typedef for non-CE builds? Add this to the top of the source:
#typedef unsigned char byte

Dan East
User avatar
Dan East
Site Admin
 
Posts: 5264
Joined: Jan 25, 2001 @ 5:19pm
Location: Virginia, USA


sorry

Postby Lewil » Feb 13, 2002 @ 12:08pm

i can't help cause i never succeeded to compile with MVC++ ... always saying something missing ie ptc.h even if it's in the dir ... :') evC works well, i keep on with it.

has someone some algorythm about waving a water surface (i've seen some nice effects in java on some web, when your mouse goes on a bmp, you get the little circles growing as if you were touching a water surface with your finger)
Lewil
 


Postby billcow » Feb 13, 2002 @ 7:26pm

Most people don't know that "A highly technical term" is actually a highly technical term used to describe something that doesn't mean anything
User avatar
billcow
pm Member
 
Posts: 81
Joined: Jan 6, 2002 @ 12:22am
Location: Dryden, NY


Next

Return to Phantom's Forum


Sort


Forum Description

Discuss any of Phantom's projects here (Operation Nutcracker, etc.)

Moderators:

sponge, RICoder, Phantom

Forum permissions

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum