Masking or occluding image strips in real time?

Blitz3D Forums/Blitz3D Programming/Masking or occluding image strips in real time?

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.

I would use a sprite or quad and then texture it with your number texture. Scale the texture so only one number fits on the sprite. Then use the positiontexture command to scroll the texture on the sprite. Below is some rough code to give you the idea. You will have to use your own image but basically it should have the numbers from 0 to 9 going vertically down it equally spaced.

Graphics3D 800,600,0,2

cam=CreateCamera()

numbersprite=CreateSprite()
PositionEntity numbersprite,0,0,10

numbertexture=LoadTexture("numbers.png",1+2)
ScaleTexture numbertexture,10,10
EntityTexture numbersprite,numbertexture

ycount#=1
While Not KeyDown(1)
	PositionTexture numbertexture,1,ycount
	ycount=ycount-0.005
	If ycount=0 Then ycount=1
	RenderWorld
	Flip
Wend


You can download the source with the media for the example at http://www.urbaninteractive.net/Numbers.zip

Hope this helps.