Image offset in r100?

Discussion and feedback on Construct 2

Post » Tue Aug 21, 2012 4:40 am

With the introduction of WebGL shaders in r100, will we be seeing the return of the "Image Offset" feature Tiled BGs had in Construct Classic as well? It was ideal for tilesets, infinitely scrolling backgrounds, etc.

Better yet, could this be implemented as a shader that could work on not just Tiled BGs, but other objects as well?Tokinsom2012-08-21 04:43:47
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Tue Aug 21, 2012 7:12 am

Oh that would be fantastic for TiledBG.
B
134
S
65
G
16
Posts: 1,765
Reputation: 19,188

Post » Tue Aug 21, 2012 7:45 am

There a workaround you can set infinitely scrolling background without offset in C2
B
95
S
25
G
20
Posts: 3,052
Reputation: 22,613

Post » Tue Aug 21, 2012 10:20 am

Yup, you just reposition the object everytime it hits the texture border.
B
62
S
21
G
12
Posts: 1,910
Reputation: 13,155

Post » Tue Aug 21, 2012 1:07 pm

True but that's a bit tacky and harder to pull off for something like "scrolling" fog on the topmost layer. I'm more interested in using it for tilesets, anyway. Individual frames is not the answer.
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Tue Aug 21, 2012 2:13 pm

Are you sure you want this done by a shader? Since it requires WebGL, at first it will only work in Firefox and Chrome on desktop, and you'll need to figure out something else for Canvas 2D anyway.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,468

Post » Tue Aug 21, 2012 3:17 pm

Well I was told Image Offset wouldn't even be possible until shaders are added, and figured it'd be easier to implement as a shader than build in to the Tiled BG itself.

As far as it only working on Chrome and FF...well, ya don't really want people playing your game on other browsers anyway ^^; Plus there's the .exe exporter (and Mac/Linux possibly) which I'll probably use exclusively for various reasons.Tokinsom2012-08-21 15:20:18
Image
B
225
S
27
G
13
Posts: 1,774
Reputation: 18,024

Post » Tue Aug 21, 2012 6:09 pm

[QUOTE=Tokinsom] Well I was told Image Offset wouldn't even be possible until shaders are added, and figured it'd be easier to implement as a shader than build in to the Tiled BG itself.

As far as it only working on Chrome and FF...well, ya don't really want people playing your game on other browsers anyway ^^; Plus there's the .exe exporter (and Mac/Linux possibly) which I'll probably use exclusively for various reasons.[/QUOTE]

I'm most likely going to use the exe exporter exclusively as well
Image
B
57
S
14
G
6
Posts: 493
Reputation: 11,253

Post » Tue Aug 21, 2012 6:36 pm

A custom shader could be written to achieve this effect if I understand it properly. When you say tilesets, what exactly do you mean?

I will be working a lot on custom shaders. If it is something I can pull off, I will give it a whirl.
B
9
S
3
G
4
Posts: 80
Reputation: 3,268

Post » Wed Aug 22, 2012 1:05 am

I had the same problem and R0J0hound helped me fixing it, here:

http://www.scirra.com/forum/set-image-offset_topic54382.html
B
106
S
35
G
36
Posts: 792
Reputation: 24,703

Next

Return to Construct 2 General

Who is online

Users browsing this forum: 8tomo8, akash15 and 10 guests