360 Degree Scroller Background Effects

BlitzMax Forums/BlitzMax Programming/360 Degree Scroller Background Effects


Graphics 1024,768,32,0

Global Glo_X
Global Glo_Y
Global Image=LoadImage("Blend1.png")
Global BG_Layer_List:TList=CreateList()




Type BG_Layer
	Field Frame[120]
	Field X[120]
	Field Y[120]
	Field Blend[120]
	Field Speed[120]
	Field Rot#[120]
	Field Scale#[120]
	
	Function Create:BG_Layer()
		Temp:BG_layer=New BG_Layer
			For times=0 To 119
				Temp.Frame[times]=Times Mod 1
				Temp.x[times]=Rand(1000)
				Temp.y[times]=Rand(1000)
				Temp.rot[times]=Rand(360)
				Temp.Scale[times]=Rand(1/50)
				Temp.Blend[times]=Rand(1,3)
				Temp.Speed[times]=Rand(100/1000)
			Next
		ListAddLast BG_Layer_list,temp
			Return temp
	End Function
	
	Method Draw_Sprites()
	SetAlpha(.1)
	SetBlend(LIGHTBLEND)
		For times=41 To 89
		SetColor(times+100,0,0)
	SetTransform(Rot[times],Scale[times],Scale[times])
	
		DrawImage Image,x[times],y[times],0
		Rot[times]:+Speed[times]
	Next
	
	'SetBlend(SHADEBLEND)
	For times=0 To 40
	'SetColor(0,times+150,0)
	SetTransform(Rot[times],Scale[times],Scale[times])
	
		DrawImage Image,x[times],y[times],0
		Rot[times]:+Speed[times]
	Next
	'SetBlend(ALPHABLEND)
	For times=90 To 119
	'SetColor(0,0,times+100)
	SetTransform(Rot[times],Scale[times],Scale[times])
	
		DrawImage Image,x[times],y[times],0
		Rot[times]:+Speed[times]
	Next


		End Method
	
End Type







BG_COLL:BG_layer=BG_Layer.create()


While Not KeyHit(KEY_ESCAPE)

BG_COLL.Draw_Sprites()


FlushMem;Flip
Cls
Wend 

	


Some Hacked up code when working with particals

You Can add layers like that over you detail back ground just some blending concepts replace blend1.png with a alpha image of you choice maybe 400*400

Smoke and cloud images prolly work best