I understand but I am refreshing the surface manually and every step the surface is drawn from complete zero. So I imitate GM onscreen drawing. I suspect (unsure) that the problem is in GM blending mode.
1 - If I simply draw an opaque black background and then a semi-transparent white spot on top, GM blends them, right?
2 - If I draw the opaque black background and then the semi-transparent white spot on top into a surface, at drawing onscreen, this should look exactly like in (1), shouldn't it? As long as GM refreshes the screen and I am drawing anew. Am I missing anything?
- Game Maker Community
- → Viewing Profile: Posts: mireazma
mireazma
Member Since 13 Mar 2006Offline Last Active Feb 05 2013 08:37 AM
Community Stats
- Group GMC Member
- Active Posts 282
- Profile Views 1379
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
1
none
Posts I've Made
In Topic: GM onscreen display?
30 January 2013 - 05:37 PM
In Topic: Help with this code.
29 January 2013 - 02:43 PM
Well, you put that code into a script called "random_color" and call it like this:
About matching colors, you have to think numbers, not colors so have 3 vars red, green, blue; i.e if you input a RED value that matches "red" have GM do the thing. That's pretty obvious but still...; and if you want to do something based on how close you are to the color you can use
draw_sprite_ext(sprite_index, image_index, x, y, image_angle, random_color(), alpha);
About matching colors, you have to think numbers, not colors so have 3 vars red, green, blue; i.e if you input a RED value that matches "red" have GM do the thing. That's pretty obvious but still...; and if you want to do something based on how close you are to the color you can use
if(abs(argument0 - red) + abs(argument1 - green) + abs(argument2 - blue) < argument3) return 1; else return 0;in the script, after the code you got; you'd pass in the RED, GREEN, BLUE and threshold and return either the color to draw the sprite or, the "go" for doing something externally.
In Topic: Display collision mask
26 January 2013 - 05:02 PM
Does it happen when you rotate the instance?
In Topic: Pathing question
26 January 2013 - 04:58 PM
Is the path regularly shaped? Not that I could help but it worth mentioning.
In Topic: Create Event Not Initializing?
26 January 2013 - 04:55 PM
I can't describe the frustration I had once with a similar issue. It took me several days until I knocked it down. I don't say it's your case too but it might be. I don't know about Studio but the legacy GM seem not to have a consistent order of creating objects (or at least so I took it). Merely creating instances in an express, obvious order has solved it. Until then I was residing on instances id -- bad way.
- Game Maker Community
- → Viewing Profile: Posts: mireazma
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content