Jump to content


Photo

Transparent Gm Windows


  • This topic is locked This topic is locked
110 replies to this topic

#1 pythonpoole

pythonpoole

    Scorpion Software

  • New Member
  • 1894 posts

Posted 30 May 2006 - 02:35 PM

Hi, for those of you who don't know, many (and I mean dozens and dozens of you) have been asking for a way to make GM's Game Window transparent for ages and ages.

The truth of the matter is, because GM uses DirectX, it makes it almost impossible to use the WinAPI commands to change the opacity of the window to make it appear semi-transparent.

Many DLL makers have tried to produce a transparent window DLL for ages and ages, some spending hours upon hours trying to unlock the secret. Today I have uncovered that secret, and I wish to share it with you.

Please all thank Porfirio for the transparency dll he has made (that doesn't work on its own). The Example I've made shows you how to develop a GM game / make your window transparent, using a transparency dll that doesn't work.

What doesn't work about the current DLLs? Well they don't appear to make the window transparent at all, only the title bar, and when dragged they leave behind what I call "guck." This ALL GML method avoids the Guck, and allows for REAL TIME, true transparency without the GUCK, you can even have dragable windows, and Skin your windows to different shapes and sizes.

SCREENSHOTS
Posted Image

DOWNLOAD
Download Link 1 (Scorptek - 15kb - Download Time: ~1 Second on 56k dialup)
Includes: Heavily commented GM6 example, Porfirio's never released transparency dll (released with permission) and GearGOD's skin dll.

Please Credit If Used:
Pythonpoole OR Scorptek (for example, and gml tips and tricks to create transparency)
Porfirio (for transparency dll)
GearGOD (If skin.dll used)


Thanks for commenting ::lmao::


Closed as links are broken ~ paul23

Edited by paul23, 14 June 2011 - 09:35 PM.

  • 0
- Ben

#2 Porfirio

Porfirio

    GMC Member

  • GMC Member
  • 1209 posts

Posted 30 May 2006 - 02:38 PM

Good work man ::lmao::

A small litle trick that work

Edited by PORFIRIO, 30 May 2006 - 02:46 PM.

  • 0

#3 tangibleLime

tangibleLime

    Lunatic

  • GMC Elder
  • 2520 posts
  • Version:GM:HTML5

Posted 30 May 2006 - 02:52 PM

I never would have thought about doing it that way ::lmao:: Great find!
  • 0
Posted ImagePosted Image

#4 SleeK GeeK

SleeK GeeK

    The Biggest And The Best

  • New Member
  • 769 posts

Posted 30 May 2006 - 03:08 PM

Very well done. But yet, i would have to read the code carefully to fully understand how it works, because GML is pretty new to me ::lmao::.

Regards,
SleeK GeeK.
  • 0

#5 pythonpoole

pythonpoole

    Scorpion Software

  • New Member
  • 1894 posts

Posted 30 May 2006 - 03:24 PM

Thanks for the comments, glad you like the "trick" ::lmao::

Hope everyone finds a good use for it.
  • 0
- Ben

#6 lukesterspy

lukesterspy

    Robofish

  • GMC Member
  • 762 posts
  • Version:Unknown

Posted 30 May 2006 - 03:32 PM

Cool one dude
  • 0

R o b o fish Games


#7 Shaltif

Shaltif

    The Audio Master

  • GMC Elder
  • 1185 posts

Posted 30 May 2006 - 07:14 PM

Just a note, it's not the taskbar which causes the window to refresh, but it's because the window is partially offscreen. I determined this because my taskbar is on the right (not bottom) and by dragging the window anywhere that part of it was offscreen, it doesn't leave a mark behind (while if the whole window was on screen, it did).

An interesting work around, I must admit, but a bit limited (requiring the window to always be partially offscreen to correctly work).

~Brandon
  • 0

#8 pythonpoole

pythonpoole

    Scorpion Software

  • New Member
  • 1894 posts

Posted 30 May 2006 - 09:19 PM

That is strange, based on my observation as soon as the window made contact with the taskbar it becomes fully transparent, it didn't have to be actually off the screen.

The other thing is if you need the window in the centre of the screen what you can do is used the skin dll to skin the window to the shape you want and make it draw one pixel of the room on the left of the screen, the right and the bottom, this way it should look like a centered screen, and will work if your taskbar is at the bottom or the sides, however the skin dll seems to be slow at reading large images.

Thanks for the comments.
  • 0
- Ben

#9 Smarttart62

Smarttart62

    designFUSION™

  • New Member
  • 2619 posts

Posted 30 May 2006 - 09:38 PM

Finally you released it =).
Ill check it out in uno momento.
-Steve
  • 0

#10 WMCD

WMCD

    Spritist

  • GMC Member
  • 1422 posts
  • Version:GM5

Posted 30 May 2006 - 10:43 PM

Very neat; I have been looking for something like this forever!

Just one question though: do you know how to just make the room transparent and not the objects?

Thanks, and keep up the good work!
  • 0

#11 ChIkEn AtE mY dOnUtS

ChIkEn AtE mY dOnUtS

    Pwner of barcodes

  • GMC Member
  • 2410 posts

Posted 30 May 2006 - 10:59 PM

Omg, THIS ROCKS!
  • 0
I've moved away from GM. If you want to contact me, feel free to email ryanwebdev@gmail.com.

Thanks,
Ryan.

#12 Shaltif

Shaltif

    The Audio Master

  • GMC Elder
  • 1185 posts

Posted 31 May 2006 - 12:05 AM

That is strange, based on my observation as soon as the window made contact with the taskbar it becomes fully transparent, it didn't have to be actually off the screen.

<{POST_SNAPBACK}>


Hmm, maybe it's not the edge of the screen, but the edge of the workspace. When the taskbar is visible all the time (mine slides into view only when I mouse for it), the workspace is edited so that no application goes behind it. (notice how when you maximize a window, it doesn't maximize past your taskbar, this is due to the workspace).

Ironically, this is something which "could" be changed. I've made a DLL before which allowed me to set the workspace dimentions to whatever I wanted...in theory, you could set the workspace to just less the size of the window.

However, this is a global setting. Meaning all windows would be effected. (mainly maximized and docking applications). So I don't "recommend" this, but it is another option.

~Brandon
  • 0

#13 Cynical

Cynical

    Inside the Cynic

  • New Member
  • 423 posts

Posted 31 May 2006 - 12:14 AM

Nicely done, seems to work great... Roach actually told me about this earlier today so I thought I'd come hunt it down.

Unfortunately if you take a screenshot of the game it is NOT transparent, but that's minor. Nice work :) .
  • 0

#14 tangibleLime

tangibleLime

    Lunatic

  • GMC Elder
  • 2520 posts
  • Version:GM:HTML5

Posted 31 May 2006 - 12:28 AM

Unfortunately if you take a screenshot of the game it is NOT transparent, but that's minor. Nice work :) .

<{POST_SNAPBACK}>

Well... then how did he do it? :)
  • 0
Posted ImagePosted Image

#15 pythonpoole

pythonpoole

    Scorpion Software

  • New Member
  • 1894 posts

Posted 31 May 2006 - 12:30 AM

Actually he is correct, if you use Alt+PrtScr and take a screenshot of only the game window you end up with a solid background.

Only taking a full screenshot of the entire screen (Just PrtScr) works with the transparency.
  • 0
- Ben

#16 celebraces

celebraces

    GMC Member

  • GMC Member
  • 956 posts

Posted 31 May 2006 - 03:50 AM

So cool! for those who said it couldn't be done... I'm at work so i'll have to try it later :).
  • 0

#17 Porfirio

Porfirio

    GMC Member

  • GMC Member
  • 1209 posts

Posted 31 May 2006 - 10:21 AM

So cool! for those who said it couldn't be done... I'm at work so i'll have to try it later :).

<{POST_SNAPBACK}>


Well i sayd it couldnt be done, and it still cant be done in a normal way, you have to use some tricks, so i was right...
  • 0

#18 gmjab

gmjab

    GMC Member

  • New Member
  • 784 posts

Posted 31 May 2006 - 10:27 AM

Very Very Nice, This could come in handy sometime.

- Jarred
  • 0

#19 pythonpoole

pythonpoole

    Scorpion Software

  • New Member
  • 1894 posts

Posted 31 May 2006 - 02:13 PM

Thanks again for the comments. Sorry about the window-only screenshot issue, thats not avoidable. Sleek Geek and I are looking into improving this system so its more compatible with cross user settings such as Shaltif's desktop, however we havn't made much progress on that yet. For now, this system will work on 98% of user's computers who can run gm games and are using windows 2000 or later (for transparency to kick in).
  • 0
- Ben

#20 freaky_entertainment

freaky_entertainment

    GMC Member

  • GMC Member
  • 457 posts

Posted 31 May 2006 - 02:35 PM

See ?! Remember when you told me that it's IMPOSSIBLE ?! And I told you that you'll find a way ... and all you continued saying that it's impossible ?! Ahahahahha ! Great Job, Dude ! :)
  • 0

Cxn8eVf.pnggVywn2c.pngckddPHm.png


#21 metaltailz

metaltailz

    GMC Member

  • New Member
  • 110 posts

Posted 31 May 2006 - 04:02 PM

Cool, I'm not sure what I would use it for but Cool!
  • 0

#22 AndrewWeb

AndrewWeb

    GMC Member

  • GMC Member
  • 100 posts

Posted 31 May 2006 - 06:16 PM

Very neat; I have been looking for something like this forever!

Just one question though: do you know how to just make the room transparent and not the objects?

Thanks, and keep up the good work!

<{POST_SNAPBACK}>



I was wondering the exact same thing
  • 0

#23 Porfirio

Porfirio

    GMC Member

  • GMC Member
  • 1209 posts

Posted 31 May 2006 - 07:39 PM

Very neat; I have been looking for something like this forever!

Just one question though: do you know how to just make the room transparent and not the objects?

Thanks, and keep up the good work!

<{POST_SNAPBACK}>



I was wondering the exact same thing

<{POST_SNAPBACK}>


Transparency is aplyed to window, not to objects

Sory but theres no way!
  • 0

#24 pythonpoole

pythonpoole

    Scorpion Software

  • New Member
  • 1894 posts

Posted 01 June 2006 - 02:02 AM

Yes unfortuneately you cannot simply make the background invisible and leave the objects visible in GM, the best you can do is make the background white like that simple pacman type game in the example.

Otherwise its still pretty good and seems to work flawlessly on all systems with a taskbar at the bottom.

Hope you all find a good use for it, I keep hearing about people needing a transparency dll, but I'm a little dissapointed this topic hasn't become as popular as I thought it might. It seems like there is always someone wanting transparency, and when its finally done and released it only a few users comment.
  • 0
- Ben

#25 twisted_games

twisted_games

    GMC Member

  • GMC Member
  • 730 posts
  • Version:GM:Studio

Posted 01 June 2006 - 02:15 AM

i like this. 9/10

but i think i have a way to fake "transparent room and not objects"

if i get this to work. ill tell you. and post an example.
  • 0

Email: justinhalek@gmail.com
For some free help with GMstudio.

If you need lots of help, I'm always for hire as a consultant.


#26 WMCD

WMCD

    Spritist

  • GMC Member
  • 1422 posts
  • Version:GM5

Posted 01 June 2006 - 02:24 AM

Very neat; I have been looking for something like this forever!

Just one question though: do you know how to just make the room transparent and not the objects?

Thanks, and keep up the good work!

<{POST_SNAPBACK}>



I was wondering the exact same thing

<{POST_SNAPBACK}>


Transparency is aplyed to window, not to objects

Sory but theres no way!

<{POST_SNAPBACK}>



I've actually played a desktop game (created with GM) before where there was a ball (not transparent at all) and a completely transparent room, and you could sling the ball around the desktop. Unfortunatly, I forgot where I found it. :)



Edit: Again, nice work!

Edited by Old School Gaming, 01 June 2006 - 02:25 AM.

  • 0

#27 tangibleLime

tangibleLime

    Lunatic

  • GMC Elder
  • 2520 posts
  • Version:GM:HTML5

Posted 01 June 2006 - 03:20 AM

I've seen that creation: the room wasn't transparent. The ball was the actual window. It used a skinning DLL to skin the window to the sprite of the ball.
  • 0
Posted ImagePosted Image

#28 Chirantha

Chirantha

    GMC Member

  • New Member
  • 502 posts

Posted 01 June 2006 - 04:16 AM

* Chirantha is in Shock ;) :D *

::lmao::

How? ::lmao:: has :D this :) been done? :o

*Chirantha Snap's out of the shock and starts to walk on the roof and remembers that he can't walk on the roof and falls down.*

*Chirantha checks his eyes and makes sure that the window is tranceparent*

WOW pyhonpoole :) , you really did the impossible!! Great Job 10/10!!! ;) :wub:
  • 0

#29 _Jaiden

_Jaiden

    STG

  • New Member
  • 596 posts

Posted 01 June 2006 - 06:05 AM

oh I was hoping I could be the first to post in the topic but oh well :)
Just a couple of minutes to early!
Anyway, this is really good 10/10
  • 0

#30 Kapser

Kapser

    GMC Member

  • GMC Member
  • 1645 posts

Posted 01 June 2006 - 03:48 PM

All i gotta say is this is cool!
  • 0

#31 Jack Meroc

Jack Meroc

    GMC Member

  • New Member
  • 264 posts

Posted 01 June 2006 - 04:29 PM

lol. This is nice! Just what I need1 :)
  • 0

#32 andydaman

andydaman

    GMC Member

  • New Member
  • 136 posts

Posted 01 June 2006 - 04:30 PM

Error defining an external function.

What do I do?
  • 0

#33 eagleclaw364

eagleclaw364

    GMC Member

  • New Member
  • 296 posts

Posted 01 June 2006 - 06:26 PM

andydaman: Unzip it?

This is an awesome creation. How did you make the window snap to the task bar though?

Once again, great work.

Edited by eagleclaw364, 01 June 2006 - 06:27 PM.

  • 0

#34 Porfirio

Porfirio

    GMC Member

  • GMC Member
  • 1209 posts

Posted 01 June 2006 - 06:36 PM

Error defining an external function.

What do I do?

<{POST_SNAPBACK}>

Mabe you are on windows98?

It wont work on it!!
  • 0

#35 zat

zat

    GMC Member

  • New Member
  • 33 posts

Posted 01 June 2006 - 07:19 PM

now this is cool. :) (even if it ran slow on my pc)
  • 0

#36 pythonpoole

pythonpoole

    Scorpion Software

  • New Member
  • 1894 posts

Posted 02 June 2006 - 01:47 AM

Yeah it is pretty cool I think, thanks. Don't forget to credit Porfirio, as this probably couldn't have been done without his generous help. I'm actually pretty lucky porfirio had the dll just lying around on his computer, all I did was ask if he could make one and 10 seconds later there is a msn transfer of it waiting for me to accept.

And yeah, you need windows 2000 or higher to see the transparency.


LOL @ Chirantha.
  • 0
- Ben

#37 coolsmile

coolsmile

    Programmer

  • New Member
  • 1346 posts

Posted 02 June 2006 - 06:10 PM

Sweet, at least it works, not perfect but it is still pretty cool :(
  • 0

#38 hughman

hughman

    GMC Member

  • GMC Member
  • 568 posts

Posted 02 June 2006 - 08:01 PM

very nice!!!!!
looks good.. have to find a good use..
  • 0

#39 pythonpoole

pythonpoole

    Scorpion Software

  • New Member
  • 1894 posts

Posted 03 June 2006 - 04:23 AM

Yeah, well I think its fairly useful.. whether its just to have your game transparent, or a skinned desktop widget that you can drag around the screen, its a fairly useful tool, and it can make something look a lot cooler :P.. Like if you get hit by an enemy... make the window flash in and out of transparency.. who knows, I can see many uses for this. Let me know if you make a game using this technique, I'd like to see :D
  • 0
- Ben

#40 _Jaiden

_Jaiden

    STG

  • New Member
  • 596 posts

Posted 04 June 2006 - 02:17 AM

maybe I'll make some sort of sidebar thing like in Windows Vista with this ::lmao::
  • 0

#41 GM_wizard

GM_wizard

    GMC Member

  • New Member
  • 215 posts

Posted 04 June 2006 - 01:50 PM

'taskbar edited due the privacy issues' lol

anyways great dll, could be pretty usefull for some abstract games/programs
I've never seen a program with a transparent window btw....
anyway very original idea ::lmao::
  • 0

#42 pythonpoole

pythonpoole

    Scorpion Software

  • New Member
  • 1894 posts

Posted 05 June 2006 - 10:12 AM

Well I'm glad I see some people have a use for it. I hear I_am_registered is making a vista sidebar imitation with it :D cool.

Thanks again for your feedback.
  • 0
- Ben

#43 _Jaiden

_Jaiden

    STG

  • New Member
  • 596 posts

Posted 07 June 2006 - 10:30 AM

yeah it's going well. Skinning functions and more.
  • 0

#44 Josh @ Dreamland

Josh @ Dreamland

    GMC Member

  • New Member
  • 455 posts
  • Version:GM8

Posted 07 June 2006 - 12:43 PM

AMAZING!! Great job.

One question, does it do an invisible color, too?

I know I'll be using this; invisible backgrounds look so much better than black ones.

Edited by Josh @ Dreamland, 07 June 2006 - 12:52 PM.

  • 0

#45 Alex

Alex

    3lite Member

  • New Member
  • 3098 posts

Posted 08 June 2006 - 06:49 AM

very good, now you just have to solve how to get multiple transparencies on the one window. :)
  • 0

#46 Tekken 5 Master

Tekken 5 Master

    GMC Member

  • New Member
  • 126 posts

Posted 08 June 2006 - 04:33 PM

A great example by pythonpoole

I was just waiting for someone to make one of these.

Edited by Tekken 5 Master, 08 June 2006 - 04:33 PM.

  • 0



#47 user350044

user350044

    GMC Member

  • GMC Member
  • 19 posts

Posted 13 June 2006 - 11:47 AM

A great example by pythonpoole

I was just waiting for someone to make one of these.

<{POST_SNAPBACK}>


I think Mark is going to add something like this in the next version.

On the "todo" page, under "Planned In Next Version", "add function to load sprites and backgrounds with an alpha channel".

http://www.gamemaker.nl/todo.html
  • 0

#48 pythonpoole

pythonpoole

    Scorpion Software

  • New Member
  • 1894 posts

Posted 13 June 2006 - 12:47 PM

user350044, thanks for the comment, but alpha channel sprites have absolutly nothing to do with a transparent GM window. As far as I know Mark never intends on putthing this feature into Game Maker. Alpha 32 bit sprites simply means for example you can have a shadow on a sprite that blends in with its surroundings allowing nicer visual designs and graphics in your games.

This transparency example shows how to make the entire game window see-thru for whatever reason as shown in the screenshots above.
  • 0
- Ben

#49 user350044

user350044

    GMC Member

  • GMC Member
  • 19 posts

Posted 13 June 2006 - 02:27 PM

user350044, thanks for the comment, but alpha channel sprites have absolutly nothing to do with a transparent GM window. As far as I know Mark never intends on putthing this feature into Game Maker. Alpha 32 bit sprites simply means for example you can have a shadow on a sprite that blends in with its surroundings allowing nicer visual designs and graphics in your games.

This transparency example shows how to make the entire game window see-thru for whatever reason as shown in the screenshots above.

<{POST_SNAPBACK}>


Ok. I was thinking that alpha channel on the backgrounds would let us change the transparency level of the background picture from fully visible to completely invisible, showing the end users desktop as the background.

Question? If this can be done using a external dll, couldn't Mark incorporated a dll into his software package?
  • 0

#50 duk_co2000

duk_co2000

    GMC Member

  • New Member
  • 386 posts

Posted 16 June 2006 - 02:20 PM

I get an error saying: "Error defining an external function". And I did not edit a thing at all. ??
  • 0