Information

Author:
    Majatek
Rating:
    N/A
(1 more votes required)
Type:
    Example
Language:
    GM 6
Reviews:
    None
Submitted:
    June 19, 2008
Dev - DB/form (refering to updated - check code)
Download:
    DOWNLOAD (636)
Dev - make AJAX
Screenshots (1)
Dev - Also, on form submission, use GD to resize the image as a new thumbnail file
Dev - In the submission form, you can now upload a banner image
Transparent Surface
This example shows how to make a surface with transparencie, to allow multiple drawing layers on a single surface while allowing it to show the background/objects-with-sprites behind that surface.

This might become usefull for a worms-style destructable terrain engine (I am working on it), and I will post the latest version thereafter.

Use the following controlls to operate the example:

left Mouse Button: draw road
Enter : Rest surfaces

Give credit when used. It took me a long time to write.. =>


Target platforms:



This game needs 1 more vote to be considered for the front page!
Help out the community and rate this game!
Reminds me of the generally game editor, nice stuff.
Posted by marbs June 19, 2008 10:40 - 9.4 years ago
| [#1]

So you make the surface a negative color by subtracting white from black?
Or is black automatically transparent in surfaces?

In the script you have it set up only for surfaces that are the size of the room but they start at 0,0 on the screen instead of 0,0 in the room meaning you're putting a bunch of extra space on those rectangles.
Posted by Zac1790 June 19, 2008 12:01 - 9.4 years ago
| [#2]

Nicely programmed, looks great. Can't think of anything I would use this for but still good.
Posted by Mat June 19, 2008 14:17 - 9.4 years ago
| [#3]

I love the way Mark just creates little things like this in Game Maker and doesn't bother documenting it.
Posted by Juju June 19, 2008 15:53 - 9.4 years ago
| [#4]

@ marbs:
Yeah - I had that in mind :)

@Zac1790:
By subtracting white from something, you are making it transparent.

@Mat:
Worms style destructable terrain?

@Juju:
...and he said proffessional 3d games cannot be done in game either, the fool... :D

NO VOTES? Meh, ohwell... :\
Posted by Majatek June 19, 2008 22:50 - 9.3 years ago
| [#5]

OK you taught me something new :)
Posted by Zac1790 June 20, 2008 16:10 - 9.3 years ago
| [#6]

I've found that trying to subtract any colour from a surface makes it transparent... maybe it's just my computer, but it's very anoying T_T
Posted by noshenim June 21, 2008 19:07 - 9.3 years ago
| [#7]

I am a little confused about you saying it took so much work for the script:

draw_set_blend_mode(bm_subtract);
draw_rectangle(0,0,width,height,0);

All beyond that is, frankly, garbage. Particularly the...
Posted by Melancor August 24, 2008 20:49 - 9.2 years ago
| [#8]

Recent Activity
 
Active Users (0)