Home Indie Game Order of Athanor [2D ARPG with a TBA unique community-component]

Order of Athanor [2D ARPG with a TBA unique community-component]

0
Order of Athanor [2D ARPG with a TBA unique community-component]

[ad_1]

Spreadable Fire

Be cautious together with your hearth assaults as a result of issues can shortly get uncontrolled! Unless that is what you need…

All entities which are capable of be burnt within the recreation can have a BurnableController part connected. This handles the logic to unfold to new objects, and the entire visible parts like updating the shader and spawning and positioning new flames and smoke.


simply the shader updating with out the flames

Most objects which are comprised of a cloth that may catch on hearth will have the ability to burn, together with enemies and the participant. For enemies this creates a panic state that tremendously will increase their velocity whereas they slowly take harm. The hearth continues for a couple of seconds earlier than dying out. Planned for the long run is water or ice spells that put out the fireplace, and smarter enemies will try to search out close by water to douse the flames when on hearth.

Here are some finer particulars:

The shader

BurnableController shops a Color32 array 16×16 in dimension, with the quantity a unit is burned simply saved within the pink channel of the colour. There’s some logic to unfold it to close by items, and each tenth of a second this information is utilized to a 16×16 texture of the shader. The shader makes use of the pink worth to tint a portion black till 100% when the alpha is ready to 0. There can be a easy tileable cloud noise texture so as to add some visible randomness.

The flames and smoke

The flames are looping sprite animations created in Pixel FX Designer that when spawned, are given an preliminary velocity towards close by unburnt areas, with some random variation added. They meander a bit when up to date however keep inside a rectangle space that’s outlined when the BurnableController is created. They have a random lifetime of 1.2 – 1.6 seconds earlier than fading out. The smoke is dealt with equally, there are much less particular person smoke sprites and so they keep stationary. The smoke was additionally created in Pixel FX Designer.

The unfold

Exactly 3 occasions a second, if an object is on hearth, is greater than 10% burned, and fewer than 90% burned, it is going to use it is personal colliders as a reference to verify in a barely bigger radius round it to unfold the fireplace to new objects. Whether or not the fireplace really does unfold will depend upon a burnChance variable on each burnable object, that shall be used to create some objects which are extra hearth resistant, however nonetheless burnable than others.

Burnt()

Finally, when the thing is > 85% burned, the BurnableController calls a Burnt() technique on the entity, to deal with totally different duties relying on the thing. Mainly it’s used for eradicating the collision in order that the participant can now stroll over the thing that’s now burnt to the bottom.

Stay tuned for extra updates… and be at liberty to share extra enjoyable concepts that you simply’d prefer to see!

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here