thomasmahler's Forum Posts

  • You mean, you want the beast to jump at the player once it's like 10 steps in front of him?

    I guess you could give your character an image point and set up an event like: If beast overlaps image point = jump.

    Wild guess, that is

  • No, that's what the canvas object does. I only assign it to the topmost layer so it affects every layer underneath it.

    A canvas object is an object like the sprite object - just create it, you'll see what it'll do. You only need 1 canvas object and assign the effect you want to it - that's all there is to it. That way, you can even emulate adjustment layers or quickly change the mood of layouts and stuff, it's a pretty great way of working. So you could have 2 different mood sets that are only based on effects and they'd still only count as one in terms of vram.

  • Hmm, it'd be interesting to figure something like that out. Like, what if a character walks over a a bridge and you want to see the bridges and the characters reflection in the water below, maybe with a ripple effect or whatever?

    I think you could do this with an instance... someone would have to give it a try

  • We need a way to apply effects to the whole screen. 3D games use a big quad that samples a buffer where everything's been stored so far. Layers cannot sample other layers in Construct. Would using Canvas work?

    That's exactly what I do. Create a canvas object and put it into the topmost layer. Then apply the effect to the canvas object. So you really only ever have to set the effect once.

    DevS: It'd be cool if we could copy / paste a whole layer with its settings from one layout to another.

    If you want the effect on other layouts as well, you just create a layer on top of everything and set it to be an inheritance layer that references the canvas layer from the other layout.

    The interesting part is that we can even use this stuff for gameplay effects. Like, you can even flip the screen (including inverted controls), invert everything, use warp effects and stuff like that.

    Also, because the post processing then happens on an object and isn't just something that's being done internally, you can use it in events, which is pretty awesome. Imagine your character is drunk or drugged and to heighten the difficulty, you could start warping the screen, etc.

  • Tom, if you've got a couple of film grain textures I could have a shot at making a film grain effect. I'm useless with art though. I guess you'd need a bunch of black-and-white textures that have just the film grain pattern on them, then I could use that with an effect to process the background, and switch randomly between the textures to give the effect of frames going by.

    Funny thing is I completed 'Ico' a couple of days ago and figured out today that once you play through it, you get a couple of post processing effects to play around with.

    I think the old film / grain effect works through a couple of layers. You have the grain itself, which just animates randomly (David had something like this set through a simple event in an older cap). Then, you have a couple of burns and stuff - means: black blotches and burnmarks that you barely notice, cause the film runs at 24fps. You do see them, but they're quickly gone again. And then you also see a few light stripes 'walking' from left to right sometimes. I have no idea how they're generated, but my wild guess is that that's just light shining through the roll of film. And then the film also sometimes loses its sharpness - I guess that's because the filmroll is probably moving around slightly while being played - but that's a wild guess again.

    Also, there's vignetting, which means that the sides of the screen gradually become darker and darker.

    Valve has put up a bit of info on what they did for Left 4 Dead on their blog:

    http://www.l4d.com/blog/post.php?id=1962

    Interesting stuff.

    I'll try to come up with a Photoshop composition that has those layers in one simple .psd, so you could play around with it. Another thing that'd certainly help to get this old'ish look would be if we could affect the opacity of a sprite through the sine behavior - So we could let things flicker and fade in / out, etc. randomly.

    Also, have you looked at the fx file they provided on that site? Maybe that effects looks cool enough already?

  • Look, it's really just about semantics here...

    The fact is: If you're not a programmer and you take the time to learn the application, you can create games that are on par with what a programmer with a ton of programming experience can do.

    And that's a wonderful thing.

    I have never been able to grasp any programming language, I _SUCK_ even at simple math, yet every programmer I've shown my project to loves what I'm doing using Construct.

    Let's not argue about semantics, let's just be productive, let us create.

  • 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.

  • 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.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • 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.