Special Effects requests
BlitzMax Forums/BlitzMax Programming/Special Effects requests
| ||
Hi guys, Do any of you have any ideas as to create a good looking bullet shot, as in Crimsonland, when you shoot a bullet it leaves an awsome trail ? |
| ||
Emit partiles along the inertial vector(Trademark pending) of the bullet trail that fade away (Decrease scale, drown out alpha ) as the bullet travels away. ----------> /\ Quads! |
| ||
hi, i know i can use particles, but would prefer that streaming effect, that is, not a broken trail, but a solid trail. |
| ||
Hi Deux, Do you have any screenshots? |
| ||
unfortuneatly not. I looked at the zombi blast demo, and I may go with that solution, as in his trails. If you look at crimsonland, the bullet trail is one streak. Not a plethora of primitives. It blends exponentially from the bullet itself, to the source, in one primitive. I think it may be a texture ? |
| ||
In this case use scale cones as particles ;-) But I fear without shader it won't look like what you expect (stuff like in Deus Ex, Matrix etc) |
| ||
let me try and get a crimsonland screeny |
| ||
sorry for the flood post here are example screenies http://www.gamershell.com/pc/crimsonland/screenshots.html?id=3 and http://www.gamershell.com/pc/crimsonland/screenshots.html?id=2 notice the bullets and blended "streaks" That is what i am looking for. |
| ||
ah this kind of "effect" its simply a stretched cone (in 3D) or stretched image where in both cases the image is a solid color to invis gradient ... |
| ||
ahhh ok, sweet, thanks guys, i will test this out. So you just scale the image gradient then. nice ! |
| ||
thanks for the ideas guys, I implemented this, and it works 100% !!! :) |
| ||
Got a small demo with code to show? |
| ||
sure there may be some redundant code in here, i knocked it up very quickly. let me know what y'all think. Also, it lacks the crimsonland verocity, but that can easily be fixed, this was just to test. ''' community project for prophecy Strict Framework brl.glmax2d Import brl.graphics Import brl.linkedlist SetGraphicsDriver GLMax2DDriver() AppTitle = "Bullet Test - by Erick 'Deux' Grove" Graphics 800,600,0 AutoMidHandle True Global bulletimage:TImage = CreateImage(16,16,DynamicImage|MaskedImage) Global bulletList:TList Type bullet Field x# Field y# Field origin_x# Field origin_y# Field scale_factor# Field alpha_factor# Field life# Method draw() SetColor 200,125,125 DrawRect x,y+(scale_factor*5),3,5 SetScale 1,scale_factor SetColor 100,100,100 SetAlpha alpha_factor DrawRect origin_x,origin_y,3,5 SetScale 1,1 SetAlpha 1 End Method Method update() y:-1 life:-1 scale_factor:-3 alpha_factor:-0.03 If(alpha_factor <0) ListRemove bulletList,Self End Method End Type bulletList = CreateList() Cls SetColor 200,200,200 DrawRect 0,0,3,10 GrabImage bulletimage,0,0 SetBlend(alphablend) Function UpdateBullets() For Local b:bullet = EachIn bulletList b.Draw() b.Update() Next End Function While Not KeyDown(KEY_ESCAPE) SetScale 1,1 SetAlpha 1 If KeyHit(KEY_SPACE) Local mybullet:bullet = New bullet mybullet.life = 100 mybullet.alpha_factor=1 mybullet.x = MouseX() mybullet.y = MouseY() myBullet.origin_x = mybullet.x myBullet.origin_y = mybullet.y bulletList.addLast(mybullet) End If UpdateBullets() Flip Cls Wend FlushMem End |
| ||
Nice! |