Thanks so much for your comments, but the transparency bug... I have given up with it. Game Maker seems to screw everything that has to do with surfaces and transparency combined. It just doesn't want to. That last idea of yours, adding the transparency after exporting, is excellent. But how can I ever get the transparency out of the application if it doesn't even provide a way to save it somehow? I have googled everything and tried lots of things, changing blend modes, using multiple surfaces, using screenshots, turning off automatic drawing... It doesn't want to. The only way of fixing this I think is a DLL with GMAPI, but I can't write DLL's and haven't ever used GMAPI, nor do I userstand it. Porting it into an other language would also require me to learn another programming language, but that's too much for me. I read tutorials how to program with C, C++ etc, it's too difficult. If I don't find a final solution, this is probably going open source then. If the bug is as deal-breaking as you describe it, indeed the program would die like many others here. Unless Game Maker 9 is going to fix these surface problems of course... *goes to google, again*
I totally understand. Game Maker has very messed up drawing issues with (or even without) surfaces. It is very very frustrating for many people, including myself.
Perhaps you can export the combined alpha channels of the game image into a composite black and white image, save that image as a plain non-transparent image, import that image as an alpha channel to a sprite
(created with the sprite_create_from_surface(id,x,y,w,h,removeback,smooth,xorig,yorig)
function rather than from a surface directly). The function to set an alpha channel to a sprite is sprite_set_alpha_from_sprite(ind,spr)
and then the alpha channel will be set when importing to the newly created sprite. You can also save the sprite to a .png file in GM8 with sprite_save(ind,subimg,fname)
. Maybe if you use sprites in conjunction with surfaces, it will work. The reason I say this is because in the manual it mentions that the format of the sprites / stuff drawn on the screen and the way the game image is drawn on the surface is different. You can possibly use surface export and sprite import to overcome this limitation.
A quote from the GM8 manual:
"Note that there are no functions to copy part of the screen to a surface. (This is impossible due to possible format differences between the screen and the surfaces.) If this is required you must set a surface as render target and next draw the room. You can then use the surface copying routines to get parts of it.
Note that you can also create sprites and backgrounds from surfaces. See the section on changing resources for more information."
There is also a .png and other file type exporting DLL somewhere around here but it is very old. I have it on my compy and I can get it to you if you need it. It is outdated since GM8 handles png stuff automatically but it can at least save alpha channels and possibly combine them with a .png file. Also, maybe use another application to save screenshots than GM's built in screenshot stuff. Possibly a command-line tool. I believe this DLL I mentioned uses something like that actually. However, no matter what, at least try using some hybrid of the method I mentioned above. I believe you can do it. This is a very useful program and I can't imagine why one like it isn't already available somewhere. Do not give up. As long as Gamemaker can export images in some format, I guarantee there is a way. Hopefully my method can help you overcome this limitation or at least the DLL might be able to succeed wherever Game Maker fails.
I totally support your program! I am making a game where people could really use this and I will definitely provide free advertising for you if you can succeed with this!
PM me if you need any help. I've been around a while and know GM's drawing capabilities inside and out. Take care dude, and good luck!