Somebody's Forum Posts

  • Or use the add action and global * 0.1

  • Hi, R0J0, you said edits are welcome - for my purposes the effect didn't suffice because it didn't have the expanded draw rectangle and had all the extra parameters for colors, size, etc.

    So I went ahead a kinda re-purposed it to do a single thing - fill the original image with black and add a 2px outline. This lets use create a neat selection effect if the shapes are placed on an additive layer:

    I have but one question - does this seem to be the optimal way to do it?

    /////////////////////////////////////////////////////////
    // Selection outline effect
    //
    varying mediump vec2 vTex;
    uniform lowp sampler2D samplerFront;
    
    precision lowp float;
    uniform lowp float pixelWidth;
    uniform lowp float pixelHeight;
    uniform lowp float width;
    
    void main(void)
    {
    	lowp vec4 front = texture2D(samplerFront, vTex);
    	
    	front = vec4(0.0,0.0,0.0,front.a);
    
    	float dx = pixelWidth*2.0;
    	float dy = pixelHeight*2.0;
        float dxdiag = 0.7071*dx;
    	float dydiag = 0.7071*dy;
    	
        float a0 = texture2D(samplerFront, vTex + vec2(-dxdiag, dydiag)).a;
        float a1 = texture2D(samplerFront, vTex + vec2(dxdiag, -dydiag)).a;
        float a2 = texture2D(samplerFront, vTex + vec2(-dxdiag, -dydiag)).a;
        float a3 = texture2D(samplerFront, vTex + vec2(dxdiag, dydiag)).a;
        float a4 = texture2D(samplerFront, vTex + vec2(-dx, 0.0)).a;
        float a5 = texture2D(samplerFront, vTex + vec2(dx, 0.0)).a;
        float a6 = texture2D(samplerFront, vTex + vec2(0.0, dy)).a;
        float a7 = texture2D(samplerFront, vTex + vec2(0.0, -dy)).a;
    	
        float ina=max(max(max(max(max(max(max(a0,a1),a2),a3),a4),a5),a6),a7)-front.a;
    
        float outa = ina + front.a*(1.0-ina);
        vec3 outrgb = (vec3(1.0,1.0,1.0)*ina + front.rgb*front.a*(1.0-ina));
        gl_FragColor = vec4(outrgb, outa);
    }[/code:j34146av]
    
    I did extensive performance testing and despite my perceived "performance optimizations"  (2x less multiplication, etc) it doesn't really change. And expanding the draw rectangle instantly cuts fps in half. Still, it gets teen fps on my modest machine with 1000 objects, that's more than enough for its intended use.
    
    Any feedback is welcome.
  • R0J0hound - could you try the demo capx in my bug report up there - it's really obvious there.

    For what it's worth in your example I get the same behaviour - overeager mipmapping when one value is lower than some threshold.

  • Uh, why would you need that? Just place your text on the topmost layer?

  • Ah, well, if the original creator gives the art away it's a-ok.

    Tyrian was the bomb back in the day, they should really make a new one for the mobile platforms with all the wackiness of the original.

    As for your game - it seems alright, you could probably add some respawning coins or things in risky places that give extra points, but increase the chances of terrible tragedy.

  • I suspect first you get a guy like this: "Niko Derome – Server Architect. A veteran on designing large-scale game servers, Niko has spent the last 15 years in developing real time and asynchronous systems that serve tens of millions of users at companies like Codeonline, Sulake, and Digital Chocolate." - then that guy tells you what the system that communicates with his servers needs and you go from there. The front end could probably be C2, no problem.

  • Gotta love these "How do I make game X" threads...

    A game like that has a budget with a great deal of zeroes - they spend a good deal of that on ads (funny ones, with quality CGI and voice over work) so it's certain the game will get plenty of exposure and thus plenty of players and thus plenty of revenue from IAPs.

    So they can afford to have the servers and the decent programmers and the art folk and everything else needed to keep the game running. And when it's been running for a while this happens (Wikipedia):

    "The game has been very successful for Supercell. By April 2013, Supercell had only two games on the App Store, Clash of Clans and Hay Day, which together had grossed $279 million. Daily revenue was at $2.4 million,[12] with 8.5 million daily players, and Forbes projected a revenue of between $800 million and $1 billion by the end of 2013.[13][14] They ultimately earned $892 million (compared to $101 million in 2012).[15]"

    Long story short - you probably won't make a game with millions of players that earns BILLIONS on your own, especially if you need to ask these questions. Start sensible, start small.

  • I was just wondering - can you use assets from Tyrian in something that potentially makes money (with ads or otherwise)?

  • Beaverlicious - somehow, no matter how much I stare at it, it's not moving

  • My graphics card is a beast - NVIDIA GeForce GTX 970 - so it can handle almost anything.

    Woah. Off topic, but could you run the little "benchmark" demo here on it? Just curious.

  • I would really like to see a BRIGHT horror game. Or at least one that has some bright sections, not just being in some dark room all the time. I think Silent Hill understood this well with the fog sections. Although there these were more open and "relaxing" in a way I'm sure it is possible to create tension and fear without using the usual darkness and enclosed space.

    For example - have these open areas wherein something can attack you and you are forced to stick to building or such and quickly sprint from one to another. And as you go you hear a voice: "I seeeeee youuuuuu" or something like that. And if you take too long it just instantly kills you (or deals a good chunk of damage). This needs to be well balanced as not to become annoying, but it could be exciting and create actual fear as you dash from spot to spot.

  • Hi, all!

    Since the official stance on the buggy (on some systems?) HSL Adjust effect has been "That's standard behaviour as far as we can tell" (no offense to Ashley) and R0J0's replacement Hue effect didn't work on my system I went ahead and did some research.

    This thread had a similar issue: http://gamedev.stackexchange.com/questi ... brightness and a fine gentleman by the name of Sam Hocevar had supplied a solution.

    Since my understanding of shaders is basic at best I didn't try to "fix" the HSL into this, but adapted the HSB adjustment (which in many cases is actually more versatile) and here is the result:

    [attachment=0:2j4fnd36]17881dc1-2680-43e0-90dc-6f5ad953da3b.png[/attachment:2j4fnd36]

    Adjust HSL on the right, Adjust HSB on the left. Speaks for itself, I think.

    There is a capx in the Archive - if you could open that and have a look I would be quite grateful - does the hue work in the editor? Does it work at runtime? Do things look correct? Is the HSL glitchy for you as well?

    If someone knowledgeable in Shaders could check if things are done right I'd be quite grateful as well. Cheers.

    Edit: Moved to the main thread here: effects-by-somebody-adjust-hsb-trim-shift-dissolv_p877848?#p877848

  • In my case I had to go real low, like 640x480 to export. Which is strange as in a different project I have been capturing canvas left and right at fairly large sizes. I think this has to do with your background image being a tad big on its own.

    Fairly low end Nvidia GeForce GT 640 graphics card on this system. But still, for 2D art it's more than enough.

  • Indexed sprites are the bomb, but if I'm not mistaken trying to do this real time (for html 5) would eat performance for lunch. There is currently a color swap shader, but this would be easier. Perhaps with some sort of intelligent cacheing for non dynamic objects. Would increase memory use a bit, but not lose performance to complex pixel level operations.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Why not use size - as in width and height?