Special Effects requests

BlitzMax Forums/BlitzMax Programming/Special Effects requests

SillyPutty(Posted 2005) [#1]
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 ?


AntonyWells(Posted 2005) [#2]
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!


SillyPutty(Posted 2005) [#3]
hi, i know i can use particles, but would prefer that streaming effect, that is, not a broken trail, but a solid trail.


Robert(Posted 2005) [#4]
Hi Deux,

Do you have any screenshots?


SillyPutty(Posted 2005) [#5]
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 ?


Dreamora(Posted 2005) [#6]
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)


SillyPutty(Posted 2005) [#7]
let me try and get a crimsonland screeny


SillyPutty(Posted 2005) [#8]
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.


Dreamora(Posted 2005) [#9]
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 ...


SillyPutty(Posted 2005) [#10]
ahhh ok, sweet, thanks guys, i will test this out.

So you just scale the image gradient then. nice !


SillyPutty(Posted 2005) [#11]
thanks for the ideas guys, I implemented this, and it works 100% !!! :)


Tibit(Posted 2005) [#12]
Got a small demo with code to show?


SillyPutty(Posted 2005) [#13]
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



Tibit(Posted 2005) [#14]
Nice!