Somebody's Forum Posts

  • Now that's some quality stuff right there. I wish the launch countdown was shorter, though.

    Otherwise an awesome low key graphical style and challenging gameplay.

  • Hi, shaderheads!

    I have been learning my way around shaders, but all this premultiplied alpha business is still going over my head.

    Here's what I want to do - make an "inline" effect - base the brightness of a given pixel on the inverse alpha value of nearby pixels. My code looks like this at the moment:

    /////////////////////////////////////////////////////////
    // Selection inline effect
    //
    varying mediump vec2 vTex;
    uniform lowp sampler2D samplerFront;
    
    precision lowp float;
    uniform lowp float pixelWidth;
    uniform lowp float pixelHeight;
    
    void main(void)
    {
    	lowp vec4 front = texture2D(samplerFront, vTex);
    	
        float A = 1.0 - texture2D(samplerFront, vTex + vec2(0, pixelHeight)).a;
    	float B = 1.0 - texture2D(samplerFront, vTex + vec2(0, -pixelHeight)).a;
    	float C = 1.0 - texture2D(samplerFront, vTex + vec2(pixelWidth, 0)).a;
    	float D = 1.0 - texture2D(samplerFront, vTex + vec2(-pixelWidth, 0)).a;
    	
        float M = clamp(A+B+C+D,0.0,1.0);
    
    	front.rgb = vec3(M,M,M);
        
    	gl_FragColor = front;
    }[/code:a5lwjud4]
    
    But the values don't work out the way one might expect. What needs to be done so we basically keep the same alpha of the original image AND change the pixel colors?
  • Ah ah, add some bouncing metal letters and you're ready for some serious 90's Atari ST demoscene!

    Surely you mean Twisting letters?

    Added to the repo and first post.

    I love the scroll most of them all!

    It's rather neat™ indeed Thanks!

  • Also, since so far it looks like the effect is static - it would be a VERY good idea to do it without shaders as they tend to eat a decent chunk of performance (also possible compatibility problems as we can see here).

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Depending on how resource intensive your scene is - the easiest way is to make that one dot you have rotating spawn other dots - frequency depends on movement speed.

  • We will streamline this process in future versions, and there is a detailed tutorial on how to use the C2 plugin linked in my signature.

    Hi, lucid! Any, even foggy, idea when that might happen? Guess you are still polishing that reference implementation, but I cannot wait to be able to just drag, drop and forget (any setup for) a Spriter animation into C2

  • Somebody Fantastic! Hail to the shader king! Grabbing this right now : )

    Aw, far from it, but I made another one - it's not quite what I had in mind (will try to make a proportional version), but it's kinda... special... (EPILEPSY WARNING) (this demo uses three of my shaders - Adjust HSB for color cycling, Scroll for the seamless ship movement and RotoScale for the madness):

    https://dl.dropboxusercontent.com/u/132 ... index.html

    The beast is called RotoScale and it can be found in the repo. It actually wasn't meant to be in any way similarish to R0J0's neat Mode7, but if the screen is non-square it just happens. Without the rotation it has a decent amount of interesting uses as well. Enjoy!

  • Your target platform probably doesn't support WebGL effects.

  • I think you are hardly "stuck" with C2 if C3 is like 2 years away - just use what works, finish the game, make a sequel/another game with C3 (if it's out by then).

  • volkiller730 , PixelRebirth - thanks, glad you like them.

    EDIT: Should you have the time to do it, a "time" parameter would be super convenient for the seamless effect, so we don't have to modify a variable every tick to generate endless lopping objects like waterfalls or rain textures. (A "sine" parameter could help as well, to make objects like the one you show in your example.)

    Ok, here we go - Scroll (looks a bit bad in the gif + C2 resize isn't that great with alpha on the sides, but you get the idea - each layer and the "waterfalls" have this effect applied):

    Since I like to keep the math inside the shader at a minimum you have a simple value - amount of time in seconds it takes to scroll the whole width or height of the texture. It accepts negative values to change the direction of the scrolling and 0 means it stays still.

    Added to the distro and first post.

    This is officially my favorite thread on this entire site.

    Oh, oh, how do I ever live up to that now? Thanks!

    I think we all know why, the nerve of these guys is something else

  • Sounds like a useful thing as long as it's constantly updated and accessible.

  • You can still download it. I believe the dropdown lets you save. It's not a big deal at all. :/

    Also, I have yet to see this message. I don't think it affects all users. Strange.

    Not always - sometimes you can just click the side panel and pick save, but sometimes it's just bent on discarding. In this case you have to go to download location and remake the word temp file to an. Exe

  • Well, your character is obviously stylised so then stylised enemies make perfect sense. For that they are will creepy and should work just fine, if nicely animated. Ft

  • zenox98 - I got this as well, on Chrome, so either someone has tagged a file or it does trigger some built-in checking mechanism.