Ashley's Forum Posts

  • Unfortunately no documentation exists on this yet - I think the best place to start is looking at other effects. Additive Plus is a good example, since it is an intensity-customisable version of the Additive effect. It's very simple. If you ignore the miscellaneous definitions around the file, the main function is EffectProcess(), which calculates the effect:

    // Effect function
    float4 EffectProcess( float2 Tex : TEXCOORD0 ) : COLOR0
    {
        // Add the front and back pixels
        float4 front = tex2D(foreground, Tex.xy);
        float4 back = tex2D(background, Tex.xy);
        back.rgb = (front.rgb * intensity) + back.rgb;	// Add colours
        return back;
    }[/code:j5si1p0d]
    
    This can be summarised as:
    
    1) Get the foreground pixel
    
    2) Get the background pixel
    
    3) Add together the foreground and background pixel (with intensity) and store result in 'back' (note the addition, hence 'Additive blending')
    
    4) Return 'back', which is the result of the effect.
    
    That's a simple [i]blending[/i] effect, which means it basically combines the texture and the background in some way (alpha channels are an example of blending, because they combine the foreground and background).  Other good blending effects are Dodge, Multiply Plus, Subtractive Plus etc.
    
    Note effects like Multiply (the PS 0.0 version with no intensity) are coded simply by render states, which is a limited way of processing effects on cards with no pixel shader hardware - I think we've covered most of the useful things that can be done with renderstate-only effects, though (but feel free to experiment).
    
    Other [i]distorting[/i] effects simply use the texture to distort a texture in some way.  Magnify is a good example - the texture's colours never reach the display, they're just used to define how to distort the background.   Warp is another good example that just uses sin and cos to make a kind of flag-waving effect on an image.
    
    Finally there are more advanced effects like the Blurs, HDR and combination... I guess these would take full on documentation to fully explain.
    
    Also I've found a fairly good general explanation of shaders here:
    
    [url]http://www.facewound.com/tutorials/shader1/[/url]
    
    It explains shaders in a general way pretty well, but it obviously doesn't cover Construct's implementation of shaders.
  • I think 0.94 will have fixed inflating filesizes - let me know.

  • Deadeye's solutions are good so far, except that you can do it without subevents, heh - 'pick random' could simply be a condition after 'every'.

    As for object picking via conditions, remember two things:

    • For Each works best as the first condition
    • Use built-in conditions wherever possible instead of System's Compare Values (eg. Sprite's Compare X rather than comparing Sprite.X to a value - works instance by instance)

    Also might help to post your .cap file, so I can tell you exactly what's going on.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If you think there's a flamewar warming up here, I have a bucket of water for you: Flamewars Get Threads Locked.

  • There should be a multiplayer plugin by the time we hit 1.0, and I'll have made it if nobody else has. Networking isn't my strong point though, even so I will try to do it properly, but I don't know how long that'd take - you might have to be patient if you're starting now!

    Also be aware there are known file-corruption bugs in 0.93, some but not all of which should be fixed by 0.94 - keep lots of backups!

  • Lol guys, fool'd

  • Thanks Exomarc, confirms my suspicion it's my fault

  • I think it's more likely a bug in Construct until I properly research the bug, in which case it would be coincidence Game Maker has this bug.

    If it is a problem with nVidia cards, I can't and won't do anything about the bug. In that situation it would be nVidia's problem so if the latest drivers still had the problem, you'd have to go complain to them about it. Right now though, can't say which it is. We'll see.

  • Well, it's much more efficient to send commands to the GPU all in one go (in a batch) than separately. I hadn't realised effect rendering wasn't batched, so was just a matter of fixing that.

  • The wiki does need a description of containers, I'd be happy to help out. Note two other features of containers:

    • If you create or spawn one of the objects in a container, it creates instances for every object in the container, to keep the object counts the same.
    • Same with destroying - destroying an object in a container destroys all associated objects (so you only need one Destroy action on any one object to destroy a container).
  • Event Wizard = dialog you use to insert actions and conditions.

  • Yep, received thanks, will take a look soon.

  • Some of you may have noticed somewhat sluggish results when alot of different textures are created, or objects with many effects.

    I am happy to announce (and this is not an April Fools joke ) that by the tests done, I measure an increase of up to 1000%. Pixel Shader 0.0 operations (such as additive) have also been increased by around 200% in speed, and I hope to optimize other PS effects.

    When 0.94 is released, it'd be good to collate some testing information of the general increase .

  • Dear community,

    I mentioned that 0.94 would be released several days ago, at around this time. I will not renege on this, and 0.94 should be released later today. However, we have been in discussions with a large software company (Adobe) and I am pleased to announce we have agreed terms and Construct has been purchased outright for a 6 figure sum.

    Adobe wish to take Construct into the online and Flash market, as a simpler development environment and with the aim of developing a stronger applications and professional market. I will not be on the development team unfortunately, but I hope my mentoring of Construct and the community is enough to see all our aims through.

    I wish you all the best,

    Ashley

  • This is fixed in 0.94; for reference, it occurred when retrospectively changing actions or conditions to different objects without replacing them (clicking back in the Event Wizard).