Valerien's Recent Forum Activity

  • What I meant by views was that how can i keep the camera fixed on the car?

    Create an event with the condition "always" (under system) and give it the action "scroll to object", then select your player.

    You should try to rip the road sprite from an old game.

  • 1) simply use png files with transparent backgrounds... the question has already been asked a few days ago, in this forum.

    2)what do you mean by "views" ?

    3) search it by yourself. You can add rpg-style functions like giving the player the possibility to upgrade his car, a money system, boosts, weapons etc.

    You'd better learn how to use the software before you try to create an original game. There's a bunch of tutorials in the wiki.

  • Hi everyone,

    I've done some shaders these days and right now i'd like to improve my blurring techniques... in order to create a bloom shader, I need a huge kernel (and a bunch of pixel weights) to get a satisfying result; but it's too expansive. Moreover, i'd like to reduce the number of instructions i use for my gaussian blur shader and get a better result (right now 7 samples). To do so, i need to scale down my textures, backgrounds or so. Is there a way to do that in hlsl please ? In construct ?

    Thanks in advance.

    By the way, should I release my effects to the community ? I'm creating a bunch of shaders that can be use with construct's events for cinematics (desaturate, blur with controllable range, color shift depending on world position, and all that kind of stuff).

  • I'd create several arrays with :

    • consonant and vowels for the first letter
    • consonant only
    • vowels only
    • several consonants to follow other consonants (h, etc.)
    • several vowels to follow other vowels (to get "ae" etc.)

    Then i'd use a random iteration value between 5 and 10 (rnd(6) +5 with floor) to count the letters and use it as the number of iterations of a loop. Then you generate random numbers that pick a letter each time in one of your arrays and check if the last generated letter is a consonant or a vowel. Dunno if it's the best way but with some exceptions you might be able to get cool names.

  • It's strange that you cannot simply copy an object from one cap to another without risking corrupting your game. Well, i think we'll give it a try with a saved copy of our game, and see if it works. Thanks .

  • Thanks a lot. I'll do this.

  • Hi everyone,

    I read yesterday that copying some stuff from one cap to another could result in strange bugs. To what does this apply please ? I'm creating a single app with the character i'm animating so they're ready for the programmer, and i'd like to know if it might corrupt our game please ?

    Thanks in advance.

  • Yeah, that's great ! I didn't see the separate tab as it was situated under the "sprite" tab. Thanks a lot !

  • Ok so now, with some improvements, the shader works. Right now it passes only a 1dim value in the sin (hotspot) so it lacks a bit of variation... but that's fine for a side scroller.

    [quote:3ayx6fvm]You may also add parameters for the width and height of the world.

    How do you get such a parameter from construct please ? I've searched in the event sheet, but i cannot interact with the effects parameters with it. Is there a way to calculate something in the events or so and send it to the shader ? Or interact with its declared parameters in the event sheet ?

    Thanks in advance.

    I'll release my work to the community as soon as i've made some more stuff (desaturation, controllable blur, maybe motion blur, fake ssao and dof...).

  • Thanks a lot ! I thought that construct would define by itself the parameters ^^'. Also i've changed the param frontTex to front and forgot it in the main function.

    About the variables from construct : the problem is that i cannot get values relative to the origin of the world. This would be cool to create effects such as colorShift for vegetation, to alterate wind effects, motion or so... and it only adds 1 instruction per shader. Well, maybe this will be added later.

  • 1- you can simply create a secondary set of animations with 8 angles and program your own animation, or create a "turnaround" animation with different angles that's being showed when the character is turning. To me, it won't really improve the visual quality of a game and cost a lot of HDD space.

    2- I haven't seen such a function with the platform behavior, but you can store the position of the object during 3 frames and combine them so you obtain two 2-dimensionnal vectors. You compare the two vectors and... you can see if your character is accelerating.

    Or you can program your own platform movement with events.

    3- It will be attached to the same image point (the same name or ID). You only have to place it on every animation you make for your spaceship.

    4- Dunno the right technique. I'd personnally draw objects on the screen to hide a part of the map, according to values stored in a dynamic array, but I think this isn't the best solution.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi everyone,

    I'm trying to make some very simple pixel shaders mostly for learning purpose (and creating color shifts based on world position or wind deformation for plants the same way). When i try to use it, construct gives me an error :

    <img src="http://s2.noelshack.com/uploads/images/1742912921277_sans_titre2.jpg">

    Here's the code i'm using :

    // World recolor
    // Valerien
    // PS 2.0
    // Overlaps an object's color depending on its position in the screen
    
    //#PARAM float redAdd 0.1 : RedShift : Adds red to the object.
    //#PARAM float greenAdd 0.1 : GreenShift : Adds green to the object.
    //#PARAM float blueAdd 0.1 : BlueShift : Adds blue to the object.
    
    //special values extracted from construct
    texture ForegroundTexture;
    // texture BackgroundTexture;
    int boxLeft;
    
    //sampler
    sampler2D foreground = sampler_state
    {
    Texture = (ForegroundTexture);
        MinFilter = Point;
        MagFilter = Point;
        MipFilter = Point;
    }
    
    //ColorShift function
    float4 EffectProcess( float2 Tex : TEXCOORD0 ) : COLOR0
    {
    float4 front = tex2D(foreground, Tex.xy);
    float3 colorShifter;
    
    colorShifter.r = redAdd;
    colorShifter.g = greenAdd;
    colorShifter.b = blueAdd;
    
    boxLeft.x *= 0.1;
    //sin and cos functions are used for 
    frontTex.rgb *= ((sin(boxLeft.x) - 2*cos(boxLeft.x)) * colorShifter.rgb)/colorShifter.rgb;
    
    return front;
    }
    
    //technique
    technique ConstructEffect
    {
        pass p0
        {
            VertexShader = null;
            PixelShader = compile ps_2_0 EffectProcess();
        }
    }[/code:10w66x7m]
    
    Also, is there a way to get the position of the object passed through the shader ? And to get a time value from construct please ?
    
    Thanks in advance !
Valerien's avatar

Valerien

Member since 15 Nov, 2010

Twitter
Valerien has 3 followers

Connect with Valerien

Trophy Case

  • 14-Year Club
  • x25
    Coach One of your tutorials has over 1,000 readers
  • x2
    Educator One of your tutorials has over 10,000 readers
  • Email Verified

Progress

17/44
How to earn trophies