nice ship shoot effects

BlitzMax Forums/BlitzMax Beginners Area/nice ship shoot effects

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

for my game i'm searching simple and original ideas for the player ship shoot. (i detect collision with ennemies via imagecollide functions).
Need some ideas !

For example :
Graphics 800,600


Global ListeCercles:TList = CreateList()

Function DrawVectorCircle(cx:Double,cy:Double,radiusx:Double, radiusy:Double)
	Local lx:Double=radiusx*Cos(0)
	Local ly:Double=radiusy*Sin(0)
	For Local d:Double=20 To 360 Step 20
	Local nx:Double = radiusx*Cos(d)
	Local ny:Double = radiusy*Sin(d)
	SetColor 0,100,0
	DrawLine(cx+lx,cy+ly-1,cx+nx,cy+ny-1)	
	SetColor 0,255,0
	DrawLine(cx+lx,cy+ly,cx+nx,cy+ny)
	SetColor 0,100,0
	DrawLine(cx+lx,cy+ly+1,cx+nx,cy+ny+1)
	
	lx=nx
	ly=ny
	Next
End Function

Type TCercle

	Field x
	Field y
	Field Rayon
	Field a#

	Function Creer:TCercle (x,y)
	
		Local n:TCercle = New TCercle
		
		n.x = x + Rand (-5,5)
		n.y = y
		n.rayon = 1
		
		ListAddLast ListeCercles, n
		
		Return n
	
	End Function
	
	Function Maj()
	
		For c:TCercle = EachIn ListeCercles
		
			SetBlend lightblend
			SetLineWidth 2
			If c.y > 0 Then
				c.y = c.y - 5
				If (c.y Mod 7) = 0 Then 
					If c.a < 10 Then
						c.a = c.a + 1
						c.Rayon = c.Rayon + c.a
					End If
				End If
				SetColor 255,0,0
				DrawVectorCircle (c.x , c.y, c.rayon, 5)
			Else
				ListeCercles.Remove c
			End If
		Next
	
	End Function

End Type

While Not KeyDown (KEY_ESCAPE)

	Cls
	If MouseDown(1)	
		l = TCercle.Creer (MouseX(), MouseY())
		FlushMouse()
	End If
	
	TCercle.Maj()
	Flip
	
Wend