[effect] Tiled bg

Share your Construct 2 effect files

Post » Sun Apr 30, 2017 6:40 am

@gigatron - which setting can i adjust to change the "height" of how far the virtual camera is off the ground. Like if the player was jumping. the ground would get lower as they go higher in the air?
B
83
S
40
G
15
Posts: 993
Reputation: 16,909

Post » Sun Apr 30, 2017 7:18 am

justifun wrote:@gigatron - which setting can i adjust to change the "height" of how far the virtual camera is off the ground. Like if the player was jumping. the ground would get lower as they go higher in the air?


Play with horizon i think ;
http://gigatron3k.free.fr/Intro/

https://www.shadertoy.com/user/gigatron

https://twitter.com/realistquantum

Ezekiel 1-4 ; ufo landing explanation ..

CONSTRUCT 2 THE ONLY FAST WAY TO HTML5

Image
B
57
S
20
G
29
Posts: 804
Reputation: 21,969

Post » Sat May 13, 2017 12:20 pm

@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.
B
23
S
10
G
3
Posts: 542
Reputation: 4,434

Post » Sat May 13, 2017 1:38 pm

@matriax
This is the same fx but with perspective flag 0 /1 on/off.. you must set horizon to 1 in this case and fog to 0.

http://gigatron3k.free.fr/html5/C2/FX/tiledbg2.rar
http://gigatron3k.free.fr/Intro/

https://www.shadertoy.com/user/gigatron

https://twitter.com/realistquantum

Ezekiel 1-4 ; ufo landing explanation ..

CONSTRUCT 2 THE ONLY FAST WAY TO HTML5

Image
B
57
S
20
G
29
Posts: 804
Reputation: 21,969

Post » Sat May 13, 2017 4:06 pm

@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
Image

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?
B
23
S
10
G
3
Posts: 542
Reputation: 4,434

Post » Sun May 14, 2017 7:15 am

@matriax
try this one;
quick made, parameter 1 & 2 are working
tile factor and angle ....

http://gigatron3k.free.fr/html5/C2/FX/tiledsp.rar

little demo:
http://gigatron3k.free.fr/html5/C2/FX/tiledsp
http://gigatron3k.free.fr/Intro/

https://www.shadertoy.com/user/gigatron

https://twitter.com/realistquantum

Ezekiel 1-4 ; ufo landing explanation ..

CONSTRUCT 2 THE ONLY FAST WAY TO HTML5

Image
B
57
S
20
G
29
Posts: 804
Reputation: 21,969

Post » Sun May 14, 2017 7:58 am

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.
B
23
S
10
G
3
Posts: 542
Reputation: 4,434

Previous

Return to Effects

Who is online

Users browsing this forum: No registered users and 0 guests