• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

[SOLVED] Can I create a game window with a custom shape?

P

puppo

Guest
I would like to make a game where the window is in the shape of an octagon. I created the PNG background with transparency at the corners of the square to get an octagon. But when the game starts the corners of the square appear gray, because in the Background Tab of Room Properties there is no way to set "transparent" as background color.

Is there another way to get this transparency?

My GameMaker version is 8.1, but I noticed that even in GameMaker Studio 1.4 Room Properties there is no way to set a transparent background color.

Thanks in advance!
 

RangerX

Member
But what are you trying to achieve? You want the game to be an octagon but in a rectangle window right? And with the unused space being black?
 
M

Monsi

Guest
Game maker does not come with such functionality built in. The closest thing would be "borderless window" mode, which removes the standard windows frame around your game.

However, there's this extension, that allows areas of the window to be transparent (which would mean you could fake the edges of an octagon cut out). Unfortunately this is only available for GM2, which is probably quite a big leap from GM8.
 
P

puppo

Guest
But what are you trying to achieve? You want the game to be an octagon but in a rectangle window right? And with the unused space being black?
I just wanted to know if unused black space can be made transparent...;)

Game maker does not come with such functionality built in. The closest thing would be "borderless window" mode, which removes the standard windows frame around your game.

However, there's this extension, that allows areas of the window to be transparent (which would mean you could fake the edges of an octagon cut out). Unfortunately this is only available for GM2, which is probably quite a big leap from GM8.
Thanks Monsi, the Window Manipulation DLL extension looks just what I'm looking for, but at the moment I do not have GameMaker Studio 2 yet... :( maybe in the future! :)

Ok, after several searches I found the solution to the problem. A DLL called Gm6 Window Skinning, created by GearGOD in the far year 2005! And it works fine with GameMaker 8.1. This is the link to the old YoyoGames forum page: http://gmc.yoyogames.com/index.php?showtopic=105012. The last mirror link on page 2 is still online. The archive contains the DLL, a *.gm6 example file, and a *.bmp file, which is the mask to get transparency for the game window of the example, so it is a hexagon and not a rectangle. The usage is simple: just copy the GearGOD codes from the example, and create your own BMP mask... and you can get all the desired window shapes!!! :):):)

I do not know if this DLL works with GameMaker Studio 1.4... :rolleyes:

Bye!
 
Last edited by a moderator:
Top