[Request] Tiled BG Image Offset..again.

Discussion and feedback on Construct 2

Post » Sun Jun 02, 2013 4:43 pm

I've been trying to get Tiled Background's "Image Offset" from CC into C2 ever since it first came out. Some 15+ threads asking about it and it still hasn't been implemented! Yes there are some workarounds but they don't always work..it just depends on what you're trying to do. Anyway, perhaps now this can finally be added? Please?

Some uses:

-Infinitely Scrolling Backgrounds
-Animated Tiled Backgrounds
-Image alignment
-(Most importantly) Tilesets! Currently you have to import a tileset into a sprite object as individual frames which results in a folder stuffed with hundreds of image files containing a single tile each. Not good! C2 actually crashes if you use "import sprite strip" on a tileset that's too big (and not that big either). It also takes a while to update them and can easily crash when modifying all tiles (shift+crop for example) The better way to do this is with Tiled Backgrounds and Image Offset so you can set the offset to a single tile from a single image in a single file. You'll get better load times too!Tokinsom2013-06-03 06:30:52
Image
B
234
S
27
G
13
Posts: 1,784
Reputation: 18,274

Post » Sun Jun 02, 2013 6:51 pm

I would love a native way to use tilesets in C2. I don't need to make them in C2 as I already have a program (PyxelEdit, exports tilemaps in both XML and plantext/CSV, exports tilesets in png)
All of those are features I would love in a tileset object, and I bet would improve performance over 100s of sprites with their own instances and collision vertices to check.

That last part though, sprites crash C2 if they have too many frames? D: That's not good for my project that uses tiles.Thndr2013-06-02 18:52:42
B
21
S
8
G
6
Posts: 346
Reputation: 4,891

Post » Sun Jun 02, 2013 7:55 pm

@Thndr I just meant C2 can crash if you use "import sprite strip" on an image that results in too many tiles. Fixed OP.Tokinsom2013-06-02 19:57:41
Image
B
234
S
27
G
13
Posts: 1,784
Reputation: 18,274

Post » Mon Jun 03, 2013 6:46 am

There's a code you can use:



Where the 50*dt is the speed and the 128-128 is the size of the tile. @R0J0hound helped me a LOT last year with this!
B
119
S
41
G
40
Posts: 835
Reputation: 27,790

Post » Mon Jun 03, 2013 1:02 pm

You can do infinitely scrolling backgrounds without this, e.g. in the autorunner template. Also Sprites are better for tilesets - if you have crashes using them, you should report it as bugs and we can look in to fixing it. C2's spritesheeting on export will make them in to a few large images anyway, so you still get the fast download and low memory usage at runtime.

The main reason it's not supported is while it's easy in WebGL, the canvas2D API for tiling images is completely flat out bonkers. I have no idea why they designed it the way they did, but it was a struggle just to get it working with scrolling, and a huge PITA to get it working with rotating layers, so I dread to think of wrestling it in to doing offsets. In the mean time there are workarounds, such as using masking layers or just sprites for tiles.
Scirra Founder
B
378
S
220
G
84
Posts: 23,863
Reputation: 188,019

Post » Thu Jun 06, 2013 10:47 pm

Sorry if this comes off as rude but that workaround is hardly a suitable replacement. Very limited, not very elegant, and won't work for many of the things I'm going for as stated in the OP :\ So basically it won't be added because it's a pain for Canvas2D? Does anyone even use that anymore? Can't keep letting one weakness drag everything else down with it..
Image
B
234
S
27
G
13
Posts: 1,784
Reputation: 18,274

Post » Thu Jun 06, 2013 11:16 pm

Actually yes it is still being used. Especially if you target Windows 8, Windows Phone, and mobile platforms that may or may not support webGL.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,538

Post » Fri Jun 07, 2013 4:21 am

If the future is HTML5 then its also webGL.
B
141
S
68
G
17
Posts: 1,769
Reputation: 20,224

Post » Fri Jun 07, 2013 1:21 pm

We'd love to drop the canvas2D renderer, but I really doubt we'd be able to for the foreseeable future. Old desktop machines with crappy drivers still get canvas2D, and although the percentage will be decreasing over time, it will probably be a couple of years before it's a non-issue. And then IE9 and IE10 would still need to die, which takes excruciatingly long with IE's release cycle.

I'll take another look sometime, maybe I can get it working anyway.
Scirra Founder
B
378
S
220
G
84
Posts: 23,863
Reputation: 188,019

Post » Tue Aug 20, 2013 1:58 am

[QUOTE=Ashley] We'd love to drop the canvas2D renderer, but I really doubt we'd be able to for the foreseeable future. Old desktop machines with crappy drivers still get canvas2D, and although the percentage will be decreasing over time, it will probably be a couple of years before it's a non-issue. And then IE9 and IE10 would still need to die, which takes excruciatingly long with IE's release cycle.

I'll take another look sometime, maybe I can get it working anyway.[/QUOTE]
remember iOs, which supports canvas2d is "a little" big:
B
12
S
3
G
1
Posts: 347
Reputation: 2,866

Next

Return to Construct 2 General

Who is online

Users browsing this forum: arthurtomazz and 5 guests