UberLou's Forum Posts

  • Yes, but this would be integrated into the bone animation system and not necessarily for realtime use. More as an animation aid like in 3d Studio Max or Maya.

  • I've been working with the Bone Behavior in Construct for awhile now, and while it's awesome, it's also very tough to work with. Since animation is my area of expertise, I thought it might be a good idea to get some thoughts out there for a possible version 2 of the bone animation tool. Some of these could still apply to how the bone behavior works now, others would probably require a complete rewrite. Here is my wishlist for bone animation in Construct 2.0.

    1) Bone Root Object

    Instead of a behavior, you would create a Bone Root Object which would have no sprites inherently attached to it. It would act like a root node to the actual rig. Editing that bone root object would bring up an editor window where you would build out your hierarchy of bones into a full rig, similar to how it is now but just creating bones with no attached sprites. You can then edit each bones properties like name, angle, size etc. The bones would be invisible during runtime.

    Since there are no attached sprites to the bones, you can then link any sprite to any bone dynamically. The sprite would attach by its hotspot and auto align with the bone. You would also have options to change the angle of the sprite if necessary. If I'm creating a worm like creature, I can have one body segment sprite and attach it to each bone in the hierarchy to create the full body. Using only one sprite would save a lot on texture space. Through keyframing (see #2) or events, I can change from a "worm segment front" sprite to a "worm segment side" sprite. Being able to change sprites on a bone in realtime would help greatly with animations where the arms connect to different areas that you have to line up with the sprite.

    2) Timeline Based Animation System

    Basically your standard animation timeline. You have a timeline based on frames at the bottom of the window. Scrub the timeline to a frame where you want a new keyframe, manipulate a bone or hit a keyframe button, and the keyframe appears on the timeline. The keyframes would be per bone and not apply to the whole hierarchy as it does in Construct 1.0. A nice little play button would look great next to the timeline to preview animations

    -Things you can keyframe

      -Translation -Rotation -Scale
        -scaling individual bones would stretch the sprite -scaling the root bone object would scale the whole rig
      -Z depth to control overlapping sprites -Changing sprite texture (see #1)

    3) Additive Blending and Layering

    For Additive Blending, if I have an animation which is just the character shaking, I can play that animation over the top of others and it will blend additively (not take over the base animation, which is what layering would be). For example, if the character is running and then is suddenly on fire, I can trigger the shake animation to play on the character relative to what the run cycle is doing. This was used to create lots of organic movement in Drakes Fortune for ps3.

    Layering would take over the animation based on a percentage. For example, I have two animations, a run cycle which has keyframes over the entire body and a cheer animation which only has keyframes on the upper body. Layering the cheer animation over the run cycle at 100% would have the lower body playing the run, with the upper body playing the cheer animation and ignoring the run keyframes.

    4) IK

    The ability to add simple IK chains to rigs would be a huge help for animating. This wouldn't be realtime IK (although that would be cool too) but more for making animation easier.

    5) Misc. Features

    - Rotations on a parent object should maintain the angle with the child object. If I have the arm bent in an L shaped position and I rotate the upper arm, the forearm should rotate with the upper arm and retain the L shape. As it works now, in the same scenario the arm will straighten out.

    - Ability to get individual bone position, angle, scale, etc through events.

    Feel free to post your own thoughts.

  • The bone duplicating bug has been submitted already, I've been waiting for that one to be fixed too. I'm sure it will be solved by 1.0 as the developers have said they're trying to fix most bugs by then.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Bugs

    (tentative title)

    <img src="http://louisferina.com/zenphoto/themes/lsf_home/images/blog/ba03.jpg">

    WEBLOG

    http://www.louisferina.com

    DEMO

    http://www.louisferina.com/games/BugsDemo2.zip

    This is a small portion of the game and it's more of an engine test than a demo.

    Please let me know of any bugs or glitches that you come across and any feedback is appreciated. Enjoy!

    CONTROLS

    d: move right

    a: move left

    space: jump

    ctrl: roll

    mouse: aim

    left mouse: shoot

    middle mouse: throw grenade

    right mouse: melee

    Throwing grenades and the melee both take into account your angle to the cursor. If you melee either the fly or exploder with the cursor over your head, theyll get hit straight up.

    SPAWN ENEMIES

    o: fly

    p: exploder

  • Whats Alchemy? Tried to google it and couldn't come up with anything.

    Looks awesome Obson, nice atmosphere!

  • Thanks guys. Not sure how i missed the animation thing, guess it crashed and the animation didnt save.

    For #1 I thought that in earlier versions if you destroyed an object in a container it would destroy all of them, even at start. Ill have to check that again.

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