Feedback wanted on code style

BlitzMax Forums/BlitzMax Beginners Area/Feedback wanted on code style

'sf' should probably have a more meaningful name (something that reflects the fact that it is a collection) -- generally your variable and method names are really self-explanatory, so much so that the comments are mostly superfluous. R,G and B should probably be lower case for the sake of consistency... these are all picky little things because it's genuinely quite pleasant to read already.

One thing that irks me (sad?! who?! me?!) is resetting the stars to absolute positions when they move off-screen -- it means that, relative to where they should be, they fall slightly out of position. I would favour...
if x<0 x:+screenWidth

The only issue is I get 'tearing' in windowed mode of the starfield
Try changing the gfx driver -- on my machine, for example, OpenGL just never syncs whereas DirectX does. Neither in windowed mode, mind, but your mileage may vary.

I figure its probably better to create the starfield, covert the whole thing to a tiled background, then scroll it
Over-engineering is popular around here (dig dig!), but don't do this. On an actual tiled display you would either have to painstakingly work out a set of animated* tiles that fit together to make a full starfield (this would cost time for less freedom than you already enjoy) OR sacrifice a screen's worth of tiles and address them as if they were a screen sized bitmap (which would mean you'd be emulating a tiled display in order to emulate a bitmap display, which would be absurd!) Seriously, just plot/blit 'em!

*Because you're obviously going to animate this, right? With stars moving at different speeds to give the impression of depth, right? RIGHT?! :P

EDIT: Oh and I guess I'd use a list rather than an array, just because I find the resulting code a little cleaner.