dfyb's Forum Posts

  • hue sliders are very helpful for generating alternate colors from the same assets.

    at first i thought i may be able to edit the invert effect to let me basically slide the hue value, but after realizing a hue shift effect will likely rely on rgb > HSV/HSL > rgb translations, and not really being a programmer myself, i've given up on the possibility of writing this pixel shader myself.

    here's an algorithm to convert RGB to HSV and HSV to RGB: http://www.cs.rit.edu/~ncs/color/t_convert.html

    i've also found a non-construct pixel shader that can apparently let the user control H, S, V values, so perhaps this can serve to give someone a headstart:

    //transforms
    float4x4 tW: WORLD; //the models world matrix
    float4x4 tV: VIEW; //view matrix as set via Renderer (DX9)
    float4x4 tP: PROJECTION; //projection matrix as set via Renderer (DX9)
    float4x4 tWVP: WORLDVIEWPROJECTION;
    
    //texture input
    texture Tex <string uiname="Texture";>;
    sampler Samp = sampler_state //sampler for doing the texture-lookup
    {
       Texture   = (Tex);          //apply a texture to the sampler
       MipFilter = LINEAR;         //sampler states
       MinFilter = LINEAR;
       MagFilter = LINEAR;
    };
    float4x4 tTex: TEXTUREMATRIX <string uiname="Texture Transform";>;
    float HueShift      = 0.07;
    float SaturationShift    = 0.07;
    float ValueShift  = 0.07;
    //texture transformation marked with semantic TEXTUREMATRIX to achieve symmetric transformations
    
    struct vs2ps
    {
       float4 Pos   : POSITION;
       float4 TexCd : TEXCOORD0;
    };
    // -------------------------------------------------------------------------
    // VERTEXSHADERS
    // -------------------------------------------------------------------------
    
    vs2ps VS( float4 Pos    : POSITION, float4 TexCd  : TEXCOORD0 )
    {
       //inititalize all fields of output struct with 0
       vs2ps Out = (vs2ps)0;
    
       //transform position
       Out.Pos = mul(Pos, tWVP);
    
       //transform texturecoordinates
       Out.TexCd = mul(TexCd, tTex);
    
       return Out;
    }
    
    // -------------------------------------------------------------------------
    // PIXELSHADERS:
    // -------------------------------------------------------------------------
    float4 simpas(vs2ps In): COLOR
    {
     float4 col = tex2D(Samp, In.TexCd);
     return col;
    }
    
    float4 shift(vs2ps In): COLOR
    
    {
    float4 col = tex2D(Samp, In.TexCd);
    ////////////////////////////////////////
    //Parameter Definition for
    //HSV conversion  of Texture
    ////////////////////////////////////////
    double  r, g, b, delta;
    double  colorMax, colorMin;
    double  h=0, s=0, v=0;
    
    //HSV-Value Texture
        r = col[0];
        g = col[1];
        b = col[2];
    
        colorMax = max (r,g);
        colorMax = max (colorMax,b);
        colorMin = min (r,g);
        colorMin = min (colorMin,b);
        v = colorMax;               // this is the result
        
    //HSV-Saturation  of Texture
        if (colorMax != 0)
        { s = (colorMax - colorMin) / colorMax; }
    
    //HSV-Hue  of Texture
        if (s != 0) // if not achromatic
        {
            delta = colorMax - colorMin;
            if (r == colorMax){ h = (g-b)/delta; }
            else if (g == colorMax){  h = 2.0 + (b-r) / delta; }
            else { h = 4.0 + (r-g)/delta; }
            h *= 60;
            if( h < 0){ h +=360; }
            h = h / 360.0;    // moving h to be between 0 and 1.
        }
    
    //////////////////////////////////////////////////////
    // the calculation ///////////////////////////////////
    //////////////////////////////////////////////////////
    
            h+=HueShift;
            if (h>1) h-=1;
    
            s+=SaturationShift;
            if (s>1) s-=1;
            
            v+=ValueShift;
            if (v>1) v-=1;
    
     //////////////////////////////////////////////////////
    //
    // hsv  to rgb conversion
    /////////////////////////////////////////////////////
    
        double  f,p,q,t;
    
        double  rN=0,gN=0,bN=0;
        double  i;
               h *= 360;
        if (s == 0) {if (v != 0)    {col = v;}}
        else        {if (h == 360.0){h=0;}
    
            h /=60;
            i = floor (h);
            f = h-i;
            p = v * (1.0 - s);
            q = v * (1.0 - (s * f));
            t = v * (1.0 - (s * (1.0 -f)));
    
            if (i == 0)      { rN = v; gN = t; bN = p; }
            else if (i == 1) { rN = q; gN = v; bN = p; }
            else if (i == 2) { rN = p; gN = v; bN = t; }
            else if (i == 3) { rN = p; gN = q; bN = v; }
            else if (i == 4) { rN = t; gN = p; bN = v; }
            else if (i == 5) { rN = v; gN = p; bN = q; }
    
            col.r = rN;
            col.g = gN;
            col.b = bN;
        }
    
     return col;
    }
    
    // -------------------------------------------------------------------------
    // TECHNIQUES:
    // -------------------------------------------------------------------------
    
    technique simplePass //name for the technique pin
    {
       pass P0
       {
           VertexShader = compile vs_1_1 VS();
           PixelShader  = compile ps_1_1 simpas();
       }
    }
    
    technique shiftHSV //name for the technique pin
    {
       pass P0
       {
           VertexShader = compile vs_1_1 VS();
           PixelShader  = compile ps_2_a shift();
       }
    }
    [/code:29wyuobn]
    
    edit: i'm imagining the "slider" would just be a percent parameter, but i may prefer a float variable with a functional range up to 360.
  • details here:

    Unfortunate to see feb features pushed back, but also understandable. i'm always excited when Construct gets big upgrades that add significant new features. i'm still very confident in Construct's potential as a very powerful and flexible game making tool.

    What i'm hoping for is an intermediate 'unstable' build released as soon as the revamped control system is done -- i'm making a multiplayer game designed around gamepads and have been setting aside progress for key parts of the game as i wait for this revamped control scheme. i'm looking to go public with a playable build by mid april, so i'd like access to this revamped control scheme as soon as possible. i know you guys are busy -- i'm just suggesting having the revamped control scheme as one of the top priorities, as i think gamepad support and multiplayer support are both very fundamental.

  • yeah i also posted it in a forum for graphic/logotype designers at my school and got some great technical feedback -- school's got me busy the next week or so but after that i plan on experimenting with the feedback i've gotten from them and you guys -- it's all been very helpful and i think i can make it into a pretty legitimately designed logotype

  • <img src="http://upload.dfyb.net/uploaded/characterSketchScan.png">

    not a screenshot, but a working character concept for my game.

    <img src="http://upload.dfyb.net/uploaded/characterSketchTestColor1.png"><img src="http://upload.dfyb.net/uploaded/characterSketchTestColor2.png">

    you guys have an opinion on color?

  • Basic idea... I rushed it a bit because I'm supposed to be helping my wife with something lol, but this was my general idea.

    24bit PNG with alpha

    <img src="http://i2.photobucket.com/albums/y46/soldjahboy/SCIRRA/onigirilogo.png">

    ~Sol

    i dig it. i'll be experimenting more later

    thanks again everyone for the feedback

  • .psd to mess with

    some extra guiderules left over from past experiments..

  • Also oni means demon, so your essentially saying demon girl.

    So maybe something relating to that.

    How bout a like a snake eye in the o, with some long eyelashes?

    Edit, oops not girl, but giri... demon duty?

    http://www.greggman.com/japan/onigiri/ebi-mayoneezu.jpg

    Onigiri is actually a slight reference to the japanese foodstuff 'onigiri'. simple, common snack in japan -- rice ball wrapped in seaweed with some sort of filling (i like the salmon onigiri the best). my games aren't necessarily japanese styled or anything though -- a very abstracted visual reference to the food is the closest i want to get to a literal reference. for the name, i'm thinking more along the lines of 'small indie games are like snacks'

    thanks for the feedback from both of you on the design though -- i'll be experimenting more with it -- hopefully i find a design i like and decide to stick with the name. all feedback is appreciated

  • <img src="http://upload.dfyb.net/uploaded/onigiriGamesbanner.png">

    <img src="http://upload.dfyb.net/uploaded/onigiriGamesbannerSmall.png">

    Onigiri Games

    Not a company -- but something i'm considering for what to call my indie games endevour. thoughts?

  • motion blur runs fine for me. 8800GT

  • seems to run fine for me, framerate-wise, but that block jumps around sometimes very oddly

  • oh, and i'm not sure why i said private variable. it would probably be smarter to use a global variable.

  • i believe 'pick random object' is used more for existing objects, not for picking objects to spawn from a group of non-existing objects.

    what you could do to pick a random piece --

    condition for spawning new piece

    -set private variable to Random(7) (replace 7 with however many possible pieces there are)

    if private variable = 1

    trigger once while true

    -spawn piece 1

    if private variable = 2

    trigger once while true

    -spawn piece 2

    and so on

    [quote:2iz066v7](Perhaps the real question:)

    But when selecting "pick random object", I only get to choose 1 object. So how can it select randomly, from only 1 object? I would like to have a random choise between multiple pieces.

    well, for future reference for other applications, you would add all the pieces to a family and then pick random object from that family. but again, pick random object wouldn't really work for this situation, i don't think.

  • This is currently my MAIN project, but I'm working on other stuff too (just don't have any worthwhile screenshots of the other projects yet):

    []http://fc51.deviantart.com/fs40/f/2009/016/5/e/5e1f980873ce64051572e4986b31ddf2.png[/img]

    Oops, it's a bit cut off, so if you'd like to see the whole thing, just click here.

    i dig the art. is your avatar from your own game? looks like it may fit in

  • can you get it to happen again..?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • they wanted a new friend to play with...

    so they made one