Jump to content
Eternal Lands Official Forums
Umrion

Making Fire

Recommended Posts

While we're at it, why don't we redo magic so that we can have particles (FIREBALLS! YAH!)... Also, we have to have a way to turn this off, if you're using a really old computer.

 

Maybe....

 

1 Enriched Fire Essence + 1 Titanium Serpent Sword + lvl 40 crafting=

 

Fire enchanted Titan. Serp.--Has a few red particles drifting upwards from it and does maybe 10 more damage? (burns? like poison?)

Share this post


Link to post
Share on other sites

Ok, the patch is now available here. I hope I didn't forget anything..

 

New particle textures are here:

http://www.cs.umu.se/~dva97tha/images/particle0.bmp

http://www.cs.umu.se/~dva97tha/images/particle1.bmp

Just download them to your textures directory.

 

No, the part file would be a file on the disk, so we can have a few templates (small fire, big fire, waterfall, water fountain, etc.). And you would place them the way you place a normal 3d object.

Good idea. It'll take some work - there are many things that differ between the particle systems we have now. We have different conditions for when a particle dies, different random functions (I made a new one for the fire) as well as simple differences like starting colors and such. The latter could obviously easily be added to a text file, but the two first ones might be trickier.

Perhaps we could make a few generic update functions, and then decide in the part file which one to use?

Hmm... This is definitely doable. Unless someone else really wants to implement this, I could take care of it :)

Oh, yes. Maybe the part file should also have a flag for if the particle system should be active on night/day only? Like camp fires only burning through the night?

Share this post


Link to post
Share on other sites

And if you just want to see how it looks, add these lines to your events.c:

    if(event->key.keysym.sym==SDLK_F8)
     have_point_sprite=!have_point_sprite;
   if(event->key.keysym.sym==SDLK_F9) {
     actor *me=get_actor_ptr_from_id(yourself);
     add_fire(me->x_pos+0.25f,me->y_pos+0.25f,-2.2f+height_map[me->y_tile_pos*tile_map_size_x*6+me->x_tile_pos]*0.2f+0.1f);
   }

(around line 351 somewhere)

Share this post


Link to post
Share on other sites

Things to go in the .part files:

Blending modes. GL_SRC_ALPHA,GL_ONE is not the best for every system (I think.)

Particle and system "death" conditions. Maybe we should have different update functions and choose one?

#particles

Particle type (i.e. which texture to use.)

Starting position (as min and max coordinates.) Possibly with a choice of random distribution and further constrain (circular range.)

Starting velocity (min and max)

Acceleration (min and max.)

Starting color (min and max.)

Color change (min and max.)

Size (min and max.)

 

I want to have an acceleration, so we can do things like fountains (starting velocity roughly upwards, acceleration downwards (gravity.))

 

We might need more data - if we have a system where particles should die when they are a certain distance away from the starting point, we need to specify this distance, and so on.

Share this post


Link to post
Share on other sites

Overall, an excellent patch. I added the glViewport line back in, because I couldn't see why you removed it. Also, I added that bit of testing code to events.c

Share this post


Link to post
Share on other sites

Hehe. That glViewport line shouldn't have been in that patch. However, it isn't a very useful line, it just produces GL_INVALID_VALUE errors :) (Negative widths and heights are not allowed.)

Share this post


Link to post
Share on other sites

OMFG it looks so cool!!!!

Excellent job!

I was thinking, we should have the update function predefined in the .part file:

teleporter

teleport in

teleport out

fire

smoke

steam

waterfall

water fountain

 

I can't wait to have fires in the swamp in Morcraven March :o

Share this post


Link to post
Share on other sites

Thanks :)

I'll start working on this tomorrow - any more suggestions and comments are welcome. I'll post .part file examples/definitions as soon as they are done :(

Share this post


Link to post
Share on other sites

We need at the very least a big and a small fire type. Big for the campfire on IP (and possibly other places), small for torches.

Share this post


Link to post
Share on other sites

Since you want some comments .. that what i seen so far looks great! Keep it up.

 

I wondered if you will be able to place them in the editor .. like lights or 3ds? Or if they will be defined in thed def files?

Simply asked .. will i be able to place them in the maps?

Share this post


Link to post
Share on other sites

Cicero & Entropy: Once I've done the system, it's just a matter of creating new .part files to get different kinds of fires (or whatever.) Perhaps I'll even make a graphical editor for it :)

 

I wondered if you will be able to place them in the editor .. like lights or 3ds? Or if they will be defined in thed def files?

Simply asked .. will i be able to place them in the maps?

Well, I think it would be best if you could place them in the map editor. I haven't looked at the editor code yet, but it should be a quite simple addition.

Share this post


Link to post
Share on other sites

I had a little idea: I think I'll add some functions for wind in weather.c. Then some particle systems (like smoke) could be affected by it. :)

It should of course also do other things; sound as well as maybe some other objects being affected by it.

Share this post


Link to post
Share on other sites

on the subject of sounds, i have noticed that the teleporter sounds stay around long after you have moved away from them if you hit console or map while close to them. but people telporting in and out goes away if you move away. is the location of one of the sounds dependent on the camera location while the other is dependent on the (players) actor location?

 

btw, that wind stuff sounds seriusly interesting :ph34r:

i take it that the server would send out a wind direction (and maybe strength) at times and smoke and fire would react to it. it would be even more cool if roja could set out small areas that would act like dry leafs under strong winds :angry:

Share this post


Link to post
Share on other sites
such as swamp gase fires

could be used later on as fireball (but horizontal)

 

anyway... OMG! fire looks wonderful ^_^

 

if Entropy is God of EL you'll be the Jesus Umrion :angry:

 

Perhaps I'll even make a graphical editor for it  (...) could place them in the map editor

would be great; plus mabe possibility to set a xyz function for fire to move according to it. (spiral of fire ...^_^ :ph34r: )

Share this post


Link to post
Share on other sites

Thanks guys :D

if Entropy is God of EL you'll be the Jesus  Umrion :D

:lol:

 

Perhaps I'll even make a graphical editor for it  (...) could place them in the map editor

would be great; plus mabe possibility to set a xyz function for fire to move according to it. (spiral of fire ...^_^ :P )

Mmm.. Good idea. I'll think I'll give it a try.

Share this post


Link to post
Share on other sites

make 3d rain with ur particles. cause that raindrops of el seem to only flow down my screen. they never hit the floor in el :/

Share this post


Link to post
Share on other sites
make 3d rain with ur particles. cause that raindrops of el seem to only flow down my screen. they never hit the floor in el :/

You would need a few time more particles for a nice 3D rain, and that would kill slower computers. Altho having 3D rain OPTIONALLY (selectable in el.ini) would be even nicer :P

Share this post


Link to post
Share on other sites

Will this new system be able to support drifting fog/mist? Ent's comment about fires in Morcraven promted the thought.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

×