Mikal's Recent Forum Activity

  • Inspiration time.

    Attended the online conference Visual;Conference, great speakers and good simultaneous discord chat. The 2017 conference is already on youtube and the 2018 is being uploaded, see the conf link for details. Good stuff to check out, recommended.

    My game will be a hybrid VN / point and click, so a lot of content was spot on and inspiring, even if my genre is not in the main VN genre of 'romance'. That being said they showed a number of existing VNs also outside that main genre.

    A few quick takeaways:

    • Create a good story outline
    • Create full script before doing any professional voice acting
    • Indie voice acting cost: $3/line or $100/hour
    • Limit each line in dialogue to < 160 characters between action (change portrait animation, continue prompt, change speaker, etc.). Otherwise players skip the text.
    • Some Visual Novel platforms earn $1M/day! Choices / Episodes - using freemium model.
    • Get solid contracts for IP or license details (e.g. music, art, code).
  • Experimental effect.

    I wanted to create a water reflection for my game and used the Paster plugin and it worked well, however then I added effects to the objects that I was reflecting and found out that Paster did not work with objects with effects. So, I started looking at trying to make an effect that does a reflection of the 'background' across the Y axis as I needed in my game. Here is my first result which will hopefully work for me and may work for others.

    If you don't need to use effects on objects, you may also want to check out Paster instead.

    In this implementation, you must update the OffsetY parameter of the effect, depending on the location of the sprite using the effect. See the *.c3p for an example. In this example I set the origin of the sprite to the top, so the reflection starts at the top of the sprite. I imagine rendering order / layers / z-order matters for this effect, but I have not tested many variations (the example has only two layers.)

    The example is also using the Skend effect to show that it works with an effect. You can grab the C3 Skend effect here: Skend C3 Thread.

    Effect: ReflectY.c3addon

    Project: ReflectYSkendTest.c3p - also requires Skend effect.

    [Edit] Updated project file to handle zooming viewport.

    Example with moving sprite reflection:

  • Yes, sometimes there are problems with the automatic conversion, since I did not develop the original plugin, it will be tough for me to debug, perhaps send it back to gamedistribution.com to check it out. You can also take a look at the chrome browser debug console to see if you see some errors.

  • Hi, I'm interested in using this fx, but reading the c2 thread it appears it doesn't work when exported? Is this correct for c3?

    [quote:18o1lchx]Effects like seamless screw up when exported as it doesnt take into consideration that construct bundles images into sprite sheets. Something similar could be happening with Skend.

    Thanks.

    With the changes to the effect using srcOriginStart and srcOriginEnd (for scaling and clamping), it should take care of how C3 bundles images into sprite sheets.

    This post helps explain the reasoning:

  • I took another crack at it, bilgekaan, want to try a new version? Thanks for all the testing! Updated link in OP.

    I added this:

    tex = clamp(tex, srcOriginStart, srcOriginEnd);[/code:g8bmrfq7]
    Now the texture being sampled should clamp to the edges of the sprites texture in the spritesheet, regardless of how big the spritesheet itself is. Be aware of the clamping, it will repeat the edges of the texture as the tex uv clamp. In this case, since the edges around the grass sprite are transparent, it works well. So, you should no longer need a lot of padding (except to make sure the actual rendered sprite does not clip.)
    
    I also created a new effect SkendPow which lets you adjust the exponent which controls the skew/bend, in the original effect this was fixed at '2.0', but now you have another parameter to play with. Truth be told, '2.0' looks the best to my eye, but high numbers make the lower part of the grass look more 'stiff', something to try for different effects. SkendPow is not directly compatible because it has an extra parameter, something to be aware of.
  • I am not sure why the behavior is different between C3 and C2, but in C3 the wrong skend behavior shows up when there are more sprites in the project (and when sprites are packed into some large textures.) To resolve this I normalized the delta x offset based on srcStart/SrcEnd and also switched back to pixelSize.y. See comments in the effect.fx code below.

    I updated the c3addon in the OP with this new version, bilgekaan please try it again.

    I tried a few tests with a different number of other sprites and checked for how the textures were packed using the chrome debugger, the effect worked across a few cases, but watch for the skend effect changing as you change the number of sprite objects (not instances) and size of the sprite source texture (animation).

    Also the more you skend, you may need to 'pad' in your original texture or you'll get clipping and perhaps sampling neighboring textures in the case of packed textures.

    Here's the new code:

    /////////////////////////////////////////////////////////
    // Skend effect
    varying mediump vec2 vTex;
    uniform lowp sampler2D samplerFront;
    
    uniform lowp float pixelWidth;
    uniform lowp float pixelHeight;
    uniform lowp float Skend;
    uniform mediump vec2 pixelSize;
    uniform mediump vec2 srcEnd;
    uniform mediump vec2 srcStart;
    uniform mediump vec2 srcOriginStart;
    uniform mediump vec2 srcOriginEnd;
    uniform mediump vec2 layoutStart;
    uniform mediump vec2 layoutEnd;
    
    void main(void)
    {	
    	mediump vec2 tex = vTex;
    	mediump vec2 texOffset = tex - srcStart;
    	
    	// Original from C2 effect, did not work with sprite packing in C3 and pixelHeight did not seem to work
    	// tex.y -= (pixelHeight*Skend)*pow(tex.x,2.0);
    	// Instead, calculate the normalised position n of vTex in the foreground rectangle and use that for Skend amount
    	mediump vec2 n = (vTex - srcOriginStart) / (srcOriginEnd - srcOriginStart);
    	tex.y -= (pixelSize.y*Skend)*pow(n.x,2.0);
    		
    	gl_FragColor = texture2D(samplerFront,tex);
    }[/code:1a37uoab]
  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ok, I see the same error when I add more sprites. Hmmm, let's see if there are some new C3 effect uniforms that can adjust for this.

  • Glad it's working and that's a cute little game, fun to play. Did you only do the ad on game start? Do you have ads play at other times?

  • Mikal That's weird. It looks like this in my template.

    I think it tries to skew whole sprite sheet as mOOnpunk mentioned.

    bilgekaan that looks pretty strange, can you share your *.c3p project, so I can try it also and take a look? It also does not appear to 'Skend' the way I expect (where the amount changing depends on Y coord of the texel/sprite.) Instead, it looks like the entire image is shifting.

    If you use the SkendTest.c3p project I posted above, do you see the same issue?

  • Looks promising. Quick check if the C2 to C3 functionality works (can't load/convert *.fx file on the C2 to C3 fx tab.)

    I did a couple conversions, I'm finding it tricky to find shadertoys that work in C2, got one working ok (mandlebrot). Any guidance on which shadertoys shaders will work well (I am assuming no multi-pass, simpler to not use iChannel textures.)

  • Nice demo, what tool are you using to create your normal maps, RodBraga?

  • Similar issue - it seems to work on r75:

    https://editor.construct.net/r75/

Mikal's avatar

Mikal

Early Adopter

Member since 22 Apr, 2016

Twitter
Mikal has 103 followers

Trophy Case

  • 8-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Forum Hero Made 1,000 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • Steady Visitor Visited Construct.net 30 days in a row
  • RTFM Read the fabulous manual
  • x10
    Great Comment One of your comments gets 3 upvotes
  • Delicious Comment One of your comments gets 10 upvotes
  • Email Verified

Progress

19/44
How to earn trophies