[Mod] Particles [particles] Digging explosions and other particles.

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

[Mod] Particles [particles] Digging explosions and other particles.

by cornernote » Sun Sep 16, 2012 11:35

Particles for Minetest

Generates particles in the world when you dig blocks, smoke, etc.

Documentation | GitHub Project

Image

About

This module is open source, so it's distributed freely. If you find it useful then I ask not for your wealth, but simply to spare your time to consider the world we share by watching Earthlings, a multi-award winning film available to watch online for free. A must-see for anyone who wishes to make the world a better place.

Credits

sfan5 - coded the original particles mod which I borrowed and made into this one.
PilzAdam - made it work for any item without being defined in a mod, also improved the code.

License

BSD-3-Clause, Copyright © 2014 Brett O'Donnell
Last edited by cornernote on Thu Jan 16, 2014 10:43, edited 1 time in total.
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Sep 16, 2012 12:33

This look great!
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Sep 16, 2012 12:41

Some suggestions:
Add particles for every node (maybe a group no_particles to prevent it) and use the textures of the node
Make the particles a bit slower (they fly too far IMO)
Remove the selectionbox of the particles
Smoke particles spawn in fire
Last edited by PilzAdam on Sun Sep 16, 2012 12:50, edited 1 time in total.
 

User avatar
cHyper
Member
 
Posts: 587
Joined: Fri May 06, 2011 08:49
IRC: cHyper
In-game: cHyper

by cHyper » Sun Sep 16, 2012 15:46

awesome... cool effects....
--------------------------------------------------------
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Sep 16, 2012 17:59

+1 regarding smoke, and please PLEASE make it look something like smoke instead of just pixels, and make it more abundant than in the old mod (sorry sfan :-) ).
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Sun Sep 16, 2012 18:01

 

User avatar
sfan5
Member
 
Posts: 3636
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5

by sfan5 » Sun Sep 16, 2012 19:08

Very cool!
Mods: Mesecons | WorldEdit | Nuke
Minetest builds for Windows (32-bit & 64-bit)
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Mon Sep 17, 2012 02:59

VanessaE wrote:+1 regarding smoke, and please PLEASE make it look something like smoke instead of just pixels, and make it more abundant than in the old mod (sorry sfan :-) ).


Do you have a texture you would like see used?
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Mon Sep 17, 2012 03:00



pulled, thanks for the code improvements
 

User avatar
Gambit
Member
 
Posts: 452
Joined: Sat Oct 29, 2011 19:31

by Gambit » Mon Sep 17, 2012 14:01

Does this provide particles for water or lava as well? It would be neat to see splashing or small magma pieces jump up.
Current Projects: MineToon | PixelBOX
Gambit's Checkmate Server - 43.65.296.232 - port: 30001
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Mon Sep 17, 2012 15:20

a little suggestion: maybe make them disappear faster?
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Mon Sep 17, 2012 16:41

Odd bug: dig up a piston or sticky piston from mesecons. The particles become some odd color and flicker like crazy.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
Mito551
Member
 
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Mon Sep 17, 2012 17:30

Gambit wrote:Does this provide particles for water or lava as well? It would be neat to see splashing or small magma pieces jump up.


i'm not the cornernote, but nope, it doesn't. splashing seems easy to do (as i see it), but lava stuff... a suggestion^^
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Mon Sep 17, 2012 17:48

VanessaE wrote:Odd bug: dig up a piston or sticky piston from mesecons. The particles become some odd color and flicker like crazy.

Suggestion for all mesecon nodes:
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
groups = {no_particles=1}

Particles dont fit into the mesecons mod.
 

leo_rockway
Member
 
Posts: 131
Joined: Tue Jul 31, 2012 20:37

by leo_rockway » Tue Sep 18, 2012 04:27

This looks great!
What about particles while digging? Or at least particles on punch?
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Tue Sep 18, 2012 05:00

There's no callback/function that can tell if the player is digging (or even just swinging at air), so this isn't really possible yet.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

leo_rockway
Member
 
Posts: 131
Joined: Tue Jul 31, 2012 20:37

by leo_rockway » Tue Sep 18, 2012 05:26

VanessaE wrote:There's no callback/function that can tell if the player is digging (or even just swinging at air), so this isn't really possible yet.


Yeah, we talked about checking the health of the node once, on IRC, but it sounded like a cumbersome hack for little functionality. I was just hoping that maybe a function to tell if the player is digging had been included in the new release...

Anyway, at least it could be done for punches...
 

Magicdolphin
New member
 
Posts: 7
Joined: Tue Sep 18, 2012 11:22

by Magicdolphin » Tue Sep 18, 2012 11:34

looks cool!!
 

Iqualfragile
Member
 
Posts: 160
Joined: Tue Sep 18, 2012 22:11

by Iqualfragile » Wed Sep 19, 2012 20:17

PLEASE: tune down the amount of particles spawned to 5 or random(7,3)
i have chaned it on my server because it just killed the upload.
Gr8 b8, m8. I rel8, str8 appreci8, and congratul8. I r8 this b8 an 8/8. Plz no h8, I'm str8 ir8. Cr8 more, can't w8. We should convers8, I won't ber8, my number is 8888888, ask for N8. No calls l8 or out of st8. If on a d8, ask K8 to loc8. Even with a full pl8, I always have time to communic8 so don't hesit8.
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Wed Sep 19, 2012 21:40

That's odd. It works really fast for me. Is your computer oldish?

Has anyone else had an issue because of too mant particles?
 

Iqualfragile
Member
 
Posts: 160
Joined: Tue Sep 18, 2012 22:11

by Iqualfragile » Wed Sep 19, 2012 21:43

let me cite: "the upload."
so its network-based (crappy upload…)
Gr8 b8, m8. I rel8, str8 appreci8, and congratul8. I r8 this b8 an 8/8. Plz no h8, I'm str8 ir8. Cr8 more, can't w8. We should convers8, I won't ber8, my number is 8888888, ask for N8. No calls l8 or out of st8. If on a d8, ask K8 to loc8. Even with a full pl8, I always have time to communic8 so don't hesit8.
 

Iqualfragile
Member
 
Posts: 160
Joined: Tue Sep 18, 2012 22:11

by Iqualfragile » Wed Sep 19, 2012 21:51

23:48:16: ERROR[ServerThread]: Item "doorsplus:door_wood_left_a_c" not defined
node_dig
23:48:16: ACTION[ServerThread]: me digs doorsplus:door_wood_left_a_c at (-56,11,7)
23:48:17: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: error: ...dir/minetest/bin/../mods/minetest/particles/init.lua:49: attempt to index local 'node' (a nil value)
23:48:17: ERROR[main]: stack traceback:

In thread 7f855fe88740:
/home/me/minetest/src/main.cpp:1741: int main(int, char**): Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD 7f855fe88740:
#0 int main(int, char**)
(Leftover data: #1 Dedicated server branch)
(Leftover data: #2 virtual void ServerMap::save(ModifiedState))
(Leftover data: #3 virtual void ServerMap::saveBlock(MapBlock*))
(Leftover data: #4 void ItemStack::serialize(std::ostream&) const)
Gr8 b8, m8. I rel8, str8 appreci8, and congratul8. I r8 this b8 an 8/8. Plz no h8, I'm str8 ir8. Cr8 more, can't w8. We should convers8, I won't ber8, my number is 8888888, ask for N8. No calls l8 or out of st8. If on a d8, ask K8 to loc8. Even with a full pl8, I always have time to communic8 so don't hesit8.
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Wed Sep 19, 2012 22:40

Iqualfragile wrote:23:48:16: ERROR[ServerThread]: Item "doorsplus:door_wood_left_a_c" not defined
node_dig
23:48:16: ACTION[ServerThread]: me digs doorsplus:door_wood_left_a_c at (-56,11,7)
23:48:17: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: error: ...dir/minetest/bin/../mods/minetest/particles/init.lua:49: attempt to index local 'node' (a nil value)
23:48:17: ERROR[main]: stack traceback:

In thread 7f855fe88740:
/home/me/minetest/src/main.cpp:1741: int main(int, char**): Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD 7f855fe88740:
#0 int main(int, char**)
(Leftover data: #1 Dedicated server branch)
(Leftover data: #2 virtual void ServerMap::save(ModifiedState))
(Leftover data: #3 virtual void ServerMap::saveBlock(MapBlock*))
(Leftover data: #4 void ItemStack::serialize(std::ostream&) const)



I installed doorsplus, but I could not replicate the issue. From your log it says you broke door A when it was closed. I broke door A and B, open and closed, no crash.

I did look at the code where it crashed, and added a line that may fix it. Please let me know if you still have this issue.
 

Iqualfragile
Member
 
Posts: 160
Joined: Tue Sep 18, 2012 22:11

by Iqualfragile » Thu Sep 20, 2012 17:15

Iqualfragile wrote:23:48:16: ERROR[ServerThread]: Item "doorsplus:door_wood_left_a_c" not defined


i have removed the mod, so its an unknown block
Gr8 b8, m8. I rel8, str8 appreci8, and congratul8. I r8 this b8 an 8/8. Plz no h8, I'm str8 ir8. Cr8 more, can't w8. We should convers8, I won't ber8, my number is 8888888, ask for N8. No calls l8 or out of st8. If on a d8, ask K8 to loc8. Even with a full pl8, I always have time to communic8 so don't hesit8.
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Thu Sep 20, 2012 22:22

Ahh, I see. Please try latest git. I fixed some unknown block dig issues recently.
Last edited by cornernote on Thu Sep 20, 2012 22:22, edited 1 time in total.
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Fri Sep 28, 2012 01:34

+10
If you can think it, you can make it.
 

leo_rockway
Member
 
Posts: 131
Joined: Tue Jul 31, 2012 20:37

by leo_rockway » Fri Oct 05, 2012 02:30

I got this just now:

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
23:25:35: ERROR[main]: ServerEnv: Trying to store id=73 statically but block (3,-1,0) already contains 49 (over 49) objects. Forcing delete.
23:25:35: ERROR[main]: ServerEnv: Trying to store id=74 statically but block (3,-1,0) already contains 49 (over 49) objects. Forcing delete.
23:25:35: ERROR[main]: ServerEnv: Trying to store id=76 statically but block (3,-1,0) already contains 49 (over 49) objects. Forcing delete.
23:25:35: ERROR[main]: ServerEnv: Trying to store id=77 statically but block (3,-1,0) already contains 49 (over 49) objects. Forcing delete.
23:25:36: ERROR[main]: ServerError: LuaError: error running function 'on_step': /home/leo/.minetest/mods/minetest/particles/init.lua:53: attempt to index local 'digger' (a nil value)
23:25:36: ERROR[main]: stack traceback:


I think it's because a lot of gravel fell and it landed on a torch... it might be blocking the torch particles (although I'm not certain it's that).
Also, I'm not sure if the "Forcing delete" errors are related. That might be something from the simple mobs mod.
 

cornernote
Member
 
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Fri Oct 05, 2012 02:53

thanks leo_rockway,

i just added fix to stop it from killing the server if that happens
 

User avatar
PilzAdam
Member
 
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam

by PilzAdam » Mon Nov 05, 2012 17:27

Heres a backup of the mod: http://ompldr.org/vZzVseQ/minetest-particles.zip
(The number of particles are changed to 7-9, but it looks better)
 


Return to Old Mods

Who is online

Users browsing this forum: No registered users and 23 guests

cron