Two suggestions for Flash behavior

Forum Home Forum Home > Construct 2 General > Construct 2 general
 Post Reply Post Reply
Author
2,369 Rep
Post Options Post Options   Quote Brashmonkey Quote  Post ReplyReply Direct Link To This Post Topic: Two suggestions for Flash behavior
    Posted: 25 Apr 2012 at 8:16pm
Hi Constructoids,

I think the following two conditions would make the Flash Behavior super-awesome:

1) Is flashing
2) Has flashing finished

Presumably, the runtime already knows this info, but we construct programmers can't check these conditions. Then we wouldn't need to use multiple additional events to count down a variable to keep track of when the player is no longer invulnerable etc.

Lastly,
I and many others would LOVE it if we could choose to flash either to invisible OR just a solid color... just by using the sprites current alpha channel and replacing all color data with a specified color.

Pretty please...... :)
Back to Top

Scirra Developer
84,469 Rep
Post Options Post Options   Quote Ashley Quote  Post ReplyReply Direct Link To This Post Posted: 25 Apr 2012 at 8:57pm
Added first two to todo list... but flashing a solid color isn't really supported by the 2D canvas (although WebGL can do it). So that one will be longer coming, but you can work around by using an animation.
Back to Top
2,369 Rep
Post Options Post Options   Quote Brashmonkey Quote  Post ReplyReply Direct Link To This Post Posted: 25 Apr 2012 at 9:06pm
Hi Ashley,

Thank you so much! This will really make temporary invunerability super easy to handle, less wasted events and variables. You rock!

for a fully animated platformer or fighting game player it would be a massive waste of vram and file space to have flashing versions of every animation etc...AH HA! How about flashing between two render modes! Like you can designate: appearance 1 and appearance 2 instead of just "visible" and "not", and each appearance could be set to either invisible or any of the current rendering modes (ink effects)

That would be incredible!

Back to Top
9,371 Rep
Post Options Post Options   Quote Tokinsom Quote  Post ReplyReply Direct Link To This Post Posted: 25 Apr 2012 at 10:43pm
Originally posted by Brashmonkey Brashmonkey wrote:

for a fully animated platformer or fighting game player it would be a massive waste of vram and file space to have flashing versions of every animation etc...AH HA! How about flashing between two render modes! Like you can designate: appearance 1 and appearance 2 instead of just "visible" and "not", and each appearance could be set to either invisible or any of the current rendering modes (ink effects)

That would be incredible!



That is entirely unnecessary O_o; Invincibility frames are as simple as..

+Player gets hit
+Player.Hurt = 0
-Set Player.Hurt to 1
-Flash Player

+Player.Hurt > 0
-Add 60*dt to Player.Hurt

+Player.Hurt > 60
-Set Player.Hurt to 0
-Stop Flashing

And to "flash" a shader effect you can toggle a boolean value while Player.Hurt > 0 that activates / deactivates the effect(s).

Edited by Tokinsom - 25 Apr 2012 at 10:47pm
Back to Top
2,369 Rep
Post Options Post Options   Quote Brashmonkey Quote  Post ReplyReply Direct Link To This Post Posted: 26 Apr 2012 at 2:42pm
@Tokinsom,

The discussion about using frames of animation for flahing was specifically for solid color flashing, and NOT invisibility flashing.

The whole point of behaviors is to reduce the need for events. The whole point of Construct is to reduce production time and let people spend more time and energy being creative with the least programming grunt work.

I'm glad Ashley is making the already useful Flash behavior drastically more useful. Saving our time and effort so we can make better games faster ad with less events is never "entirely unnecessary"...in the same way that Construct is not "unnecessary" because we have C,Java, Action Script, Basic etc.
Back to Top
4,773 Rep
Post Options Post Options   Quote PixelPalette Quote  Post ReplyReply Direct Link To This Post Posted: 26 Apr 2012 at 5:08pm
Been waiting for that white flash effect as well. This is a chore to do and waste of frames to just have a faked version. We have webgl now, so i hope this gets added in the near future.
Back to Top
9,371 Rep
Post Options Post Options   Quote Tokinsom Quote  Post ReplyReply Direct Link To This Post Posted: 26 Apr 2012 at 6:53pm
Originally posted by Brashmonkey Brashmonkey wrote:

@Tokinsom,

The discussion about using frames of animation for flahing was specifically for solid color flashing, and NOT invisibility flashing.

The whole point of behaviors is to reduce the need for events. The whole point of Construct is to reduce production time and let people spend more time and energy being creative with the least programming grunt work.

I'm glad Ashley is making the already useful Flash behavior drastically more useful. Saving our time and effort so we can make better games faster ad with less events is never "entirely unnecessary"...in the same way that Construct is not "unnecessary" because we have C,Java, Action Script, Basic etc.


I know. I'm just saying that using extra solid-color frames is completely unnecessary as you will be able to do that with shaders and toggling a boolean variable. You also mentioned invincibility frames being difficult w/o the requested Flash Behavior features so I thought I'd chime in on that as well. Maybe I misunderstood what you said, if that's so then sorry.

Edited by Tokinsom - 26 Apr 2012 at 6:54pm
Back to Top
2,369 Rep
Post Options Post Options   Quote Brashmonkey Quote  Post ReplyReply Direct Link To This Post Posted: 26 Apr 2012 at 7:45pm
Yeah, I wasn't saying any of this was difficult to do with events (invulnerable while flashing)...I've done it countless times in several authoring systems. BUT, with the addition of "is flashing" , it will require far fewer events AND one less variable to get the job done. And sense getting the job done as quickly and as easily as possible is the point of Behaviors, thats why I requested it.

Adding the ability to set the alternate "appearances" of the flash to diferent blitting modes would allow for greater variety and usefulness of the flash behavior, while keeping it still super simple to use.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down