I'm trying to just get a sphere to roll around... here is the code so far (you can find the sphere texture in the Mak samples, under 3Dfirepaint). See what I did wrong.
Notice the
before the game loop? If I don't have this, the entire screen is just black, and nothing happens. Also, the turning doesn't work.
This happens both with and without the command
... but do I need that command anyway?
I haven't ever updated Blitz... is this a bug or a noob error?
Someone please help.
Graphics3D 800, 600 SeedRnd MilliSecs() Const leftkey = 203, rightkey = 205, upkey = 200, downkey = 208 Const spacebar = 57, enter = 28 light = CreateLight() PositionEntity light, 0, 0, 0 camera = CreateCamera() PositionEntity camera, 0, 20, 0 sphere = CreateSphere() PositionEntity sphere, 0, 1, 20 spheretex = LoadTexture("blitzlogo.bmp") ScaleTexture spheretex,.125,.25 EntityTexture sphere, spheretex PointEntity camera, sphere ground = CreatePlane() PositionEntity ground, 0, -1, 0 Print "Hi" While Not KeyDown(1) Cls If KeyDown(upkey) TurnEntity sphere, 10, 0, 0 MoveEntity sphere, 0, 0, 2 EndIf If KeyDown(leftkey) TurnEntity sphere, 0, 5, 0 EndIf UpdateWorld RenderWorld Wend
Notice the
Print "Hi"
before the game loop? If I don't have this, the entire screen is just black, and nothing happens. Also, the turning doesn't work.
This happens both with and without the command
Setbuffer Backbuffer()
... but do I need that command anyway?
I haven't ever updated Blitz... is this a bug or a noob error?
Someone please help.