Generic CEG effects suitable for any project

Generic CEG effects suitable for any project

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Generic CEG effects suitable for any project

Post by Forboding Angel »

I have done some more work to my sets of generic ceg effects. There was way too much to try to cover via text and screenshots don't illustrate it very well.

It would be awesome if this could get integrated into ABC as it's a great tool for getting started as well as for anyone who isn't really that great with creating ceg effects from scratch.

These make for a fantastic template to start off making your own as well.

Image

Video demonstrating them (720p @ 60fps, youtube is still processing):
http://youtu.be/H4atpA7UmQc

Relevant github locations:

CEGs:
https://github.com/EvolutionRTS/Evoluti ... explosions

Bitmaps:
https://github.com/EvolutionRTS/Evoluti ... letextures
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Generic CEG effects suitable for any project

Post by gajop »

I liked the video, the explosions really look cool.

A few things:
1) I'm not sure if it can or should be included in ABC(E?), it doesn't really seem small or game-agnostic (most stuff were futuristic-looking explosions). Maybe making it a rapid module like jk did with chili might make more sense, but it depends on how this is supposed to be used. If users are expected to edit these files then it wouldn't work.

2) As a CEG newbie (never wrote any), I'm not entirely sure what this covers exactly. Is it just explosions and that laser effect-thingy? Or does it extend to projectiles/weapons/other effects? If I wanted to make a level-up effect like the thing in WC3, could I use this? What about magic spells: directed - fireballs, aoe - firestorm, unit-effecting speed buff... ?

3) I think this could use a wiki tutorial so newbies can get started with it. It's OK to link to existing CEG ones if there are any, but this would still need its own wiki entry, to at least give an overview of the project (for minimum, the things you said at the end of the video, including how to use the toolbox to view it).
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Generic CEG effects suitable for any project

Post by Forboding Angel »

gajop wrote:I liked the video, the explosions really look cool.
Thanks, I worked hard on them :-)
gajop wrote: A few things:
1) I'm not sure if it can or should be included in ABC(E?), it doesn't really seem small or game-agnostic (most stuff were futuristic-looking explosions). Maybe making it a rapid module like jk did with chili might make more sense, but it depends on how this is supposed to be used. If users are expected to edit these files then it wouldn't work.
It is both small and game agnostic. Remember if you need them to fit a specific style then you can simply change the graphics used and easily achieve that.

No users aren't expected to do any editing.

The CEGs all use common names like "genericshellexplosion-medium-green", so you would use:
explosionGenerator = "custom:genericshellexplosion-medium-green",
in your weapondef.

You can easily change that because they all use the common naming convention, I.E.:
explosionGenerator = "custom:genericshellexplosion-large-blue",
And viola, you have a completely different explosion simply by changing a name
gajop wrote:2) As a CEG newbie (never wrote any), I'm not entirely sure what this covers exactly. Is it just explosions and that laser effect-thingy? Or does it extend to projectiles/weapons/other effects? If I wanted to make a level-up effect like the thing in WC3, could I use this? What about magic spells: directed - fireballs, aoe - firestorm, unit-effecting speed buff... ?
Currently these cover shell explosions (unit weapon impacts), and unit death explosions. Soon it will cover building explosions, but I haven't finished them yet.

That said, you could use these however you like, and if you felt ambitions, editing them to fit what you need would be simple.

Simple things like powerups and pickups and stuff like that is as simple as displaying a sprite. I do it for quite a few things in evo actually. It's not really difficult enough to warrant making a generic placeholder for it.

You wouldn't use these for cegtags. If you look in evo, several units that use cannons actually have ceg effects as their projectiles. In order to make that look good you need to know what you're doing, cause cegtag only spawns once every 32 frames (cegtag means emitting a ceg from a weapon projectile).
gajop wrote:3) I think this could use a wiki tutorial so newbies can get started with it. It's OK to link to existing CEG ones if there are any, but this would still need its own wiki entry, to at least give an overview of the project (for minimum, the things you said at the end of the video, including how to use the toolbox to view it).
Toolbox is chili specific :-( A wiki article would be a decent idea.

The point of this though, is that lets take BA. Unit projectile and explosion effects in BA are laughable.

BA could take this, drop it in, and immediately the game would look a zillion times better.

Weapon impacts, unit deaths, and building deaths are the 3 main areas that need to be covered for a basic game. Anything else would be a bit more of a custom thing.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Generic CEG effects suitable for any project

Post by PicassoCT »

I m voting for including those in the C part of the ABC mod.

If they are generic and well working, and the rules to use them are really self-explaining.

Smoth has a library of rather refined cegs, though most of them are desgined specifically for gundam scales and colourschemes.

But yeah, +1 for not having to do the "once more into the breach dir friends thing and grab them from some repo"
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: Generic CEG effects suitable for any project

Post by gajop »

I actually forgot to specify the largest issue I saw when watching these.
There seems to be a very annoying line appearing at the ground that's cutting off all of these (ground) explosions - air ones probably don't have the issue.
It looks very unnatural - it's like a screen tear. This can best be seen when you test CEGS: https://www.youtube.com/watch?v=H4atpA7UmQc#t=241
This is very likely an engine issue -> and this brings me to my next question, can it be fixed and how long would that take approximately?
The "huge" explosions also have some issues with how the ground is being cut-off in the "distance".
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Generic CEG effects suitable for any project

Post by Forboding Angel »

In practice it isn't an issue and should be expected. It's just the nature of things. The second explosion wave (the one that gives the 3d effect) is being rendered at a 90 degree angle to the user camera, so depending on where that camera is pointed, the graphic may or may not be halfway in the ground.

This is pretty much to be expected.

Decided to start working on buildings tonight, made some really nice progress so far with the base effect. Building explosions will use more particles not that much more, but as buildings are only blowing up semi occasionally it shouldn't impact performance in any meaningful way (there really aren't that many particles being used anyway).

Color choices will be the same as unit explosions (so I don't have to deal with recreating all the colormaps). Although I'm going to include some that should be suitable for lightning storms (I actually need this for evo because of powerplant deaths).

Wrt unit explosions, there are a few neat things I haven't shown yet, but suffice it to say I also have weapons already defined for unit explosions as well. In those definitions it also controls camera shake amount and aoe (used for lups shockwaves). Once again, easy to edit and should make some poor bastard's miserable life that much better.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Generic CEG effects suitable for any project

Post by PicassoCT »

You can slice buildingmodels to pieces and make a collapse modell - with pseudophysics written in LUA.
Its a lot of work for ruins i admit that..
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: Generic CEG effects suitable for any project

Post by Forboding Angel »

Well in evo I use custom death cegs that fire off from model pieces when units/buildings die. Honestly though, that's a bit more advanced polish really.

Last I checked, even zk stuff uses engine death particle effects -_- which is sad, because it adds so much polish for so little effort.

But still, that's a bit above and beyond really, because pieces have to be defined as flying off script and it requires a bit of set up for it. I think that that exceeds the scope of what ABC is intended to do. I could be wrong.

Edit: I have all this crap set up in evo already, so if you need anything like that, just ask. I can hook you up.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Generic CEG effects suitable for any project

Post by FLOZi »

This in itself is a bit beyond the purpose of ABC. ABC is just a blank slate - this belongs in Spring Tutorial Game, the rejuvenation of which is on my general Spring 'todo' list, but that exists only in my head and changes daily. :oops:

A good tutorial on the wiki using this as a resource would be a great first step (tutorial category on the wiki is on the same todo list...).
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Generic CEG effects suitable for any project

Post by PicassoCT »

We need to optimize the FLOZi - he is trashing :) - the contextswitches eat up all the ressources and no work gets done. Dont ask me what happens to the infrastructure if garbage collection kicks in.
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Generic CEG effects suitable for any project

Post by FLOZi »

atm all my spring time is being poured into some pretty major s44 defs changes
8611
XTA Developer
Posts: 242
Joined: 29 Dec 2014, 08:22

Re: Generic CEG effects suitable for any project

Post by 8611 »

Those are just some effects like they already exist by the hundreds.
They not more or less suited for use as "templates" than many others.

Okay, maybe "the explosions really look cool" and for newbies that is impressive.
But the games listed as examples here http://springrts.com/wiki/CEG:Defs#Examples contain between 500 to 1000 effects and many "look really cool", too.
Should a modder want to easily view them, Carrepairers spawner-browser-thing exists since some years. Any file (or the wiki) is just as suitable as starting point to create own effects.

The video is okay for showing the effects but what is the use of only saying vague things like "you can kind of change these"? As if that was not possible with any file?
This thread does not explain anything, I would even say it is dangerous: statements like "these are really very very easy to change" could give impression that these files were in some way "easier" or innovative - they are not.

That is not helpful: it makes things look more complicated than it really is and mystifies things.
Same with "death particle effects" and "I have all this crap set up in evo already, so if you need anything like that, just ask. I can hook you up."
Seems too much like secret club of dark hooded figures who meet at midnight by the graveyard to exchange old tales that are not allowed to be written down.
It is all in the wiki: http://springrts.com/wiki/CEG:Calls
Misolavera
Posts: 8
Joined: 20 Aug 2014, 22:21

Re: Generic CEG effects suitable for any project

Post by Misolavera »

Is it possible to make them oriented ?
I mean explode in one direction: upward, toward the laser hitting.
When a tank explode (a fuel tank) it is not necessarily the same in every direction. Can it be randomized ?


I dunno how CEG works, maybe that's not even possible.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Generic CEG effects suitable for any project

Post by PicassoCT »

can be randomized, and some have dir handed along, although that is not always usefull

it has its own little domain specific language integrated into the variables such as positions:
" 1 r-2 r2" basically evaluates - emit at position 1 +math.random(-2,0)+math.random(0,2)
You can store those values computated in 10 slots and you can use sin and cos functions..
Its quite powerfull, but it doesent allow you to realtime edit effects in spring, its always alt+tab - texedit
/reloadcegs
alt+tab look at errorcode, improve, alt+tab..
and many things you have to find out by try and error.
Powerfull but non-intuitiv.

What you expect today is rather this..
http://jeromeetienne.github.io/sparkseditor/
with a "put out that ceg" button below..
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: Generic CEG effects suitable for any project

Post by Silentwings »

Thanks for collecting these together, it's always useful to get an assurance that stuff is portable.

@Misolavera: This is not a thread designed to teach people about CEGs, if thats what you want you should read http://springrts.com/wiki/CEG:Main.
luckywaldo7
Posts: 1398
Joined: 17 Sep 2008, 04:36

Re: Generic CEG effects suitable for any project

Post by luckywaldo7 »

8611 wrote:Those are just some effects like they already exist by the hundreds.
They not more or less suited for use as "templates" than many others.

Okay, maybe "the explosions really look cool" and for newbies that is impressive.
But the games listed as examples here http://springrts.com/wiki/CEG:Defs#Examples contain between 500 to 1000 effects and many "look really cool", too.
Should a modder want to easily view them, Carrepairers spawner-browser-thing exists since some years. Any file (or the wiki) is just as suitable as starting point to create own effects.

The video is okay for showing the effects but what is the use of only saying vague things like "you can kind of change these"? As if that was not possible with any file?
This thread does not explain anything, I would even say it is dangerous: statements like "these are really very very easy to change" could give impression that these files were in some way "easier" or innovative - they are not.

That is not helpful: it makes things look more complicated than it really is and mystifies things.
Same with "death particle effects" and "I have all this crap set up in evo already, so if you need anything like that, just ask. I can hook you up."
Seems too much like secret club of dark hooded figures who meet at midnight by the graveyard to exchange old tales that are not allowed to be written down.
It is all in the wiki: http://springrts.com/wiki/CEG:Calls
I disagree. New modders need some simple, easy successes to get them motivated. Simply waving your hand and saying "good examples over there" and "RTFM!" is not helpful. Handing them some code that they can copy-paste into their game, immediately see it in action, and then start playing around with the code a little and immediately seeing those changes is extremely encouraging to the new modder. Looking at a wiki page and trying to make something from scratch is boring and tedious and discouraging.
User avatar
PicassoCT
Journeywar Developer & Mapper
Posts: 10450
Joined: 24 Jan 2006, 21:12

Re: Generic CEG effects suitable for any project

Post by PicassoCT »

best motivation is actually a effect that is allready triggered in regular intervalls by the standard lua code of the tutorial.. that way- even if they do not understand how to modify the emitting lua, they can allready start modifying some eyecandy.

Allthough ceg errormessages have improved there are still some errors that get swallowed in silence, so cegs are not good for newbs to start with anyway. You need dragonskin from previous frustrations before you should enter those caves.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Generic CEG effects suitable for any project

Post by smoth »

PicassoCT wrote:Smoth has a library of rather refined cegs, though most of them are desgined specifically for gundam scales and colourschemes.
forb like many others around here is using many of the ceg sprites I made for the community.
There seems to be a very annoying line appearing at the ground that's cutting off all of these (ground) explosions - air ones probably don't have the issue.
It looks very unnatural - it's like a screen tear. This can best be seen when you test CEGS: https://www.youtube.com/watch?v=H4atpA7UmQc#t=241
That isn't tearing. at certain angles the sprites self orient in such a way that they clip the terrain. it maybe a solution would be to have such a tag in CEGS to allow for the sprite to ignore terrain when rendering but what about unit models? tons of games address this by overblooming their sprites. I don't like that solution as everything is white and crap.
8611
XTA Developer
Posts: 242
Joined: 29 Dec 2014, 08:22

Re: Generic CEG effects suitable for any project

Post by 8611 »

luckywaldo7 wrote:Simply waving your hand and saying "good examples over there" and "RTFM!" is not helpful.
And yet it is excactly what this thread does?
It points to some example files...but why *these* examples when in any game you find hundreds files that can also serve as example. Maybe do not use older games like BA but if you look at zK you find files that are just the same as the ones from this thread. And there you can also "immediately see it in action."
The posted files have nothing that makes them stand out. Saying otherwise is confusion.
It would be different if the CEGs were reasonable commented or showed some trick or were "more correct" than the average or were accompanied by an explaining text.
I disagree that "RTFM" it is not helpful: To 'explain' in chat or forum the same thing over & over again is masturbation and never as excact as the original wiki article/tutorial/source/whatever.
luckywaldo7
Posts: 1398
Joined: 17 Sep 2008, 04:36

Re: Generic CEG effects suitable for any project

Post by luckywaldo7 »

I wouldn't recommend the ZK effect folder to any newbie because it's a complicated mess. You don't want a newbie to try to sort through something like this:

https://github.com/ZeroK-RTS/Zero-K/blo ... napalm.lua

Try explaining this line to a newbie:

Code: Select all

pos                = [[r14.1421 y10 -1 x10x10 y10 200 a10 y10      r6.283 y11 -3.1415 a11 y11 -0.5x11x11         y0 0.0417x11x11x11x11 y1 -0.00139x11x11x11x11x11x11 y2 0.0000248015x11x11x11x11x11x11x11x11 y3 -0.000000275573x11x11x11x11x11x11x11x11x11x11 y4 0.00000000208768x11x11x11x11x11x11x11x11x11x11x11x11 y5 1 a0 a1 a2 a3 a4 a5 x10, 30, -0.1667x11x11x11 y0 0.00833x11x11x11x11x11 y1 -0.000198412x11x11x11x11x11x11x11 y2 0.00000275573192x11x11x11x11x11x11x11x11x11 y3 -0.00000002505210838x11x11x11x11x11x11x11x11x11x11x11 y4 0 a11 a0 a1 a2 a3 a4 x10]],
And there are other ceg effects that call other ceg effects, etc. Yes it makes for nice effects ingame, but not something for a newbie to cut their teeth on. I'm speaking as someone who has spent an unreasonable amount of time messing about in the ZK effects folder.

A good set of example cegs should have the following requirements:
1. Relatively simple and generic
2. Stored in a public repository
3. Made by a developer who is eager to share and help newbies, and is frequently present in the lobby
Post Reply

Return to “Game Development”