UberLou's Recent Forum Activity

  • This file was created in 99.2. The black box sprite has bone movement behavior that connects the other 2 sprites. There is a looping animation on the bones. All the sprites are in a container. The black box is set to destroy on the start of the layout. When you left click the mouse, the black box is spawned at the mouse position.

    Bugs:

    1) The black box is not destroyed when the layout starts. The sprites in the container should be destroyed too.

    2) No animation plays

    3) Left clicking the mouse only creates the black box and not the other sprites in the container.

    4) The ScaleObjects event sheet is not used, but there is a crash when i try to delete it.

    5) Turning off "destroy object on start of layout" (on the black box) has no effect

    Going to submit this to the tracker, but wanted to get some eyes on it first in case i'm missing something or doing something wrong.

  • Linkman: I tried your code, but it seems to ignore the alpha, so I get a white square instead of a white silhouette

    Ashley: Thanks for the workaround. Slightley annoying to have to change the filter color every time, but it works. I'll use this for now but still looking for help on this shader. I'm trying to learn to write simple shaders so seeing the solution would also be benificial.

  • I'm trying to make a shader to simply fill a sprite with white to duplicate an effect in older games where a sprite flashes when hit with a bullet. Seems like it should be easy, but since I have no idea what I'm doing I'm having a tough time figuring it out. I've modified the Black & White shader to try and get the effect but its not quite there:

    // Foreground texture
    texture ForegroundTexture;
    
    // Foreground sampler
    sampler2D foreground = sampler_state {
        Texture = (ForegroundTexture);
    
    };
    
    float4 EffectProcess( float2 Tex : TEXCOORD0 ) : COLOR0
    {
        float4 front = tex2D(foreground, Tex.xy);
        front.rgb = (front.r + front.g + front.b) * 64;
        return front;
    }
    
    // ConstructEffect
    technique ConstructEffect
    {
        pass p0
        {
            VertexShader = null;
            PixelShader = compile ps_2_0 EffectProcess();
        }
    }
    [/code:i3f5mved]  
    
    Appreciate any help!
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I've modified the Drop Shadow fx file so that you can change the distance and blur of the shadow. It gives text a nice look if you set all the paramaters to 1.

    right click and save as to download: http://www.louisferina.com/games/Dropshadow2.fx

    The code is also below in case you just want to copy and paste it into your own fx file.

    // Dropshadow 2
    // David Clark (edited by Louis Ferina)
    // PS 2.0
    
    //#CROSS-SAMPLING : reads pixels it may be writing.
    //#BORDER-MODE : samples pixels outside bounding box
    //#PARAM float offsetX 2.0 : X Offset: X offset of dropshadow.
    //#PARAM float offsetY 2.0 : Y Offset: Y offset of dropshadow.
    //#PARAM float blur 5.0 : Blur : Blur amount of dropshadow.
    
    // Foreground texture
    texture ForegroundTexture;
    
    // Foreground sampler
    sampler2D foreground = sampler_state {
        Texture = (ForegroundTexture);
        MinFilter = Point;
        MagFilter = Point;
        MipFilter = Point;
    };
    
    // Parameter variables
    float offsetX;
    float offsetY;
    float pixelWidth;
    float pixelHeight;
    float blur;
    
    // Effect function
    float4 EffectProcess( float2 Tex : TEXCOORD0 ) : COLOR0
    {
        // Add the front and back pixels
        float2 Tex2 = Tex;
        Tex2.x -= offsetX * pixelWidth;
        Tex2.y -= offsetY * pixelHeight;
        float4 here = tex2D(foreground, Tex2.xy);
        float4 left = tex2D(foreground, float2(Tex2.x - pixelWidth, Tex2.y));
        float4 right = tex2D(foreground, float2(Tex2.x + pixelWidth, Tex2.y));
        float4 top = tex2D(foreground, float2(Tex2.x, Tex2.y - pixelHeight));
        float4 bottom = tex2D(foreground, float2(Tex2.x, Tex2.y + pixelHeight));
    
        float4 result = (here + left + right + top + bottom )/ blur;
        float4 src = tex2D(foreground, Tex.xy);
        
        result.rgb = 0;
        
        return result * (1-src.a) + src;
    
    }
    
    // ConstructEffect
    technique ConstructEffect
    {
        pass p0
        {
            VertexShader = null;
            PixelShader = compile ps_2_0 EffectProcess();
        }
    }
    [/code:34gvb7eh]
  • Awesome job guys! Been waiting for this for awhile too.

    My game runs faster and seems to work for the most part. I think there's a problem with "for each object" but i'm not exactly sure yet. Ill have to look into it tomorrow since its getting late here.

    With the texture loading per layout, does that mean the previous layout's textures are unloaded? Or does that have to be done manually?

    Thanks for the hard work.

  • I tried to solve this by loading all animation frames into one sprite then using the timeline object to control the frames and delay. Its kind of hacky, but it works. I couldn't figure out a way to make the animations repeat though. Im sure it could be done, maybe someone else wants to edit my cap.

    Press 1,2,3 to change the animations.

    http://www.louisferina.com/games/anims.cap

    For a little more explanation: In the Timeline object, each timeline is a new animation and each period is a new frame. Parameter 1 is the frame to show. Duration is how long each frame lasts. I tried to use Parameter 2 to define when the animation should end, but couldnt get that to work.

  • It seems like a lot of people are coming from Gamemaker (I was one of them) to check out Construct. Maybe it would be good to have "Construct for Gamemaker Users" tutorials. I know I had a lot of problems trying to do things in Construct that seemed easier to do in Gamemaker. Most things are just as easy if not easier in Construct, but the workflow is much different.

  • He' s also interested in referencing one frame of an animation in other animations, so you would save on texture space. I guess more of a library of frames that you can use to create your animations.

  • I used GameMaker for awhile. For me, the biggest thing it has over Construct is organization. In Construct, I don't like how you place objects in the layout rather than an object library. I think it's messy (I know you can hide them but that's just an unnecessary step). I guess I'm used to it now, but it seems more intuitive to put an object into a library then call it through code or place it into the layout from there. Being on other layouts, I should just be able to pull from that library and place an instance, not have to open the other layout, copy it, then paste it into the new layout. Deleting an object from the layout should not delete it from the library. Also being able to make object folders in the library is huge (I know this is coming later)

    I also like how GameMaker places code onto objects. As a non-coder, that makes more sense to me. I found it a little easier to handle enemies as opposed to Construct's picking which I haven't fully grasped yet.

    I quit GameMaker once I found out about Construct, so overall I think Construct is a much better game maker.

  • Worked well for me. Can't wait for the 360 controller support!

  • Hey thanks for the help and the explanation, that helped me to understand what was going on. It worked except for the flipping at 180, like you said, but it's a much smoother result.

  • Man, I'd love to take a look at your cap file to see how you handled the combo system and the dialog boxes!

    The chat is pretty easy to do. I did make my own system, but I'm redoing it now that there's a Timeline object. Check out this thread: . It covers pretty much everything. To change the picture of the person talking, just set one of the parameters to the name of the person and change the picture sprite accordingly.

    I don't want to release my whole cap (it's also pretty messy), but I'll see about making a combo system tutorial.

    Please do make a game out of this .

    Thanks Rich, I'm trying!

UberLou's avatar

UberLou

Member since 4 Sep, 2008

None one is following UberLou yet!

Connect with UberLou

Trophy Case

  • 16-Year Club
  • Email Verified

Progress

17/44
How to earn trophies