matriax's Recent Forum Activity

  • You can compare global variables, instance variables, speed, frame,etc...

    But actually there is no way to compare a .FX parameter. So if you want to do you have to create an instance variable in the sprite and every tick set the value so you can manage it.

    Will be great have more access to the effects from actions to compare values and other stuff like we do for instance variables for example.

  • , R0J0hound , chrisbrobs , oppenheimer

    Will be possible create a shader that works as the Tiled Background Plugin?

    You put a texture in the sprite and the shader will repeat that texture in XY without stretch or zoom when is resized, simple repeat the texture you added again and again in X and Y. Also without use any parameter, like the TiledBackground plugin.

    Why do in a .FX for a sprite? Because in a sprite you have frame/animations, so you can have in one sprite all the tiledBackgrounds and animations you want and simply add to layout and change the initial Frame/animation, Instead of have lots of tilebackgrounds objects for each tile. Also for Families you not will need a separate one for tiledBackgrounds, Also in a sprite allows imagepoints, custom collisions,etc...

    Will be possible?

  • Thanks for your time and patience Gigatron but Still not works as TiledBackground, i'm going to open a new thread to avoid the off-topic here. Maybe what i'm asking is not possible in a shader.

  • Here you can find a shader that renders a real 3D cube inside a sprite. You can texture them and use sprite animations:

    Is not a plugin, is a .FX and only works with a cube that can be sized in XYZ.

    But yes a plugin or something that you can show 3D things inside a sprite or object will be great.

  • Hi!

    Working on a new prototype, a TopDown shooter using Pseudo3D(Black walls like in teleglitch) and real 3D stuff using shaders.

    The lastest addition were a camera movement with lerp to the player and a difference when the aim is more close or far from player. Also the camera does a scale-out when player is running and the aim is far to have a bigger vision of the world-area. Also changed the player for one much better in 12 frames(pixel-perfect animation in 8x8)

    Actual gameplay:

    HD version on youtube:

    Subscribe to Construct videos now
  • . Gigatron , Thanks guys!

    I added camera movement with lerp to the player and a difference when the aim is more close or far from player. Also the camera does a scale-out when player is running and the aim is far to have a bigger vision of the world-area. Also changed the player for one much better in 12 frames(pixel-perfect animation in 8x8)

    Actual gameplay:

    HD version on youtube:

    Subscribe to Construct videos now

    I really think this shader with all the options like the camera , On/Off light, alpha, Light XYZ position, turn on/off faces of the cube(XA,XB,YA,YB,ZA,ZB), color fog(gradient to X color) and direction(Horizontal,vertical/Up/Down), etc... will allow to do more spectacular and complex scenes in an easy way to work in any kind of game.

    Also i realized i can do animated textures for magma, torch or whatever and the shader will show them on runtime :O .

  • Gigatron Thanks for the edit, but still have some problems that makes can't be used as tiled background:

    1.- On resize the sprite in non same aspect ratio than the original is streched on runtime. In C2 layout looks ok, here a screenshot:

    LEFT = Sprite with Efect | RIGHT = TileBackground Plugin

    2.- You always have to set in parameters the "tile factor" for the sprite resolution you are using to avoid the tiles are resized. In TileBackground Plugin the gfx have always the same size when you resize, simple is tiled again and again with the top-left as fixed position-start of tiling.

    I don't know if with these will work the same, but if not, Can you make the necessary edits to make the TiledBG effect works as TileBackground Plugin?

  • Gigatron Any chances to add a parameter to set On/OFF the perspective to use this FX as a TiledBackground on sprites? The TileBackground plugin not support frames/animations/ImagePoints or collisions so this can be useful for that. Is possible?

    Is the same idea for the 9patch i requested time ago, using shader to recreate the tiledbackground and 9patch plugin on sprites to take advantages of all that options that can't be done on the plugins. In this case i guess a parameter to enable/disable the perspective will be enough.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Gigatron So, at the moment no way to have the shadows working correctly only using the shader(without events) right?

  • I don't know the perfomance in mobiles, so if you test it let us know

  • Gigatron

    I want to use the shader to have shadows without use events. Doing what you say i will have more events like if i do in my own way using sprites.

    Also have in mind the player has 360 rotation and also using the mouse when you aim you can walk to left and the player looking to right, so i need a ways the shadow position is updated every tick to the offset i set on parameters so no matter any condition will appears in that values. I don't know if i explained well

  • Gigatron Nevermind! My Fault! I had my own shadow system when i no had shadows and was making this weird thing. NOw no weird thing around the player and the opacity works fine.

    But i found a problem, and is that the shadow rotates with the player changing the point of the light. I mean if i set XY ofset of the shadow this have to be always the same no matter the player rotation, i will give you an example:

    Now, the shadow position rotates with the player, and the shadow always should be in an offset/angle of the light that appears in the second case that is always at offset X+1 and y+1. But now when player rotates the shadow also does :S .

    Maybe i'm requesting an imposible, but can you make a "static shadow" in a offset no matter the player sprite rotation?(i guess will have to update every tick)

    Using sprites for shadow i clone the player gfx, set tint to black and every tick set the postion to player X+1 and Y+1, so no matter the player sprite rotation the shadow will always appears in the same offset, X+1/Y+1.

    Is possible do that in the shader?

matriax's avatar

matriax

Member since 22 Jun, 2015

Twitter
matriax has 114 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Forum Patron Made 500 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Famous Game One of your games has over 10,000 players
  • Viral Game One of your games has over 100,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

17/44
How to earn trophies