Page 1 of 1

[MOD] nParticle (smoke, dust and fire) [Testing]

PostPosted: Sun Jan 08, 2012 16:56
by Nemo08
nParticle mod was written as a base for the mod Dynamite v.0.0.2, but was not announced earlier a separate.

v 0.0.5
Features:
- Fire:
  • If the particle appears in the air, it is considered part of the explosion, with the disappearance of leaves dust.
    With the probability of 80% can ignite nearby combustible located node.
  • If the particle appears in a combustible node, it creates smoke. The burning time equal to furnace_burntime * 1.2 of node.
    With the probability of 80% can ignite nearby combustible located node.
  • Goes off if there is water
- Dust:
  • Settles on the ground
- Smoke:
  • Rises. Bug: at this point passes through the solid nodes.
The plans:
* Write wind effects on fire / smoke / water
* Make a smooth movement of fire and dust
* Fix a bug with the smoke
* Improve performance

Small API:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
-- power = [1..3] 3-max
add_nfire_single(pos,power)
add_nfire_cube(pos,power,halfsize,rnd)
add_nfire_sphere(pos,power,radius,rnd)

-- power = [1..4] 4 -max
add_ndust_single(pos,power)
add_ndust_cube(pos,power,halfsize,rnd)
add_ndust_sphere(pos,power,radius,rnd)

-- power = [1..4] 4-max
add_nsmoke_single(pos,power)
add_nsmoke_cube(pos,power,halfsize,rnd)
add_nsmoke_sphere(pos,power,radius,rnd)

there pos = {x=x,y=y,z=z}, halfsize, radius <=5 (because of performance problems), rnd - the chance of one a particle to appear

* link to video *

nParticle Git
nParticle v0.0.5 updated to 0.4.dev-20120122-1

FAQ:

Q: We already havemod Fire from neko259, why did not you used it??? Why wrote this piece of crap??111??1
A: nParticle mod was written and work before Fire mod, but Neko does not like his performance and features, so he wrote his mod. Now it's your choice which one to use.


Q: Why do we need a cubical cloud of dust / fire / smoke??? Why is dynamite has cubic explosion and cubic hopper???
A: Its Minetest baby, not CS!


Image
Image

PostPosted: Sun Jan 08, 2012 17:04
by Hackeridze
[russian only_for_russians]Возьми огонь у неко и допили(жаль что он у него нодами, но что поделать), а то "висящий" огонь, ИМХО, не тру. Под "допили" имею ввиду добавь к нему хотя бы дым(и подумай над скоростью горения материалов, хотя стоит спросить у неко, вдруг он это уже пилит).[/russian]

PostPosted: Sun Jan 08, 2012 17:08
by Nemo08
2Hackeridze:
[ru]
висящий огонь? - есть же висящие камни и прочее.
дым только от горящих предметов, от частиц взрыва дыма нет.
скорость горения есть и зависит от furnace_burntime
[/ru]

hanging fire? - There are also hanging stones and other stuff.
smoke only from the burning items, from the explosion of smoke particles do not.
burning rate depends on furnace_burntime

PostPosted: Sun Jan 08, 2012 17:15
by Hackeridze
Nemo08 wrote:2Hackeridze:
[ru]
висящий огонь? - есть же висящие камни и прочее.
дым только от горящих предметов, от частиц взрыва дыма нет.
скорость горения есть и зависит от furnace_burntime
[/ru]

[ru]
Эм, твой огонь "жгет"? Как у неко?
[/ru]

PostPosted: Sun Jan 08, 2012 17:18
by Nemo08
Hackeridze wrote:
Nemo08 wrote:2Hackeridze:
[ru]
висящий огонь? - есть же висящие камни и прочее.
дым только от горящих предметов, от частиц взрыва дыма нет.
скорость горения есть и зависит от furnace_burntime
[/ru]

[ru]
Эм, твой огонь "жгет"? Как у неко?
[/ru]

жжот я б даже сказал!

PostPosted: Sun Jan 08, 2012 17:29
by Hackeridze
I trying it now and... Cool! That's coolest then neko259 fire mod! Node burn time based on furnace_burn time? But you need fix making a lot of entities in 1 place, decrase amount of entities!

PostPosted: Sun Jan 08, 2012 18:02
by neko259
Hackeridze wrote:[russian only_for_russians]Возьми огонь у неко и допили(жаль что он у него нодами, но что поделать), а то "висящий" огонь, ИМХО, не тру. Под "допили" имею ввиду добавь к нему хотя бы дым(и подумай над скоростью горения материалов, хотя стоит спросить у неко, вдруг он это уже пилит).[/russian]

I didn't think about burning speed for now because nodes aren't really adapted to that. For that purpose I need to make fire entities. Maybe I'll do that in the next versions.

PostPosted: Sun Jan 08, 2012 19:35
by Staffs
On 1 of th pictures there is a fireplace. Is it really craftable ? 1.If yes, how? 2.Does the firefplace also have a 80% of possibility to burn nearby nodes?

PostPosted: Sun Jan 08, 2012 19:46
by neko259
Yeah, what does the fireplace do? Maybe I'll make it in my mod, if I'll figure what is it supposed to :D

PostPosted: Sun Jan 08, 2012 20:55
by Nemo08
Staffs wrote:On 1 of th pictures there is a fireplace. Is it really craftable ? 1.If yes, how? 2.Does the firefplace also have a 80% of possibility to burn nearby nodes?

Nope. Now its only decoration for smoke demonstartion. I dont know how it may be used, and not planning do anything with it.

PostPosted: Sun Jan 08, 2012 22:53
by Nemo08
added link to video

PostPosted: Sun Jan 08, 2012 23:44
by MrThebuilder3
this mod and the campfire is awesome! +100

PostPosted: Mon Jan 09, 2012 00:37
by Hackeridze
Nemo08
neko259 wrote:I think I'll also implement fireplace that will restore hp of nearby players

Implement it.

PostPosted: Thu Jan 26, 2012 23:08
by Nemo08
Updated to 0.4.dev-20120122-1