|
Special Effects |
Michael Jensen
Member #2,870
October 2002
|
Maybe these are really general questions but I'd really like to know how to make FUN special effects in games. For a while I took a bitmap that looked like a pointy star with yellow filling on the inside and red filling on the outside and rendered different randomly angled rotations each frame for x number of frames to make an explosion, that looked ok. I've tried particles that shoot off every which way from a specific point for explosions, but I've also seen cooler ones... A good example is in the game Overgod (in the depot under action I think -- if you play this game, I recomend you turn off the sound) the graphics arn't anything exciting, but the expolosions and special effects look like they belong in a 3D game (and it's quite captivating)... how do you do that? Are their articles on making cool particle effects/explosion rendering engines etc?
|
Fladimir da Gorf
Member #1,565
October 2001
|
The explosions aren't usually rendered. But you could use the fire effect I use in the OL demo to create an explosion, too. Using explosion sprites would give better speed but less variation. OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
Elverion
Member #6,239
September 2005
|
I've made pretty decent looking fire and smoke effects before with sprites. I'll attach a screenshot of it (although it looks pretty bad when it's not animated...it looks very cool when it is, though). All I did was have each particle raise up at between 85 and 95 degrees, with slightly random speed, slightly random colorization between yellow/red/orange, and would scale larger and become more transparent as it became "older". Once it's alpha became <= 0, it would be destroyed. As the particles were drawn, they would use the blender mode "addition" so that the flames seemed to combine with each other, rather than be drawn over top of each other. Smoke was dome in a similar way, only it would spread out a lot more, and not be colorized. -- |
Ceagon Xylas
Member #5,495
February 2005
|
Anyone have stuff on like nice flashy glowy things other than fire? |
Elverion
Member #6,239
September 2005
|
I've done all sorts of flashy-glowy stuff using pretty similar methods, such as "magic glitter" effects, explosions, object motion blur, lights, so on so on. Just minor tweeks here and there can make many different effects that way I mentioned earlier. From google, I found what looks like a pretty promising particle tutorial. And from NeHe: -- |
Ceagon Xylas
Member #5,495
February 2005
|
Here's my flame-thrower and napalm 'engine.'
So tell me what all I did wrong there. =] I'm known for amassing errors. |
Elverion
Member #6,239
September 2005
|
I think if you just use addition as your blending mode, it would look rather nice. Addition blending is just like it sounds...it "adds" the colors instead of just blitting over top of them. You should probably also begin with an alpha of, say 0.75. I'm not sure how to do this in allegro, though, sorry. -- |
Fladimir da Gorf
Member #1,565
October 2001
|
If you want to use software graphics, downloading FBlend would be a good start. Though you won't be able to both rotate (and/or stretch) and blend the sprites. OpenLayer has reached a random SVN version number ;) | Online manual | Installation video!| MSVC projects now possible with cmake | Now alvailable as a Dev-C++ Devpack! (Thanks to Kotori) |
Ceagon Xylas
Member #5,495
February 2005
|
Oh wow, the add_blender was ALLLOOTTT better! Thanks much Elverion! I'm leaning towards the top right in this image. for(short i=1; i<5; i++) { set_add_blender(0,0,0,life/8+life/2/5%i); circlefill(buffer,x,y,i+life/51,makecol(255,life,life/4+life/2/5%i)); //this is the red writing on the pictures } Okay I'll look into that Fladimir. =] |
Marcello
Member #1,860
January 2002
|
It'd also help if you used sprites with some texture instead of circles. You'll basically get the benefit of lots of little sprites without actually having them. Marcello |
kentl
Member #2,905
November 2002
|
Ceagon Xylas: You should make a game in which you play the role of a dragon who are out to burn some towns. Fighting crossbow soldiers, archers, knights, catapults and other medieval stuff. |
Ceagon Xylas
Member #5,495
February 2005
|
Thanks for the idea, I'll most likely do that now =] Specially if I can find someone willing to do the dragon art ^_^ Quote: It'd also help if you used sprites with some texture instead of circles. You'll basically get the benefit of lots of little sprites without actually having them. I'm afraid I don't understand the last part of what you're saying here. |
Krzysztof Kluczek
Member #4,191
January 2004
|
Quote: It'd also help if you used sprites with some texture instead of circles. Rotating these sprites properly also can help a lot (of course anti-aliasing is probably a must here). In Painkiller it worked really well. ________ |
Elverion
Member #6,239
September 2005
|
Yep. You've definantly made some improvement! It looks very nice now. As for the "It'd also help if you used sprites with some texture instead of circles. You'll basically get the benefit of lots of little sprites without actually having them.", he is suggesting that you make a better sprite, simply put. Look at the example I included in that zip file I attached in an earlier post. In your case, you might want it to be more yellowish in the sprite itself. I suggest GIMP ( www.gimp.org ) for doing any sort of texturing or making sprites like this. -- |
Ceagon Xylas
Member #5,495
February 2005
|
Okay, I like this idea -- but not for the fire. So I may use it for my smoke 'engine' instead. It's taking alot more CPU though. =/ [edit] |
Elverion
Member #6,239
September 2005
|
Yep. If you just use a better effect with fewer particles, maybe you can get it to work great. But, I think what you have right now is good enough. It looks like fire at least. Might I be able to get your full source on this? -- |
Ceagon Xylas
Member #5,495
February 2005
|
Yeah, most all of it is right up there ^
|
Michael Jensen
Member #2,870
October 2002
|
Quote: If you want to use software graphics, Actually I was planning on learning managed Direct 3D for my next game (probably a 2D game in VB.NET, overhead view with zooming) thanks for the articles and code posted... I'll try to read it -- starting with nehe #19. edit: hmmm.. I couldn't find a binary to download of nehe's example (didn't feel like downloading opengl sdk or whatever it is that you need, and the source and trying to compile it...) -- but from his explination, it's not that impressive, the only thing he has incorporated that I never tried to was particles with images bound to them instead of colors... I suppose that could be kind of cool... maybe if it also supported alpha blending like someone else said in this thread, each particle could be bitmapped/rotated/blended. edit: CX I like the topleft implimentation of the fire.
|
Ceagon Xylas
Member #5,495
February 2005
|
Feel free to use my fire if you want. I'll ask that you be nice and give me credit, but I wont hold it to you. Freesource. A further note on that is you may need to output 3 'particles' at once instead of just one. Something like if(mouse_b&1) for(short i=0; i<3; i++) fire[fire_counter].deploy(...); And here's the Binary for lesson 19. The NeHe binaries are found at the bottom of the page in the VC++ zip: Quote:
|
Michael Jensen
Member #2,870
October 2002
|
Ahh, it just said code and I didn't realize... Yeah just what I thought, blending sprites instead of dots... cool.
|
|