Animated Bitmap Explosions, 2
Moderator: Moderators
Animated Bitmap Explosions, 2
Seriously, this is beyond MTR, and it's relatively simple to add.
Just take a CSphereParticleSpawner. Add in the frame-changing code from the smoke, for time control.
Finally, add a request for a specific texture file (not an Atlas texture), the dimensions x, y, and the number of frames. All frame results should be POT. So, a 64 * 512 texture, 32 frames = 16 * 64 pixels per frame. If people screw this up, it should not run and should give them an error message.
Then cycle N times, 0 being infinite (until the death of the particle), with each cycle being an offset x,y on the texture, and just run it as a CSphereParticleSpawner otherwise, in terms of growth and physics.
I don't even care if it uses colormap, we can do that in the texture, and it'd be cheaper, just give us an alpha control like in colormap, so that it can either be additive or just blend.
I'm probably going to implement this in Lua pretty soon, but meh, I figured I'd ask one more time, I think that this is a very basic tool for effects that we need and don't have.
Just take a CSphereParticleSpawner. Add in the frame-changing code from the smoke, for time control.
Finally, add a request for a specific texture file (not an Atlas texture), the dimensions x, y, and the number of frames. All frame results should be POT. So, a 64 * 512 texture, 32 frames = 16 * 64 pixels per frame. If people screw this up, it should not run and should give them an error message.
Then cycle N times, 0 being infinite (until the death of the particle), with each cycle being an offset x,y on the texture, and just run it as a CSphereParticleSpawner otherwise, in terms of growth and physics.
I don't even care if it uses colormap, we can do that in the texture, and it'd be cheaper, just give us an alpha control like in colormap, so that it can either be additive or just blend.
I'm probably going to implement this in Lua pretty soon, but meh, I figured I'd ask one more time, I think that this is a very basic tool for effects that we need and don't have.
Re: Animated Bitmap Explosions, 2
CA has copy-paste powered animated CEG explosions. They work quite well. Check unused_charlize.tdf.
You could use Lua for CEG config files (I don't have an example), and thus avoid the ugly repetition.
Or, of course, lups.
You could use Lua for CEG config files (I don't have an example), and thus avoid the ugly repetition.
Or, of course, lups.
Re: Animated Bitmap Explosions, 2
I actually tried it that way (the unused_charlize.tdf way) quite awhile ago. I thought that that was far too CPU-intensive for practical use- the main cost with a CEG is when it's initializing, and if you have 10 of those, initializing every frame... and 10 guys are shooting weapons with that effect... yeah.
That, and it eats valuable room on the TextureAtlas. And the position of the particles can't be transmitted from one instance to another, along with gravity, etc.- basically, it just has to sit at the origin, and that's it. If there was a way to pass that data from one CEG to another, that might be worth it, but I think that what I proposed would be faster and cheaper even then.
As for Lups, meh. I tested it, and wasn't terribly happy with it. Don't get me wrong, it's a nice example of what you can do with Lua, it just wasn't suitable.
It's not well-documented, and it doesn't have plug-and-play ways to just emulate CEG functionality, if that's what you want to do- the examples using Lups aren't anything near the complexity of a typical CEG event system, and it's a process I'm comfortable with.
I'd rather write something from scratch than import a complex system that cannot be used to immediately replace CEG functionality and would require studying a lot of source to use. But I don't see any of those issues getting fixed, frankly, so I just don't have any real interest. Again, no insult meant, it's very nice technology, just not something I want to use.
If you guys want to talk to me about that sometime, with an eye on making it more user-friendly and documented, I'd be willing to give up a week of my time and make a show-piece.
That, and it eats valuable room on the TextureAtlas. And the position of the particles can't be transmitted from one instance to another, along with gravity, etc.- basically, it just has to sit at the origin, and that's it. If there was a way to pass that data from one CEG to another, that might be worth it, but I think that what I proposed would be faster and cheaper even then.
As for Lups, meh. I tested it, and wasn't terribly happy with it. Don't get me wrong, it's a nice example of what you can do with Lua, it just wasn't suitable.
It's not well-documented, and it doesn't have plug-and-play ways to just emulate CEG functionality, if that's what you want to do- the examples using Lups aren't anything near the complexity of a typical CEG event system, and it's a process I'm comfortable with.
I'd rather write something from scratch than import a complex system that cannot be used to immediately replace CEG functionality and would require studying a lot of source to use. But I don't see any of those issues getting fixed, frankly, so I just don't have any real interest. Again, no insult meant, it's very nice technology, just not something I want to use.
If you guys want to talk to me about that sometime, with an eye on making it more user-friendly and documented, I'd be willing to give up a week of my time and make a show-piece.
Re: Animated Bitmap Explosions, 2
if the animation feature isn't too costly I give it a +1 thumbs up for what it is worth. I don't think i will use it but others may.
Re: Animated Bitmap Explosions, 2
Abit off topic, but is there any way to randomize the chance of something spawning, or rolling dice, all i see are timers, and random variables, does not allow for something different the same time to make the weapon look more chaotic.
Re: Animated Bitmap Explosions, 2
You cannot produce random results with a guaranteed "good outcome", no. There is no way to produce random branching or cause one event to cancel another event, in CEG. You can do all of that in COB, or write your own code to handle this stuff in Lua, then call for the appropriate CEG via Lua (Kloot committed it, I assume it's still in Spring, but it's not documented anywhere, just hold up, I'll go get it).
Re: Animated Bitmap Explosions, 2

add a SpawnCEG(tag, px, py, pz, dx, dy, dz, rad, dmg) synced Lua callout (guess what it does)
* new call-ins:
ProjectileCreated(projectileID, projectileOwnerID) (arg #2 is -1 if no owner)
ProjectileDestroyed(projectileID)
* new call-outs:
GetProjectilePosition(projectileID) --> px, py, pz
GetProjectileVelocity(projectileID) --> vx, vy, vz
SetProjectilePosition(projectileID, px, py, pz) --> nil
SetProjectileVelocity(projectileID, vx, vy, vz) --> nil
Documented. Need to create a Wiki doc for MoveTypes, that's gotta be confusing as hell for newbie modders anyhow...submarines can now travel directly underneath surface vessels
and floating obstacles (and conversely; ships can move across
underwater objects), EDIT your mod's MoveInfo entries so that
the classes used by submarine-style units have "subMarine=1;"
set if you want to enable this fully
Re: Animated Bitmap Explosions, 2
I wonder though, will that change allow amphibs to go under ships also?
Re: Animated Bitmap Explosions, 2
Dunno, haven't had time to try it out yet.
Re: Animated Bitmap Explosions, 2
SpawnCEG and the projectile calls are all documented in the changelog...
Re: Animated Bitmap Explosions, 2
Are they? I didn't see 'em. Ah well. They weren't in the Wiki, now they are.
Re: Animated Bitmap Explosions, 2
Yeah, they were definitely in the changelog. Sef and I were discussing using SpawnCEG in particular to do some map effects.
-
- Posts: 1176
- Joined: 23 Aug 2007, 19:46
Re: Animated Bitmap Explosions, 2
It does just as diving below floating DTs for example...smoth wrote:I wonder though, will that change allow amphibs to go under ships also?

Well of course only if the water isn't too shallow and the hitboxes collide because of that...
Re: Animated Bitmap Explosions, 2
completely understandable krogoth.
Re: Animated Bitmap Explosions, 2
Xta already uses the submarine feature, its awesome.
Re: Animated Bitmap Explosions, 2
On SimpleParticles you can simply use a random expression on the number of particles. e.g. numParticles=.6 r.6; produces a 33% chance that a particle spawns (it's rounded down). If you want larger numbers that either spawn all or nothing you could use something like numParticles=10 r10 k17; which spawns 17 particles with a chance of 70%.Noruas wrote:Abit off topic, but is there any way to randomize the chance of something spawning, or rolling dice, all i see are timers, and random variables, does not allow for something different the same time to make the weapon look more chaotic.
Re: Animated Bitmap Explosions, 2
Ok so if the particles do spawn, and then what stops the other particles from spawning in the 30 percent chance? they aren't synced but i will see what i can do with what you gave me Kdr.
Re: Animated Bitmap Explosions, 2
Yeah, okay, it doesn't pick one out of the particle systems (I don't even want to know what happens when you try to pass information from one CEG to another using buffers, I expect a desync).