Screensaver mod

BlitzMax Forums/BlitzMax Programming/Screensaver mod

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.

The other posts are correct, Dream. Whilst you can get away with renaming, there is more to creating a screen saver. I plan on supporting (transparently) the preview in Windows and any other platform specific stuff for OSX and Linux (if indeed Linux has any specific requirements for a screen saver).

I have created my own C module to handle the creation of the window for you (code derived from the bglCreateContext), that will automagically be a child of the HWND passed in, when in preview mode or full screen when in run mode.

You will "simply" (hard part is the actual screen saver!):

1. Derive your screen saver from my TScreenSaver class.

1.1 Implement the abstract 'RenderFrame' method. You will draw one frame of the screen saver per call to this method. You should check the width and height properties, which will automatically be updated when in preview mode, so you can scale and draw your frames appropriately.

1.2 Optionally override the CreateParams method, to specify your own resolution and bit depth for Run mode. This will always be full screen.

1.3 Optionally override the Config method, if you wish to provide a configuration UI. Default is no config UI.

2. Create an instance of your derived screen saver class
3. Execute the Go() method.
When calling Go(), the TScreenSaver class will run the appropriate UI and set up the window appropriately, depending on the mode (run, config or preview). You just have to call Go().

That's it. All the tech stuff is handled by the TScreenSaver class for you.

I don't have a Mac yet - but will purchase a powerbook in the coming week. Linux I will do some research and seek the help of others.

Cheers,

Stu