Page 1 of 2

How to make your own CEG effects, the EASY way! :-)

Posted: 29 Dec 2013, 09:04
by Forboding Angel

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 29 Dec 2013, 12:22
by FLOZi
Nice. I need to talk to you about PPCs and lightning weapons & FX. 8)

Also doing 'generic' CEGs in lua would be a big improvement as you could apply some OO principles -> create the same effect in multiple sizes by tweaking a single number etc

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 29 Dec 2013, 20:55
by CarRepairer
Use the FBI2LUA script to convert these before anyone uses them please.

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 29 Dec 2013, 21:54
by Silentwings
Nice work :)

Slightly off-topic - does anyone have a CEG that can replicate the engines hardcoded dgun?

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 29 Dec 2013, 22:57
by Forboding Angel
@silentwings, That's easy. You just spawn a ceg that is given the weaponvelocity and vector.

When I'm not feeling so shitty I can make you one to replace ze dgun (I would recommend switching the dgun type to a non-colliding invisible laser for best results).

@flozi, just hit me up whenever. I've been doing a lot of junk lately so I've been a bit all over the place, but just pm me in the lobby of forums or wherever and tell me what you want me to do :-P

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 29 Dec 2013, 23:17
by Silentwings
You just spawn a ceg that is given the weaponvelocity and vector.
Yes - I'm asking if anyone has a ceg that eactly replicates the way the engine renders it by default (just as a still shot). Afaik there is no need to do the velocity oneself, dgun weapons can already use a custom ceg.
Would love to have it if its no trouble :)

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 30 Dec 2013, 09:55
by knorke
on video:
The loud music is disattracting.
There is too much ranting/babbling without information. Imo better to spend some time on thinking what to show in video and then also actually edit it rather than just upload a non-stop recording.
It takes more time to create such video but saves time of all viewers.

The attempt to explain particleLifeSpread is confusing wrong.
See http://springrts.com/wiki/CEG-Classes#C ... icleSystem to see what particleLifeSpread does.

Imo those examples are too much like the ones that make CEGs unattractive to work: Too much .tdf, half-commented, formating messed up, lots of redundancy etc: Just looks like spaghetti files that were copypastad from one generation to another without anyone really caring about taste.
Also lack of any larger ordnung. (more on that below)


imo there are two approaches to CEGs:

1) "I just want some effects in my game."
Solution: Copypaste whole folder from zero-K or other game.
Use ceg spawner menu thing to browse.
One could only copy the effects one likes.
But it is cumbersome to find out filename of effect and which textures it uses. After doing that process 3 times it gets too annoying.

In this case it is actually wasted effort to think how to make yet another standard "kaboom" effect, can probally find something that is "close enough" and for tweaking just do obvious things. (Does not need an example or wiki to understand color or size)

2) "I want some effects in my game and have too much time."
Think of some system to organize stuff BEFORE starting.
I understand most projects have "grown" rather being thought up from scratch, mine has some problem, but for anything new I would consider a bit planning.

Superannoying if you wanted to change the look of one effect but suddendly another effect also looks different because you have no more idea where that "fire2.png" texture is used. Or do not even remember what other weapon might use the same effect.
That is why it sucks to have a "sparkle.png" used by effect "highexplosiveMed" in file "heimpact.lua" used by weapon "gun" of unit "heavytank".
Or if you have the same explosion in 5 color variants and want to change their size and you have edit 5 different places then that is bad too.
For any somewhat advanced effect, example growing nuke mushroom, needs http://springrts.com/wiki/CEG-Operators

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 30 Dec 2013, 21:46
by PicassoCT
ahem knorke not true..
you can make nukes via units.. simlie cegs, emitted von moved emitors

much more intuitive..

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 30 Dec 2013, 22:08
by CarRepairer
knorke wrote:you have no more idea where that "fire2.png" texture is used.
Not sure what you're referring to but I hope enough people are aware of Flozi's automagical resources generator.

http://springrts.com/phpbb/viewtopic.ph ... 73#p407773

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 30 Dec 2013, 22:38
by knorke
As I understand that resources.lua "only" saves you the work of manually making a new entry for each texture.
I refered to one texture being used in multiple effects:
Edit the texture of one effect but suddendly another effect also looks different. Especially with generic or "non-sense" filenames it is hard to keep track of that.

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 30 Dec 2013, 22:43
by smoth
OMG it is so hard to keep track of your effect files! Seriously knorke, I think you are making a mountain out of a molehill. I recall very clearly how you found the idea of a generalized unit script to be a bad idea, yet here you are complaining about reusing a ceg sprite?

Come on.

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 30 Dec 2013, 23:18
by knorke
OMG it is so hard to keep track of your effect files!
Say an effect uses these two textures:
http://code.google.com/p/zero-k/source/ ... L/fire.png and http://code.google.com/p/zero-k/source/ ... unshot.tga
If I was to edit these files: can you tell which weapons, units etc would look different?
I recall very clearly how you found the idea of a generalized unit script to be a bad idea
No, I just told you things you had done wrong.
yet here you are complaining about reusing a ceg sprite?
I did not "complain" and that is not what I wrote.
Even so, that it would be two unrelated things.

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 30 Dec 2013, 23:25
by smoth
knorke wrote:
OMG it is so hard to keep track of your effect files!
Say an effect uses these two textures:
http://code.google.com/p/zero-k/source/ ... L/fire.png and http://code.google.com/p/zero-k/source/ ... unshot.tga
If I was to edit these files: can you tell which weapons, units etc would look different?
If i needed a new sprite for a new ceg, I would add it rather than go and edit one. if you wanted to edit gunshot.tga and you were using the proper resource.lua you would do a find in files it isn't that hard.
knorke wrote:
I recall very clearly how you found the idea of a generalized unit script to be a bad idea
No, I just told you things you had done wrong.
no you didn't.
knorke wrote:I did not "complain" and that is not what I wrote.
Even so, that it would be two unrelated things.
Seems to me you are, it is like you seem to believe there is an issue when there really isn't one. You don't do an individual sprite for EVERY EFFECT. you reuse as much as possible.

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 30 Dec 2013, 23:42
by knorke
you would do a find in files it isn't that hard.
If that is your idea of a good organisation then so be it.
imo it is not desireable to have to use crutches such as "find files" or "search&replace."
it is like you seem to believe there is an issue when there really isn't one
It seems you do not even notice problems so telling you about solutions is a waste of time.

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 31 Dec 2013, 05:02
by Forboding Angel
@knorke, Don't be silly.

You should be aware of the massive libraries of PD sprites available (largely thanks to smoth, with participation from myself and a few others) for ceg effects.

If you are using anything but Flozi's resources.lua, I feel sorry for you, as you are doing it extremely wrong and making yourself have to do 10x the amount of work.

As smoth said, you should be reusing sprites as often as possible. Only use new sprites when you really need to, imo.

Edited: Because my response sounded more harsh than I intended. It was meant as good natured, but when I reread it just now it's tone sounded dickish to me.

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 31 Dec 2013, 11:20
by PicassoCT
Are those vids gpl. if yes. Anybody can cut it? Problem solved. No drama here. Move along. Disregard the flashing lights, and the other ceg stuff.

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 31 Dec 2013, 12:00
by Forboding Angel
This one is for Silentwings:

http://youtu.be/Se-q4ZTqamE

Made a DGun effect for you. It's meant to be called as a cegtag.

https://code.google.com/p/evolutionrts/ ... s/dgun.tdf

https://code.google.com/p/evolutionrts/ ... xplobw.tga

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 31 Dec 2013, 13:29
by FLOZi
Knorke isn't talking about resources.lua, but rather having say

"Fanny.tdf" and "Rome.tdf" both using "kfoom" texture - Entirely nonsensical naming makes it hard to track what effect is using which textures.

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 31 Dec 2013, 14:56
by knorke
None of that was related to anything I wrote.
Neither "PD sprites" or resources.lua or reusing sprites.

Re: How to make your own CEG effects, the EASY way! :-)

Posted: 01 Jan 2014, 02:00
by Forboding Angel
What does it matter which effect is using what textures? Moreover, it isn't hard to just look...