No announcement yet.

Spreading Fire Actor WIP

  • Filter
  • Time
  • Show
Clear All
new posts

    Spreading Fire Actor WIP

    Hey, everyone, I thought it was about time to show something other than code here... I'm finally getting to the more artwork-centered parts of making my game now that most of the subsystems are in place, so I actually have something to show

    I've been working on this for a couple of months, and will probably rewrite it a few more times before I deem it done. It's an actor that creates a spreading fire that uses some pseudo-pathfinding involving the flammability of nearby materials and the wind's direction/strength. The smoke also moves with the direction of the wind at a speed relative to the wind's strength. Don't mind the bad decals, they're placeholders.

    This one is more of a graphics-centered video, but I'm planning to post some more technical videos next week. I'll also release the scripts for public use when it's done.

    Enjoy (Watch in HD if possible, low quality version has some bad compression artifacts)

    EDIT: I have some extra time I didn't think I'd have this weekend, so here's a little bit more info on what the actor is actually doing:

    The main actor is sent the current wind strength and direction by my scripted weather system whenever it changes, and is stored. Once spawned, it runs trace checks to find the surrounding objects' Physical Material Properties and checks the flammability rating I've added to each type. It then runs a probability check (something similar to A*) on each direction it could spread, with flammability as a weight, and the wind's direction/strength as the goal. Once it has a new point to spread to, a custom particle emitter is spawned and fed values like Lifespan, Size, and the wind values.
    Every time the weather system updates the wind for the main actor, it updates the wind values for the particle systems, which then alter a couple of particle parameters for the smoke's movement and the fire's size.

    One kind of interesting thing I noticed is that the lower the flammability of a material is, the more erratic the movement of the fire becomes. It may burn in an almost straight line on dry leaves with high wind, but its path jumps and curves in the same wind on grass. I have it set up to draw a debug line at the center point of the actor's pool of particle systems to figure out its path, something I'll show in the next couple of videos.

    Performance still needs work (though it's not actually as slow or blurry as the video makes it look) when there are several fire sources present, but that's mostly the amount of smoke particles at the moment.

    My perspective is a bit skewed since it's my creation, so any feedback or suggestions are very welcome.

    Here's another video, this time set in an empty part of a test map with different landscape materials to show the fire's different spreading rates/sizes. I put annotations throughout the video to explain what it's doing.

    Also, hey, I'm actually done when I said I would be


      that's pretty impressive.does it cause damage?that would be cool.


        Thanks for the feedback!
        It does cause damage, but I'm still working on the most efficient way to pull it off. I'm using touch events with a collision cylinder on each of the flame particle systems (separate actors) at the moment (only calling super.Touch() when damage is actually caused for performance). It's also using a custom damagetype I've set up to have a chance of creating a burning DoT status effect on the character in top of a little damage per touch event.