Jump to content


ramses12

Member Since 17 Apr 2009
Offline Last Active Yesterday, 06:25 AM

Topics I've Started

Invert alpha on surface

30 October 2012 - 08:22 AM

This is one ridiculously simple question for me to solve, however I haven't yet figured it out.
The problem is an ordinary blend mode equation, and it looks like my math skills suddenly disappeared. So, what's the solution for inverting the alpha on a surface while not ignoring RGB data? Basically I need a blending mode like:
(Rd, Gd, Bd, 1–Ad)
Obviously, I can inv_dest_alpha to invert all 4 channels, but then I still need to invert colors without modifying the alpha.
I know I can sprite_set_alpha_from_sprite, but that's something I'd like to avoid at the moment.
Any ideas?

Staff stuff

22 September 2012 - 09:23 AM

Looks like the request in this topic has been fulfilled, and that all former local moderators have now become global moderators. Congratulations for all of you!

[SOLVED] BUG in "if there is an object " ?

26 August 2012 - 12:07 PM

Out of curiosity, you didn't set the precise collision checking for the bomb sprite, have you? Even if you have, it's surely not a bug, but something you're doing wrong.
Welcome to GMC.

D&D to GML

25 August 2012 - 08:57 AM

I
What's the first thing that the Game Maker newcomer does when she or he installs Game Maker? Tries to make a game. How do they do it? Probably D&D. How long do they use D&D? Let's say a few days or weeks. Perhaps a month if the user is reluctant to learn something new, or hesitates to jump into something that looks much harder. Then, they decide to try using code, perhaps by mixing D&D actions with code boxes, usually using these code boxes for things that are impossible to accomplish in D&D, or for code instructions given by members of the community (or other sources). Anyway, the point is that at some point, the user will eventually decide to switch to GML. This is where topics like this one come in handy (or the manual), although the change usually happens slowly, since the user is unsure how exactly to write a code that will result in exactly the same thing as the D&D tree he already has.

II
It happens a lot to me (and probably all other people) to find a question asking about a problem in some file. After all, that's part of how the Q&A forum normally works. I download the file, open it, and find out that the object that the newbie is having trouble with has a massive amount of D&D actions. Needless to say, reading a huge action list is 8 times harder than reading a code that would do the same thing (or at least that happens for me).

So, what I'm suggesting is an automated system that would convert all actions in an event into the corresponding code. Reversible or not, that would be a useful tool for both newbies who want to learn GML (what could possibly be better than having the actions and viewing their correspondent code in one second?), and for the helpers who don't like, know or enjoy reading D&D columns of actions for solving one simple problem. I guess it shouldn't be too hard to program, as there are just a few actions, and the translated code wouldn't really be too complicated. Just take the action arguments and covert them into function parameters, add a with(...) if the action applies to something else than "self" (not using with(self) in front of everything, that's a terrible coding habit), and copy-pasting the already present code boxes into the concatenated code. What could possibly go wrong?

Sorry if this has been suggested before.
-Ramses

Which forum theme do you use?

15 August 2012 - 10:53 AM

Starting note: Probably there has already been a similar thread, which I failed to notice in the past, so I won't have a problem if you'll start flaming me for that.
Just out of curiosity, which side of the Force do you use? :P
I personally browse GMC in "Jedi mode", because the dark screen blinds me and I was already too familiar with the old forum theme when it changed.