A faster starfield

BlitzMax Forums/BlitzMax Programming/A faster starfield

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.

Yea sure. You would use it as follows,

Graphics 800,600

TStarfield.Create(10000,10000,0.0001)
Local x#,y#
While Not KeyDown(KEY_ESCAPE)
	Cls
	If KeyDown(KEY_LEFT) Then x:+5
	If KeyDown(KEY_RIGHT) Then x:-5
	If KeyDown(KEY_UP) Then y:+5
	If KeyDown(KEY_DOWN) Then y:-5
	TStarfield.UpdateAll(x,y)
	TStarfield.DrawAll(x,y)
	Flip
Wend


Eventually i'll change the rectangles to something a bit more pretty.

@Gabriel the color suggestion definately did speed things up somewhat. Thanks!