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
230
S
27
G
13
Posts: 1,781
Reputation: 18,163

Post » Tue Aug 21, 2012 7:12 am

Oh that would be fantastic for TiledBG.
B
137
S
67
G
17
Posts: 1,766
Reputation: 19,992

Post » Tue Aug 21, 2012 7:45 am

There a workaround you can set infinitely scrolling background without offset in C2
B
105
S
29
G
28
Posts: 3,102
Reputation: 27,380

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
230
S
27
G
13
Posts: 1,781
Reputation: 18,163

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
367
S
217
G
82
Posts: 23,262
Reputation: 183,679

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
230
S
27
G
13
Posts: 1,781
Reputation: 18,163

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
58
S
15
G
7
Posts: 502
Reputation: 11,896

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
112
S
38
G
40
Posts: 817
Reputation: 27,201

Next

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 1 guest