Sprite Alpha

Blitz3D Forums/Blitz3D Beginners Area/Sprite Alpha

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.

Graphics3D 800,600,16,2
SetBuffer BackBuffer()

layer0 = LoadSprite ("layer0.png",1)
layer1 = LoadSprite ("layer1.png",1) ;hexagons
camera = CreateCamera()

ScaleSprite layer0, 1.5,1
ScaleSprite layer1, 3,2

sx#=1
sy#=1

While Not KeyDown(1)
Cls
If KeyDown(203) Then sx=sx-.01
If KeyDown(205) Then sx=sx+.01
If KeyDown(200) Then sy=sy+.01
If KeyDown(208) Then sy=sy-.01

PositionEntity layer0,sx,sy,1
PositionEntity layer1,sx/2,sy/2,1

RenderWorld

VWait:Flip 0
Wend
EndGraphics
End