matriax's Forum Posts

  • Ok thanks!

  • I found some way, is not desired but works.

    Every tick > Set Sprite to cursor "MyImageCursor"

    And in the cursor sprite add the animation frames of the rotation.

    Will try to search to see if there is another way to hack it, maybe with some "execution javascript" ? mmm

  • Yep, i already have that, using the MouseXY position have some lag, is not 100% precise.

    BTW, thanks for the help!

  • I have a sprite to be used as "set cursor from sprite" on start layout.

    I tried adding a rotation bevaviour but the sprite not rotates.

    How can i fix that?

  • Hi Gigatron , any news about this?

  • justifun Use the Opacity of the sprite should work

  • Try Construct 3

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

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

    I updated your .capx adding an example in 9patch of what the shader needs to do to works the best:

    https://drive.google.com/file/d/0B8vm3F ... sp=sharing

    In the grass example you can resize in X or Y and no matter always looks pixel-perfect.

    Maybe i'm asking too much for a shader ? :S

  • Hi Gigatron

    9-Patch is a C2 default plugin , is hard to explain so better try and see how they works.

    The problem about this plugin as i said is that not allow animation/frames and not allow rotations, so the idea is use a Sprite plugin instead with a shader that allos the same option to have the ability to ass frames/animation and rotations.

    Basically 9-patch get the image you add and rip in 9 parts like:

    123

    456

    789

    In the plugin properties you set how this image is Tile-based with pixel width/height in left/right/top/bottom and if they will work as tiles, stretch or how. Is hard to explain better see the 9-Patch official manual here:

    https://www.scirra.com/manual/151/9-patch

    So the idea is that, in case is possible, do a shader that can do the shame for a sprite image.

  • Nothing?

    Gigatron is possible with the actual shaders in C2 ?

  • I already tried this, but if you rotate will make in some directions the collision will be wrong due the car perspective.

    I mean the collision box have to change in each frame to get perfect to the car. Example:

    So, to get that or something aprox to this i will have to do some kind of maths to do a collision box in a sprite and after that: Every tick > Rotate + set X width/height to transform

    And i don't know if this will works, still i have to play with that idea.

    This will be more easy if Construct will also have some "guess polygon box for each frame" so with the shadow pre-render i apply that and in a second i have what i need.

  • I have a Pre-Render car with isometric view that have 96 rotation frames.

    Do the collision boxes for the 96 frames will be a pain, so how i can do in an easy way?

    I can have a isometric shadow/detector in 96 frames for the collision, but the same problem i will have to "guess poligon box" one by one for each frame :S .

    Any idea?

  • Since 9-patch not have animations, frames and can't be rotated, is possible do a shader that applied on a Sprite plugin makes the same and maybe more things?

    Is possible?

  • Or better give us the option to use X sprite as particle.

    So in that sprite we add rotation and all the effects, filters, animations, behaviours we want that are available for sprite plugin.

  • Mikal I not have the skills to implement that inside the shader sorry :S , maybe Gigatron knows how to apply that to the shader itself but is busy now, maybe he can take a look on this when he have some free time.

    Also will be great to know if there can be a solution to use any amount of light source/colors instead that only 3 with a simply copy/paste code inside the .FX , i know is not the most optimized thing but with my skills is what i achieved XD.

    Maybe split the Normal Map shader in two ones. One for the light source with their intensity, colors,etc... you can place anywhere in the layout to have 10, 20 or whatever, and other shader on the sprite the calculates how the light will affect. I don't know if this is possible or maybe there is other way but is the unique thing i can think now.

  • The title is Self descriptive.

    Tiled BackGround -> Add Animations

    9-Patch -> Add Animations and Rotations

    For example if i want create a fores background with thw wind animation using the TiledBackground. Now i have to copy lots of trees.

    The best thing will be allow the sprite for use it as tiled-background, but i guess if already not is done is because some limitation or there is no way to do without mess other things, but well had to ask.