Another Dumb Screensaver Q
Blitz3D Forums/Blitz3D Beginners Area/Another Dumb Screensaver Q
| ||
Okay, before you start flaming me, I read the forum posts and searched for a similar problem but didn't find it. I'm using windows xp, and made a simple screensaver, a photocube both the program and picture are in the same directory, now when I got to screensaver and preview the screen goes full, blank, then out and i get the 'memory access violation' error message. Here's the code. ;my first screensaver ;Richard Colletta 2004 Graphics3D 640, 480 SetBuffer BackBuffer() light=CreateLight() AmbientLight 0, 0, 0 camera=CreateCamera() CameraViewport camera,0,0,800,600 Global cube = CreateCube() cubemap = LoadTexture("robo.jpg",8) EntityTexture cube, cubemap FreeTexture cubemap PositionEntity cube, 0,0,5 Repeat TurnEntity cube, 0.4,0.5,0.6 RenderWorld Flip Until MouseX() <> 0 Or MouseY() <> 0 Or GetKey() <> 0 Or GetMouse() <> 0 End I compiled it without debug enabled, tried taking out the freetexture line, also tried it in 800,600 all modes which are supported on my card, i can use up to 1440, 900. Thanks! |
| ||
you can't preview a screensaver made in blitz |
| ||
For one thing, mousex() and mousey() measure the mouse's position not its movement, so unless the mouse coordinates are at the upper left corner of the screen that loop will always be exited. |
| ||
double-posted...doh! |
| ||
Matty, you're mistaken. Try running the code you'll see what I mean. The prog ends when you move the mouse. AGamer, Hey hey, I guess you're right. I waited the obligatory minute and the screensaver popped up fine. But, whenever you go to the screensaver menu, and select a new screensaver it always auto-previews, so you screen goes black then error, then when you click apply, screen goes black, you get error, then after that it works. Anyway around that? |
| ||
There are no dumb screensavers ... you know the saying ... "there are no stupid questions, only stupid replies" |
| ||
I'm curious to how that line works :)Until MouseX() <> 0 Or MouseY() <> 0 Or GetKey() <> 0 Or GetMouse() <> 0 Same as matt, that line should fill the condition, unless the mouse pointer is at 0,0 |