Saver Max2D for BlitzmaxCommunity Forums/Showcase/Saver Max2D for Blitzmax
SaverMax2D module provides a set of commands for coding screensaver.
Download : SaverMax2D.zip
Download : Example.zip (simple example, advanced example, saver tools)
- DirectX driver
- Fullscreen mode
- Preview mode
- AboutBox pixmap logo
- Saver debugger dialogbox
- Saver icon
- Saver longname
- Saver_Converter.exe ' convert .SCR.EXE file -> .SCR file
- Saver_Resource.exe ' compile windows bbresource : icon & strings
How to install MINGW & SaverMax2D :
1. Install Bmax 1.10 or higher
2. Install minGW
Add 'c:/mingw/bin' to your PATH env variable
Add 'c:/mingw' to your MINGW env variable
3. Extract 'winsaver.mod' to your 'mod/pub' directory.
4. sync your docs
5. When you finished setting, you must restart your Bmax IDE.
How to create a fully functionnal saver :
' optional part
1. Place a 'bbicon.ico' file in your project directory.
2. Place a 'bbstring.txt' file in your project directory.
3. Start Saver_Resource.exe
-> create bbresource.o
' main part
4. Compile your project: saver.scr.bmx
-> create saver.scr.exe
5. Start Saver_Converter.exe
-> create saver.scr
' Test your saver
6. Right-click on your SCR file and select INSTALL
Strict Framework PUB.WinSaver 'Saver directX framework Import "bbresource.o" 'Saver resource : icon & longname Import BRL.PngLoader 'PNG support ' ---------------- ' saver config ' ---------------- Incbin "bblogo.png" 'Saver logo Local saverLogo:TPixmap=LoadPixmap("Incbin::bblogo.png") Local saverTxt:String saverTxt:+" Blitzmax Screensaver " saverTxt:+"~n~npowered by~n BlitzResearch.com " saverTxt:+"~n~nwritten by~n Ed From Jupiter " AboutSaver saverTxt,300,250,saverLogo saverLogo=Null;FlushMem ' ---------------- ' saver graphics ' ---------------- Local saverMode$ =CreateSaver("Greeny Feeling") Local saverWidth =GraphicsWidth() Local saverHeight =GraphicsHeight() 'saver customization : FULLSCREEN / PREVIEW Local x#,y#,size If (saverMode$="FULLSCREEN") SetClsColor 66,128,66 size=50 Else SetClsColor 66,200,66 size=10 EndIf ' ---------------- ' main loop ' ---------------- Repeat Cls x=x Mod saverWidth +1 y=y Mod saverHeight +1 DrawOval x,y,size,size Flip FlushMem Until KeyHit(KEY_ESCAPE) ' ---------------- ' end ' ---------------- End
| import brl.d3d7max2d|
?? Cant find that.
| Yavin have you downloaded BlitzMax 1.10 and synced mods? |
| Download the BMAX 1.10 and synchronize Moduls over the Internet. Then it should work. Itīs a new Module. |
| Doesn't run...|
I get ....
Building windows icon
bmkOLD.exe makeapp -d -t gui -o C:/tempy/For CD/SaverMax2D/SaverExample/saver example/saver.scr.debug "C:/tempy/For CD/SaverMax2D/SaverExample/saver example/saver.scr.bmx"
bmk commandline error
Usage: bmk operation [options] [parameters]
makeapp Make application
makemods Make modules
cleanmods clean modules
listmods List modules
modstatus Module status
syncmods Synchronize modules
zapmod Zap module
unzapmod Unzap module
ranlibdir ranlib dirtree (MacOS)
docmods Create module docs
syncdocs Synchronize doc indexes
convertbb Convert .bb file to .bmx
-q Quiet mode
-v Verbose mode
-a Make all
-d Debug mode
-r Release mode
-k Kill source (danger!)
-t apptype Specify App type (console,gui)
-o outputfile Specify output file
-f framework Specify framework
| Now get C:/Program Files/BlitzMax/bin/ld.exe: cannot find |
| Oops I forgot to upload the new compiler 8-U |
| - Download Link Fixed -|
I plan to add DLL support.
| Now get....|
C:/blitzmax/mod/pub.mod/winres.mod/winres.o: file not recognized: File truncated
| So I have to move my BlitzMax from c:\program files\bltizmax to c:\bmax...|
How do I fix the C:/blitzmax/mod/pub.mod/winres.mod/winres.o: file not recognized: File truncated
| I don't know.|
Could you show me your RC file content ?
| Erm whats RC? |
| winres.rc is 0 bytes |
| Is it a read-only file ? |
| no - should it be? |
| OK I have copied the winres direcotry back again...|
The winres.rc file contains a line...
1 ICON "C:/bmax/samples/PERSO/QUICKS~2/bbicon.ico"
This file does not exist!
How does one use this library?????
| Renamed the bmk.exe back and works now. Why do we have to rename it?[ |
| My bmk should compile windows resources (icon and/or strings) before calling bmkOLD.|
It writes two files 'winres.rc' and 'winres.o' in 'pub.mod/winres.mod' folder
And if you compile a .scr.bmx, it will export directly a .scr file.
| Also I have a different bbicon.ico in the directory and it doesn't pick it up. HELP! |
| But that means that other bmx files won't work?|
Where should I put my icon?
| Did you install mingw ?|
You should put 'bbicon.ico' and/or 'bbstring.txt' in your project directory.
| mingw? No! Should I? |
| If I rename bmk.exe other bmx don't build. In fact the saver.bmx.scr doesn't build either! |
| You should install it.|
bmk uses MinGW for compiling mods, resources or DLLs
| If I rename bmk.exe other bmx don't build. In fact the saver.bmx.scr doesn't build either! |
| With the bmk.exe renamed to bmkold.exe and the other bmk.exe dropped in there and winGW installed it is does is...|
Adding windows strings...
It does not build an exe though!
| In this case, it should build a SCR file not a EXE file.|
saver.scr.bmx -> saver.scr
saver.bmx -> saver.exe
| It creates nothing - no exe or scr!|
| sorry I've no more ideas about this problem |
| 1.10 wtf ... lol looking for it now. |
| Is Mac/Linux compatibility on the way? |
But Stuc will make cross-platform version : http://www.blitzbasic.com/Community/posts.php?topic=47231&hl=screensaver
can somebody do a little Tool (bridge) to Blitz3d?
| Very strange what is happening to me.|
I installed the module as was said. when i compile any source i get the error:
D:/Program Files/BlitzMax/bin/ld.exe: cannot find
I renamed the ldOLD.exe to ld.exe again but the problem persists...
Anyone knows what to do??
Ok, I noticed that the problem disappears when i remove the winres.mod. But like this i cant use the saver module. Any ideas?
| Did you set your env variables PATH & MINGW ? |
| Yes. That is all set. I had no problems building modules until i tryed to install the saver module.|
What is strange is that the path given by the error message is correct...
i had the same trouble - and have given up - it's a shame because this could be a grat tool
| Is it just me an Boiled Sweets that have this problem? |
| Same problem here. Goes through the build. But produces no output at all. |
Man this thing is buggy.
It assumes our BMax installation is in the root directory. I moved it to the root. It keeps telling me that it can't find the winres.o file.
| Ok forget BMK addon, I'll make a simple EXEtoSCR converter |
| Nice one ED. You rock! |
| This categorically does not work. Please amend the installation instructions or take the software down. I wasted two hours on this trying to get it installed. And please - nobody is going to feel comfortable with replacing bmk.exe and potentially destroying their installation or introducing bugs into their other projects. |
Don't use my BMK.
I said it does not work.
Sorry, the new 'sync' version of bmax has broken my lib again.
| Updated saver example & saver module|
- added: AboutBox logo
- removed: BMK compiler addon
- added: SaverConverter tool
- added: SaverResource tool
- updated: doc
| The two exe's don't do anything!|
Also how do you install this?
PLEASE PLEASE PLEASE some simple documentation!
| ok |
| How to use saver tools : look above... |
| Ed, my humbles apologies!|
I'll try it over the weekend and report back. Thanks for all your help
| OK I followed all directions faithfully. When I ran saverresource.exe its output was a zero-length file. I then got the following output from the compiler:|
flat assembler version 1.51
3 passes, 8219 bytes.
D:/BMAX/SaverMax2D/SaverExample/SaverExample/bbresource.o: file not recognized: File truncated
Please help us Ed. A lot of us would be thrilled with this mod if we could JUST get it working!
| Just one other thing: I noticed that when I ran the example you provided, the one that works, the little balls raced on the preview screen but when running in normal saver mode they were very slow. I've seen this before and the reason for the difference is usually that the programmer making the saver drew a sized window for when running in preview mode. If you are doing that, I'm happy to tell you it isn't necessary. Your savers will work much better if you don't. All you have to do is set the parent/child relationship of the app window to the preview window, issue your preferred flavor of placement command, ie setwindowplacement, setwindowpos, movewindow, etc. which will also size your window, and that's it. Your 800 x 600 (or whatever) window will automatically be scaled by Windows to run in the space provided for it. So you just have to check for the /p parameter and if you get it, take the window handle that gets passed in the third parameter, use it with your app handle to set parent, set position, then just run normally. Your mod doesn't seem to include source so I can't see what it is you are doing in there, but it really doesn't need to be any more than that. (for preview mode. config mode is something else). |
| * UPDATE 24/06/2005 *|
I included two examples in SaverExample.zip ( simple example and advanced example )
When I ran saverresource.exe its output was a zero-length file.
Always the same problem... You seems to have a problem with your MinGW installation. Did you set your env variables ?
Env variable system really sux :-/
the little balls raced on the preview screen but when running in normal saver mode they were very slow
- CreateSaver command works like Graphics command ( sync your docs and press F1 to see the command help)
- Unlike Graphics command, some parameters ( hertz, width and height ) are ignored when preview mode is enabled.
- By default, preview mode uses 'nosync' refresh mode and preview window size. That's why it seems to be faster.
If you want a faster fullscreen mode:
CreateSaver$(title$,width=SCR_DESKTOP,height=SCR_DESKTOP,depth=16,NOSYNC,saverflags=SCR_DETECTALL , exitKey=KEY_ESCAPE)
| OK, I found the problem. Your instructions say to add c:/mingw to my MINGW environment variable and c:/mingw/bin to my PATH. It should have read:|
Add the following to your PATH:
Based on your instructions I had created a MINGW environment variable and set it to c:/mingw and that is what my problem was. I deleted that and did the above and it works fine now. Thanks E from J.
| All the links are dead! |
| Since they're all from a year ago then yeah, they probably are. |
| Maybe this module has been updated in the meantime?!? |
| These aren't...|