thomasmahler's Recent Forum Activity

  • 52) This is a pretty important one:

    More Fullscreen Options. Right now, if I set the layout to be 720p and my monitor doesn't natively support that resolution, Construct just resizes and stretches the whole screen with complete disregard for the aspect ratio - which makes the game look much less flattering in fullscreen mode.

    Also, I think I caught a bug with fullscreen: With a color overlay that has a layer effect applied to it and the canvas object on top of everything that has a the sharpen shader applied to it, if I go to fullscreen, the screen fills up with artifacts.

    And one problem I always had is still pretty annoying: If I start the runtime, go to fullscreen and quit the game, the IDE crashes.

    In general, that stuff should really get looked into - being able to switch to fullscreen without any hick-ups is really important and being able to retain the aspect ratio of the project is also vital.

  • They all look fairly easy to convert into shaders.

    Go right ahead!

  • Neat! Now Elvis can rest in peace.

    Can anyone look into that scratched film shader? That'd be a nice one to have, Henry told me that it's a bit more complex and involves textures, so can we still use that one in Construct?

    I have no idea what the effect looks like, but it'd be neat to explore. I think David once created something like that using events, but if we can have a simple inheritance layer on top of our layouts and use a canvas object with an fx shader, it'd be super easy to use.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Okay, so here's the Photoshop version of Sharpen:

    // Sharpen
    // Elvis Presley
    // PS 2.0
    // A simple Sharpen Shader.
    
    //#BORDER-MODE : prevent pixel influence from outside box area.
    
    // Foreground texture
    texture ForegroundTexture;
    
    // Foreground sampler
    sampler2D foreground = sampler_state {
        Texture = (ForegroundTexture);
        MinFilter = Linear;
        MagFilter = Linear;
        MipFilter = Linear;
    };
    
    float pixelWidth;
    float pixelHeight;
    
    // Effect function
    float4 EffectProcess( float2 Tex : TEXCOORD0 ) : COLOR0
    {
    	// Strength should be from 0.0 to 1.0
    	float strength = 0.1;
    	float4 color;
    
    	color = 9.0 * tex2D( foreground, Tex.xy);
    	color -= tex2D( foreground, Tex.xy + float2(pixelWidth, pixelHeight));
    	color -= tex2D( foreground, Tex.xy + float2(0.0, pixelHeight));
    	color -= tex2D( foreground, Tex.xy + float2(-pixelWidth, pixelHeight));
    	color -= tex2D( foreground, Tex.xy + float2(-pixelWidth, 0));
    
    	color -= tex2D( foreground, Tex.xy + float2(-pixelWidth, -pixelHeight));
    	color -= tex2D( foreground, Tex.xy + float2(0, -pixelHeight));
    	color -= tex2D( foreground, Tex.xy + float2(pixelWidth, -pixelHeight));
    	color -= tex2D( foreground, Tex.xy + float2(pixelWidth, 0));
    	color = color * strength + (1.0 - strength) * tex2D( foreground, Tex.xy);
    	color.a = 1.0;
    
    	return color;
    }
    
    // ConstructEffect
    technique ConstructEffect
    {
        pass p0
        {
            VertexShader = null;
            PixelShader = compile ps_2_0 EffectProcess();
        }
    }[/code:qyrrf7dn]
    
    You can set the strengh in there. I set it to 0.1, so that the rendered image looks identical to my concept in Photoshop - you can set it to whatever you want 
    
    Thanks to my buddy Henry Korol for this 
    
    Can we implement this in the next Construct version? Having a sharpen filter is definitely useful
  • Okay, a programmer buddy of mine helped me with this one:

    // Sharpen
    // Bozo Bajozo
    // PS 2.0
    // A simple Sharpen Shader.
    
    //#BORDER-MODE : prevent pixel influence from outside box area.
    
    // Foreground texture
    texture ForegroundTexture;
    
    // Foreground sampler
    sampler2D foreground = sampler_state {
        Texture = (ForegroundTexture);
        MinFilter = Linear;
        MagFilter = Linear;
        MipFilter = Linear;
    };
    
    float pixelWidth;
    float pixelHeight;
    
    // Effect function
    float4 EffectProcess( float2 Tex : TEXCOORD0 ) : COLOR0
    {
    	float strength = 10;
    	float4 Color;
    
    	Color = tex2D( foreground, Tex.xy);
    	Color -= tex2D( foreground, Tex.xy+0.0001)*strength;
    	Color += tex2D( foreground, Tex.xy-0.0001)*strength;
    	
    	Color.a = 1.0;
    
    	return Color;
    }
    
    // ConstructEffect
    technique ConstructEffect
    {
        pass p0
        {
            VertexShader = null;
            PixelShader = compile ps_2_0 EffectProcess();
        }
    }[/code:1om0gxb2]
    
    You can set the strength using the strength value in there.
    
    The problem is that the effect is a different one that Photoshop uses. It makes everything looks kinda embossy, which isn't really what I want.
  • Alrighty, just a quick question for the devs. I'd love to have a 'sharpen' effect, so that what I'm concepting in Photoshop and the game actually match up 100%.

    So I googled around and found this:

    http://www.coniserver.net/wiki/index.php/Shaders

    Seems like there are a bunch of .fx shaders on there - can we reuse that stuff in Construct? I looked into the sharpen.fx file and compared it to the .fx files in Construct and they do seem pretty similar in terms of code, but I have no idea whether they can be made compatible and if so, how.

  • It's a bug and it's already been reported.

  • Gee.

    Dan Brown called. He wants his novel back.

  • That works beautifully, thanks Ash!

    And now that we've got that:

    51) A 'Sharpen' Effect

    Just like what Photoshop does when you do a Filter - Sharpen.

    And it'd be cool if we could control the strength of it!

    To everyone:

    The canvas object can basically be used like an adjustment layer. You just create a layer on top of the layers that you want to use it on and set the canvas object to fill up the whole screen. Then, you can set the layer to be an inheritance layer and can inherit the exact same settings on another layer in any other layout.

    Man, Construct _is_ fucking powerful.

  • Alternatively, it may suffer from the free=bad mentality :<

    Don't think so, the quality that'll be created using Construct will kick other developers asses and once a bigger commercial project is out and the Construct hype starts rolling, that won't be an issue. Free isn't bad anymore if the thing that's free can actually generate a lot of money.

    I'm much more concerned about the free = developers don't make any money = can't keep up development issue.

  • Layer Effects only work on... well, layers. I don't want a seperate effect for each and every layer - I want an effect that's being rendered over the whole layout. Being specific, I want to add a 'sharpen' pass on top of everything.

  • 50) Add Post Processing Filters 'on top'.

    That'd be a cool thing to have. Like, during compositing, it's often helpful to add that last effect to your composition to give it that last little edge - like, a sharpen filter on top of everything to make the details come out.

    It'd be cool if we could have a layer that's put on top of the whole render and is being applied to everything in the scene during runtime. We'd still have to be able to specify where the post processing effects are active and where they should be inactive (like, you wouldn't need them in menus and stuff), but that'd be a great addition.

    51) Add 'Opacity' to the Sine Behavior. The Sine Behavior fucking rocks, it can really add a shit load of believability to assets that aren't even animated. But it'd be cool if we could also affect the opacity of sprites with the sine.

thomasmahler's avatar

thomasmahler

Member since 28 Jan, 2009

None one is following thomasmahler yet!

Trophy Case

  • 15-Year Club
  • Email Verified

Progress

16/44
How to earn trophies