jumpy
jumpy copied to clipboard
Particle System and Procedural Explosions
Currently we have two kinds of explosions:
- The regular ones, based on sprites (?)
- The procedural ones from cannonballs
I propose that we go over to using the ones from cannonballs, created by @saveriomiroddi, for everything, as they look better and scale better. We should also make a method for spawning these at a specified point, with a specific size and maybe a specific set of colors...
How was the cannonball explosion made?
Ideally our effects would be made with a tool like particles-editor so that any modder can easily make the effect they need.
Didn't know there was a particle/fx editor made by Fedor. I totally agree that we should use that, then.
How was the cannonball explosion made?
I've taken an existing [particles] explosion definition from the codebase, and tweaked it :smile:
The death explosion really looks like a stretched version of the regular explosion, though. This is why I assumed it was sprite based. Still think we should decide on a "style" as they are very stylistically different. Maybe not a pressing matter, though
I will be experimenting with adding a new Circle shape that can be used for collision detection in explosions. I also think we should work to make an explosion effect that represents the radius of the AoE damage, so that it can be used as a visual cue. For now, I will concentrate on making a circle shape that can be used to check for overlaps against Rectangles (I see no use case for overlapping circles)
Copy if an internal discussion about explosions, with some ideas:
abraxas: Seems we should try to unify, using the particle effect generator Fedor has made, at some point, though. Probably not a big priority
64kramsystem: yeah! I think unifying is a very good idea :star_struck:
64kramsystem: I was actually writing about unifications when it comes to turtle shell protection!
64kramsystem: Let me add this to the issue. Using procedural explosions is very advantageous -
abraxas: I agree. they can be matched to explosion damage radius in code, etc
64kramsystem: if one doesn't want to spend effort, they can use a stock procedural explosion, which won't be worse than the current,
abraxas: much better that premade effects, imo
64kramsystem: and if they want, they can make it fancier :slight_smile:
abraxas: I understand the need for advanced particle systems in high perf. circumstances, but I don't think we will be it. Maybe we can use particle designer program to make base effects and scale them in code, or something. Most of macroquad code is very simple and easy to modify, if we need to modify it to get it working
64kramsystem: I think that if we start making bigger etc. explosions, having a round collider will be very advantageous (using a rectangle with the cannonball explosion is very ugly, since it's big)
64kramsystem: oh fancier I mean, simple things, like bigger explosions :smile:
64kramsystem: > Maybe we can use particle designer program to make base effects and scale them in code
yeah! this is what I had in mind.
abraxas: Yeah. We could just make a circle shape and replicate the overlaps and intersect methods. Well, intersect will be a bit of a job but we really just need overlaps (returns bool if overlapping)
64kramsystem: the definition is JSON, so we can trivially modify it :thumbsup:
https://github.com/fishfight/fish2/pull/60
https://github.com/fishfight/fish2/pull/61
https://github.com/fishfight/FishFight/pull/113
I don't ( yet ) have any preference on procedural or sprite-based explosions ( and I haven't seen the procedural ones rendered yet, it looks like they were removed before I got into the codebase, so I don't know what they looked like ).
@erlend-sh do you have an art preference as far as how you want them to look?
We're not using macroquad anymore, but I'm sure I could port anything we wanted to use.
Also I don't really need to know now, but I was pruning the issue list, so I wanted to get an update on where we were at with this one.
The sprites-based stuff is our default. Any kind of procedural effects that can be made are most welcome, but they’ll need to approximate the hand drawn style.
I think we might want to port macroquad particles to bones and also make an Egui particle editor like the macroquad particles-editor.
While we may still want to use spritesheets for explosions, the particles were really useful for things like the grenade fuse and muzzle smoke and stuff like that.
There's also the possibility to combine handmade sprites with a particle system to keep a pixel-y look, while adding some dynamic movement to things like smoke, etc.
Sounds right. Our spritesheet effects will probably be completely replaced by particles in the end. Their main job is to act as a reference for the ‘real’ particles to come.
Can you say a little bit about why we’re better off opting for our own custom solution as opposed to using something like @djeedai’s Hanabi?
The biggest limitation of Hanabi would be WASM support:
Hanabi makes heavy use of compute shaders to offload work to the GPU in a performant way, and therefore is not available for the wasm target (WebAssembly). This is a limitation of wgpu.
I had seen multiple people say that macroquad particles was extremely simple, yet powerful, so I figured it'd probably be simple enough to port.
We could try out this one I hadn't seen before, though: https://github.com/abnormalbrain/bevy_particle_systems.
The rest I see look very work-in-progress, but if we do have to make our own, then any of them might actually be a good start/reference.