matriax's Forum Posts

  • The IA and pathfinding has been improved a lot !!.

    Nothing was scripted. The enemies moves slow when they not see you, ths means in "LOS"(Line Of Sight) but when they can see you accelerate to attack you.

    If you are in "LOS" or not they al ways will try to find the closest path to your position avoiding any obstacle.

    Still is not 100% as i want because needs some aleatory movement when you are not in LOS but works perfect for this tests.

    HD youtube > https://youtu.be/YrF106HZP-A

  • lennaert Worked perfectly, Thanks!

  • I read the Native expresion manual on Random:

    https://www.scirra.com/tutorials/77/nat ... onstruct-2

    So i don't know if is possible, but there is anyway to select the numbers to random? i mean:

    Random(2/4/8/32)

    So will random and select one number of the given ones. Is possible?

    Thanks

  • Other .gif showing the last additions and show what can be done with this shader.

    Now with the use of transparent in textures i can do doors and windows. Also added the first enemy with a basic IA/Pathfinding.

    Here the HD Version:

    https://youtu.be/9mXz6saUiV4

    More coming!

  • Gigatron Tested! I had to change the values for opacity and see how works the Blur and perfect, just what i asked, thanks!

  • Gigatron, well looks perfect in that demo , link?

  • matriax

    I talked about values inside for loop in the demo above..

    Would you like blur fx (another shader ?) .. or you would like blur for this shader ?

    if i understand the circle above is shadow ?

    English is very hard....

    Regards

    Yes, blur for the shadow shader, actually with the shadow on the shader will works great on pixeled games like my actual one but for other style games, me or other people may need the shadow blured instead pixeled.

    In your example you can see the "steps". The idea is made a gausian blur like my above picture even if is only 4 or 8 pixels but without visible steps like in the star to look soft. That will be great .

  • Gigatron

    I'm looking for a Gaussian blur to do things like this:

    If i understood well, are you saying is not possible change the blur param on C2 to adjust and only can be added in the .FX?, i mean, then how the Blur, GLow and things like that do it in the scirra shaders? Maybe for shadow do something out the Main to do the blur and then copy in the main the result i don't know XD.

    So, if for some reason you can't achieve a blur like that to be edit by param then leave it, as i said the actual shadow fx works for the game i'm working.

    -

    PS: Thanks to you! you deserve it! my game is looking better every time you release a shader

  • shinkan Thanks i will download too, never knows!

    ---

    Magistross Then thats why my one was a mess XD, because seems is impossible . Well, now with the effects at least will works for my actual needs.

    I'm testing in deepth and the problem of the effect in the layer is that all the shadows will have the same properties, i can't set specific offset or opacity depending the zone on the lgame level, all is applied in the same way fo all them but is the unique form to get working correctly.

    So, i guess the best solution for this is having a behaviour on a family that do the shadow on you can specify in which layer show the shadow and on you can set different variables for each sprite.

  • The shader works perfect if is added to the layer you want to cast shadow and will works with spritesheeting, rotations and will appear in the bottom of the sprites without overlaps due Z-Order. ( http://gigatron3k.free.fr/html5/C2/FX/dsp.rar)

    So Gigatron maybe start a topic releasing this .FX .

    Last improvement in case is easy to do is add a parameter to blur. I tried make a blur for sprite or layer but also makes blur/glow the sprite, so a param inside the shader to get the blur for the shadow will be awesome.

  • Thanks for the reply guys!

    shinkan Yes i requested a shader like that to Gigatron that did this one:

    (That i guess does the same as yours. )

    The problem was that on sprite animations on export(due spritesheeting) , the shadow overlaping with other objects and the shadow rotation on sprite rotation changes.

    But as you pointed, adding the DropShadow to the layer works perfect! even with animations on expored!(no mater spritesheeting anymore) and the shadow is always on that Offset, no matters the sprite rotation .

    ---

    Magistross Thanks for the updated .capx maybe in some cases i will hade to do in this way to have more control over the shadow. BTW, you again add an event to each sprite that needs shadow, that is like give shadow for each srite one by one. If i have 50 enemies i will have to make 50 events... the idea was make general, so simply add the sprite on the Shadow family and this one gets shadows automatically, without add into events.

    ---

    SoldjahBoy Yep! i know, but you have to use containers, add for each sprite a container with a shadow,etc... i was looking a more automatic process. Now time to test better all this but seems is working that i need.

  • Why was it a mess ? It seemed like a good idea. I tried it and doesn't look messy to me, maybe I just don't understand what you expect. <img src="{SMILIES_PATH}/icon_razz.gif" alt=":P" title="Razz">

    https://www.dropbox.com/s/ajhrcaggbdlv6 ... .capx?dl=0

    You did a great work and your execution is better than mine but this work for the sprite, the idea is do it for a bunch of sprites in a family.

    I have it working for one sprite more easy, using the pin behaviour,etc... but the problem comes when you have lots of sprites of different forms. In my case the shadows are placed but some ones with incorrect sprite shadow or ones have two or more shadows...

    Add some static sprites with a rhomb form, triangle or whatever, all inside the "Shadows" family, can you place all their shadows correctly?

  • I have planned lot of enemies and other stuff that i want have some shadow. I need a "pixel-perfect" shadow, this is an image of what i mean:

    My idea was: On start layout create the same sprite in a bottom layer with a tint to black, 50% opacity and pin position-angle that automatically does that for all the sprites in a family.

    I tried it but is all a mess, any idea of how do that in a correct way?

    EDIT: Maybe a plugin like the "Shadow Caster" for cases like this will be great...

  • matriax

    Can you please send a .capx example ?

    Ashley

    [quote:1zrkhlps]That's not true - you just need to set the UV co-ordinates. It works the same as it does in 2D.

    Can you tell me how ?

    I am sure if animated sprites are saved in one big images .. the shader lost UV coordinate .. sure;

    If they are saved with separate file .. the fx working .

    Ashley Can you check this to see if is possible or not?

    In case is not possible, can you add an option in the sprite plugin to allow/avoid the Spritesheet when we want?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Ashley Then i guess i understood something wrong , i'm using the 3D shader by Gigatron (this one: ) that uses one texture to map 6 faces of the cube.

    Uses this method because if i remember well gigatron told me due to some limits on GLshader only is possible one texture for a quad but maybe i messing with all this.

    The 3D shader on C2 runtime works perfect with animations, but after compile and export in one sheets comes the problems.

    But if this is true , Gigatron can you set the UV co-ordinates on the shader to allow animations?