View unanswered posts | View active topics It is currently Thu Jan 02, 2025 7:15 pm



Reply to topic  [ 14 posts ] 
 Hydrogen Explosion 
Author Message

Joined: Sat Apr 12, 2008 3:44 am
Posts: 12
Location: Russian Federation
Reply with quote
Post Hydrogen Explosion
How I can make an one-sprite explosion, that erases all ground (and everything else) pixels (behind sprite pixels) instantly?
I attached image (explosion sprite by me) that explains my idea.

Code as yet.
Code:
AddEffect = MOSRotating
   InstanceName = Giant Explosion
   Mass = 10000
   RestThreshold = -10000
   LifeTime = 500
   Sharpness = 1
   HitsMOs = 1
   GetsHitByMOs = 0
   SpriteFile = ContentFile
      FilePath = Base.rte/Effects/Pyro/GiantExplosion.bmp
   FrameCount = 1
   SpriteOffset = Vector
      X = 0
      Y = 0
   AngularVel = 0
   AtomGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Air
      Resolution = 2
      Depth = 0
   DeepGroup = AtomGroup
      AutoGenerate = 1
      Material = Material
         CopyOf = Air
      Resolution = 4
      Depth = 1
   ScreenEffect = ContentFile
      FilePath = Base.rte/Effects/Glows/YellowBig.bmp


And I made a hydrogen rocket (added this explosion to gib, count = 20) - it works in way that I want (almost), but very laggy - only few pixels erasing, the rest is falling.


Attachments:
File comment: Made in Adobe Fireworks
Explosion.gif
Explosion.gif [ 101.13 KiB | Viewed 3330 times ]
Sat Apr 12, 2008 4:05 am
Profile ICQ
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: Hydrogen Explosion
change the lifetime to 1, so that it only exists for long enough to destroy everything,
then, change the sharpness to something like 99999 so it destroys everything equally well.
to save space, make it a solid color, and use other sprites, that last longer and move, to use your visuals.
(IE a cookie-cutter explosion, with special effects slapped on top)

unfortunately, this wont work well. why?
it instantly kills 100% of what it touches, always. This is not fun.

If you want spontaneous destruction, have extremely high-mass, high-velocity objects (particles, mosrotating, as emitions, or gibs or whatever) if they move extremely fast, it will still be instant damage, however, you can adjust the material, mass, and sharpness, to fine-tune what it kills.

as a general rule, single-frame effects for explosions, both look, and function, like crap.

however, in retrospect, after I re-read this post, and yours, I am reminded of Worms.

If you want it to do a certain amount of damage to a unit, send it flying, AND destroy a perfectly shaped area, THAT is reasonable, and doable.

its in 2 steps.
step 1) the damage/push step, create extremely high velocity particles, and adjust the size, mass, and sharpness, so that it does however much damage to actors and vehichles, AND pushes them out of the way of the 'cookie cutter'. make this have a quick burst. MOST IMPORTANTLY, once you have it pushing actors away quick enough from a certain distance, change the lifetimes of those objects, so that they only get as far as you want the 'explosion' to be, so that it doesn't effect anything farther away than that, at all.

Step 2) use the 'cookie-cutter' an image in the shape of the explosion (in worms, that burst that says things like BOOM or whatever other comical thing) that will destroy the terrain. this must happen a split second AFTER step one, so that it pushes people out of the way, so they arent instantly gibbed and killed, because a cookie-cutter stamped a whole in the map. they may still gib an arm or a leg or something, but it is an explosion after all.




TL:DR
Cookie-cutter explosions and effects suck 99.9% of the time, so unless you SERIOUSLY work on it, all attempts at this will suck. if you want to know how to make it reasonable without suck, think WORMS, and read steps 1&2 and do that or something like it.


Sat Apr 12, 2008 7:21 am
Profile YIM WWW

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post Re: Hydrogen Explosion
This looks great although there is probably no way that you could get rid of the lag it causes. Since the lag comes from all the terrain particles that got just chewed up by the huge MOSR.

...


Or maybe there is...


How about this:

Make this explosion split into 2 stages and all this should happen really fast.
The first explosion will leave the large explosion sprite and make it turn into terrain (Have its material set to "Air"). Then the with a small delay, make the second explosion be just a tad bigger than the first one and make it wipe the first one made out of air and slightly more normal terrain around it.

With that, the amount of free particles would be decreased dramatically and thus(maybe) lessen the lag.


Sat Apr 12, 2008 1:47 pm
Profile
User avatar

Joined: Sun Oct 29, 2006 4:26 am
Posts: 298
Reply with quote
Post Re: Hydrogen Explosion
Make it spawn a door with a circle sprite that rotates really quickly once, neatly chopping everything away.
edit: Works with Hits/GetsHitByMOs = 0 too.


Sat Apr 12, 2008 5:25 pm
Profile YIM

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post Re: Hydrogen Explosion
Djinn wrote:
Make it spawn a door with a circle sprite that rotates really quickly once, neatly chopping everything away.
edit: Works with Hits/GetsHitByMOs = 0 too.


Hmm, that wouldnt lessen the lag at all. The particles are knocked off instead of being erased when that happens.


Sat Apr 12, 2008 9:14 pm
Profile
User avatar

Joined: Sat May 05, 2007 6:04 pm
Posts: 2901
Reply with quote
Post Re: Hydrogen Explosion
numgun wrote:
Djinn wrote:
Make it spawn a door with a circle sprite that rotates really quickly once, neatly chopping everything away.
edit: Works with Hits/GetsHitByMOs = 0 too.


Hmm, that wouldnt lessen the lag at all. The particles are knocked off instead of being erased when that happens.


That doesn't seem to happen with doors in the pre-game bunker editor =/


Sat Apr 12, 2008 9:20 pm
Profile
User avatar

Joined: Sun Oct 29, 2006 4:26 am
Posts: 298
Reply with quote
Post Re: Hydrogen Explosion
numgun wrote:
Djinn wrote:
Make it spawn a door with a circle sprite that rotates really quickly once, neatly chopping everything away.
edit: Works with Hits/GetsHitByMOs = 0 too.


Hmm, that wouldnt lessen the lag at all. The particles are knocked off instead of being erased when that happens.


I've never done large scale testing, but I can clear a medium sized circle with less lag and cleaner than with a particle based weapon making the same circle. Warrants more testing on my end.


Sat Apr 12, 2008 9:38 pm
Profile YIM
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: Hydrogen Explosion
numgun wrote:

Make this explosion split into 2 stages and all this should happen really fast.
The first explosion will leave the large explosion sprite and make it turn into terrain (Have its material set to "Air"). Then the with a small delay, make the second explosion be just a tad bigger than the first one and make it wipe the first one made out of air and slightly more normal terrain around it.

With that, the amount of free particles would be decreased dramatically and thus(maybe) lessen the lag.


That wouldn't do any damage.


Sun Apr 13, 2008 12:53 am
Profile YIM WWW

Joined: Sat Jan 13, 2007 11:04 pm
Posts: 2932
Reply with quote
Post Re: Hydrogen Explosion
Miles_T3hR4t wrote:
numgun wrote:

Make this explosion split into 2 stages and all this should happen really fast.
The first explosion will leave the large explosion sprite and make it turn into terrain (Have its material set to "Air"). Then the with a small delay, make the second explosion be just a tad bigger than the first one and make it wipe the first one made out of air and slightly more normal terrain around it.

With that, the amount of free particles would be decreased dramatically and thus(maybe) lessen the lag.


That wouldn't do any damage.


It would. The second explosion is the same as this one. The first one just transforms a large number of particles into air.


Sun Apr 13, 2008 12:07 pm
Profile

Joined: Sat Apr 12, 2008 3:44 am
Posts: 12
Location: Russian Federation
Reply with quote
Post Re: Hydrogen Explosion
Thanks. "Explosion Door" works.
And I added MOPixels too - for some blast effects. MOPixels in AddGib section inherits velocity of ex-main object, what unwanted in this context. How to fix it?


Mon Apr 14, 2008 7:40 pm
Profile ICQ
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: Hydrogen Explosion
Add:
Code:
   InheritsVel = 0

To the gib code, so it looks like this:
Code:
   AddGib = Gib
      GibParticle = MOPixel
         CopyOf = Whateverparticle
      Count = 98987
      Spread = ...
      MaxVelocity = 908
      MinVelocity = 98098
      InheritsVel = 0

Don't mind the weird variables :P


Mon Apr 14, 2008 8:44 pm
Profile WWW

Joined: Sat Apr 12, 2008 3:44 am
Posts: 12
Location: Russian Federation
Reply with quote
Post Re: Hydrogen Explosion
Now, I remember that I saw this variable.
Thanks.


Tue Apr 15, 2008 4:22 am
Profile ICQ
User avatar

Joined: Mon Jun 04, 2007 5:55 am
Posts: 1627
Location: Ohio
Reply with quote
Post Re: Hydrogen Explosion
spread = ...
??? what?


Tue Apr 15, 2008 6:09 am
Profile YIM WWW
User avatar

Joined: Fri Feb 16, 2007 8:43 pm
Posts: 1695
Location: AH SHIT FUCK AUGH
Reply with quote
Post Re: Hydrogen Explosion
Shook wrote:
Don't mind the weird variables :P


It's going to be interesting to see how this turns out, good luck with it :3


Tue Apr 15, 2008 10:29 am
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 14 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.038s | 17 Queries | GZIP : Off ]