• 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!
  • Hello [name]! Thanks for joining the GMC. Before making any posts in the Tech Support forum, can we suggest you read the forum rules? These are simple guidelines that we ask you to follow so that you can get the best help possible for your issue.

Question - IDE image_alpha screen issue - GMS2

C

Crepe

Guest
When I change the image_alpha of my sprite (plugged into a draw_sprite function) from 0.5 to 1, the game's graphics seems to get slightly darker.

Anyone know what's going on?
 
Post the code (plus the code either side of it) - perhaps you are affecting the rest of the games alpha somehow. Changing the alpha from 0.5 (slightly transparent) to 1, would make everything solid, and probably give the darkening effect.

Are you using the with() function - if you use it incorrectly, you can end up altering all off your sprites, not just the one you want.

You also might want to post screen shots showing before and after the screen darkening happens if possible.
 
C

Crepe

Guest
Haven't used the with statement yet. I took some screen shots, but there wasn't a difference. Must be a hardware issue.

Draw Event
Code:
draw_sprite_ext(sprite_index,image_index,x,y,1,1,0,c_white,image_alpha);
The image_alpha changes in the Create Event, Step Event, and a Collision Event.
 
Can't see any problem there. Should only affect the sprite attached to the instance.

Obviously, you might want to test on another machine if possible to check if its the hardware.
 

FrostyCat

Redemption Seeker
Do you have any calls to draw_set_alpha()? If you do, you must set it back to 1 after drawing partial-alpha content, or the setting will carry over to other places where you do want things to stay opaque (particularly backgrounds and tiles).
 
C

Crepe

Guest
Do you have any calls to draw_set_alpha()? If you do, you must set it back to 1 after drawing partial-alpha content, or the setting will carry over to other places where you do want things to stay opaque (particularly backgrounds and tiles).
No, but I was aware of that. I'm pretty familiar with GML, but not so much with GameMaker Studio (I worked primarily with GM7 back in the day). I'm thinking the issue is a weird quirk that might be related to specific hardware, or perhaps an obscure graphical setting. I'll definitely be interested to see what happens on a separate machine.

Anyway, thanks for your help guys!
 
Top